Skip to content

Commit d32805d

Browse files
moygitster
authored andcommitted
Replace filepattern with pathspec for consistency
pathspec is the most widely used term, and is the one defined in gitglossary.txt. <filepattern> was used only in the synopsys for git-add and git-commit, and in git-add.txt. Get rid of it. This patch is obtained with by running: perl -pi -e 's/filepattern/pathspec/' `git grep -l filepattern` Signed-off-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 901fd18 commit d32805d

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Documentation/git-add.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ SYNOPSIS
1111
'git add' [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p]
1212
[--edit | -e] [--all | [--update | -u]] [--intent-to-add | -N]
1313
[--refresh] [--ignore-errors] [--ignore-missing] [--]
14-
[<filepattern>...]
14+
[<pathspec>...]
1515

1616
DESCRIPTION
1717
-----------
@@ -49,7 +49,7 @@ commit.
4949

5050
OPTIONS
5151
-------
52-
<filepattern>...::
52+
<pathspec>...::
5353
Files to add content from. Fileglobs (e.g. `*.c`) can
5454
be given to add all matching files. Also a
5555
leading directory name (e.g. `dir` to add `dir/file1`
@@ -100,20 +100,20 @@ apply to the index. See EDITING PATCHES below.
100100

101101
-u::
102102
--update::
103-
Only match <filepattern> against already tracked files in
103+
Only match <pathspec> against already tracked files in
104104
the index rather than the working tree. That means that it
105105
will never stage new files, but that it will stage modified
106106
new contents of tracked files and that it will remove files
107107
from the index if the corresponding files in the working tree
108108
have been removed.
109109
+
110-
If no <filepattern> is given, default to "."; in other words,
110+
If no <pathspec> is given, default to "."; in other words,
111111
update all tracked files in the current directory and its
112112
subdirectories.
113113

114114
-A::
115115
--all::
116-
Like `-u`, but match <filepattern> against files in the
116+
Like `-u`, but match <pathspec> against files in the
117117
working tree in addition to the index. That means that it
118118
will find new files as well as staging modified content and
119119
removing files that are no longer in the working tree.

builtin/add.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "bulk-checkin.h"
1717

1818
static const char * const builtin_add_usage[] = {
19-
N_("git add [options] [--] <filepattern>..."),
19+
N_("git add [options] [--] <pathspec>..."),
2020
NULL
2121
};
2222
static int patch_interactive, add_interactive, edit_interactive;

builtin/commit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131
#include "sequencer.h"
3232

3333
static const char * const builtin_commit_usage[] = {
34-
N_("git commit [options] [--] <filepattern>..."),
34+
N_("git commit [options] [--] <pathspec>..."),
3535
NULL
3636
};
3737

3838
static const char * const builtin_status_usage[] = {
39-
N_("git status [options] [--] <filepattern>..."),
39+
N_("git status [options] [--] <pathspec>..."),
4040
NULL
4141
};
4242

0 commit comments

Comments
 (0)