@matheusbsbs / matheus-bagliano / commits / 3bd2bcfa98
Fork 0

glossary: define pathspec

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jonathan Nieder committed Dec 15, 2010 at 22:02 UTC 3bd2bcfa982c69c0f5722c3dfe72b15cd0469d15
1 file changed +23
Documentation/glossary-content.txt
+23
@@ -273,6 +273,29 @@ This commit is referred to as a "merge commit", or sometimes just a
273 <<def_pack,pack>>, to assist in efficiently accessing the contents of a
274 pack.
275
276 +[[def_pathspec]]pathspec::
277 + Pattern used to specify paths.
278 ++
279 +Pathspecs are used on the command line of "git ls-files", "git
280 +ls-tree", "git grep", "git checkout", and many other commands to
281 +limit the scope of operations to some subset of the tree or
282 +worktree. See the documentation of each command for whether
283 +paths are relative to the current directory or toplevel. The
284 +pathspec syntax is as follows:
285 +
286 +* any path matches itself
287 +* the pathspec up to the last slash represents a
288 + directory prefix. The scope of that pathspec is
289 + limited to that subtree.
290 +* the rest of the pathspec is a pattern for the remainder
291 + of the pathname. Paths relative to the directory
292 + prefix will be matched against that pattern using fnmatch(3);
293 + in particular, '*' and '?' _can_ match directory separators.
294 ++
295 +For example, Documentation/*.jpg will match all .jpg files
296 +in the Documentation subtree,
297 +including Documentation/chapter_1/figure_1.jpg.
298 +
299 [[def_parent]]parent::
300 A <<def_commit_object,commit object>> contains a (possibly empty) list
301 of the logical predecessor(s) in the line of development, i.e. its