Skip to content

Commit

Permalink
Replace filepattern with pathspec for consistency
Browse files Browse the repository at this point in the history
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 <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Matthieu Moy authored and Junio C Hamano committed Feb 12, 2013
1 parent 901fd18 commit d32805d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions Documentation/git-add.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SYNOPSIS
'git add' [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p]
[--edit | -e] [--all | [--update | -u]] [--intent-to-add | -N]
[--refresh] [--ignore-errors] [--ignore-missing] [--]
[<filepattern>...]
[<pathspec>...]

DESCRIPTION
-----------
Expand Down Expand Up @@ -49,7 +49,7 @@ commit.

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

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

-A::
--all::
Like `-u`, but match <filepattern> against files in the
Like `-u`, but match <pathspec> against files in the
working tree in addition to the index. That means that it
will find new files as well as staging modified content and
removing files that are no longer in the working tree.
Expand Down
2 changes: 1 addition & 1 deletion builtin/add.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "bulk-checkin.h"

static const char * const builtin_add_usage[] = {
N_("git add [options] [--] <filepattern>..."),
N_("git add [options] [--] <pathspec>..."),
NULL
};
static int patch_interactive, add_interactive, edit_interactive;
Expand Down
4 changes: 2 additions & 2 deletions builtin/commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
#include "sequencer.h"

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

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

Expand Down

0 comments on commit d32805d

Please sign in to comment.