summaryrefslogtreecommitdiffstats
path: root/gitglossary.html
diff options
context:
space:
mode:
authorJunio C Hamano <junio@kernel.org>2011-05-23 23:06:31 +0000
committerJunio C Hamano <junio@kernel.org>2011-05-23 23:06:31 +0000
commit2a294cdddac356b905bb00d260fbd221d91af595 (patch)
tree7d2d0b207286927bba4e983e2c699cd69217fe3f /gitglossary.html
parent300d43650761892e5a570d8b4d83433de5052ea8 (diff)
downloadgit-htmldocs-2a294cdddac356b905bb00d260fbd221d91af595.tar.gz
Autogenerated HTML docs for v1.7.5.2-353-g5df3e
Diffstat (limited to 'gitglossary.html')
-rw-r--r--gitglossary.html33
1 files changed, 32 insertions, 1 deletions
diff --git a/gitglossary.html b/gitglossary.html
index 335b015f6..138335537 100644
--- a/gitglossary.html
+++ b/gitglossary.html
@@ -919,7 +919,8 @@ This commit is referred to as a "merge commit", or sometimes just a
Pattern used to specify paths.
</p>
<div class="paragraph"><p>Pathspecs are used on the command line of "git ls-files", "git
-ls-tree", "git grep", "git checkout", and many other commands to
+ls-tree", "git add", "git grep", "git diff", "git checkout",
+and many other commands to
limit the scope of operations to some subset of the tree or
worktree. See the documentation of each command for whether
paths are relative to the current directory or toplevel. The
@@ -949,6 +950,36 @@ in the Documentation subtree,
including Documentation/chapter_1/figure_1.jpg.</p></div>
</li>
</ul></div>
+<div class="paragraph"><p>A pathspec that begins with a colon <tt>:</tt> has special meaning. In the
+short form, the leading colon <tt>:</tt> is followed by zero or more "magic
+signature" letters (which optionally is terminated by another colon <tt>:</tt>),
+and the remainder is the pattern to match against the path. The optional
+colon that terminates the "magic signature" can be omitted if the pattern
+begins with a character that cannot be a "magic signature" and is not a
+colon.</p></div>
+<div class="paragraph"><p>In the long form, the leading colon <tt>:</tt> is followed by a open
+parenthesis <tt>(</tt>, a comma-separated list of zero or more "magic words",
+and a close parentheses <tt>)</tt>, and the remainder is the pattern to match
+against the path.</p></div>
+<div class="paragraph"><p>The "magic signature" consists of an ASCII symbol that is not
+alphanumeric.</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+top <tt>/</tt>
+</dt>
+<dd>
+<p>
+ The magic word <tt>top</tt> (mnemonic: <tt>/</tt>) makes the pattern match
+ from the root of the working tree, even when you are running
+ the command from inside a subdirectory.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Currently only the slash <tt>/</tt> is recognized as the "magic signature",
+but it is envisioned that we will support more types of magic in later
+versions of git.</p></div>
+<div class="paragraph"><p>A pathspec with only a colon means "there is no pathspec". This form
+should not be combined with other pathspec.</p></div>
</dd>
<dt class="hdlist1">
<a id="def_parent"></a>parent