git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [RFC/PATCH] Replace filepattern with pathspec for consistency
@ 2013-02-12  9:24 Matthieu Moy
  2013-02-12 16:31 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Matthieu Moy @ 2013-02-12  9:24 UTC (permalink / raw
  To: git, gitster; +Cc: Matthieu Moy

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>
---
I'm a bit unsure about the changes to the .po files, but I guess doing
the substitution there too does the right thing.

 Documentation/git-add.txt | 12 ++++++------
 builtin/add.c             |  2 +-
 builtin/commit.c          |  4 ++--
 po/de.po                  |  6 +++---
 po/git.pot                |  6 +++---
 po/sv.po                  |  6 +++---
 po/vi.po                  |  6 +++---
 po/zh_CN.po               |  6 +++---
 8 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
index 5333559..388a225 100644
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -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
 -----------
@@ -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`
@@ -100,21 +100,21 @@ 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, the current version of Git defaults to
+If no <pathspec> is given, the current version of Git defaults to
 "."; in other words, update all tracked files in the current directory
 and its subdirectories. This default will change in a future version
-of Git, hence the form without <filepattern> should not be used.
+of Git, hence the form without <pathspec> should not be used.
 
 -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.
diff --git a/builtin/add.c b/builtin/add.c
index 7738025..0dd014e 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -17,7 +17,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;
diff --git a/builtin/commit.c b/builtin/commit.c
index 1a0e5f1..3348aa1 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -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
 };
 
diff --git a/po/de.po b/po/de.po
index c8ad2f0..0183c28 100644
--- a/po/de.po
+++ b/po/de.po
@@ -1410,7 +1410,7 @@ msgid "failed to unlink '%s'"
 msgstr "Konnte '%s' nicht entfernen"
 
 #: builtin/add.c:19
-msgid "git add [options] [--] <filepattern>..."
+msgid "git add [options] [--] <pathspec>..."
 msgstr "git add [Optionen] [--] [<Dateimuster>...]"
 
 #: builtin/add.c:62
@@ -3296,11 +3296,11 @@ msgid "--command must be the first argument"
 msgstr "Option --command muss zuerst angegeben werden"
 
 #: builtin/commit.c:34
-msgid "git commit [options] [--] <filepattern>..."
+msgid "git commit [options] [--] <pathspec>..."
 msgstr "git commit [Optionen] [--] <Dateimuster>..."
 
 #: builtin/commit.c:39
-msgid "git status [options] [--] <filepattern>..."
+msgid "git status [options] [--] <pathspec>..."
 msgstr "git status [Optionen] [--] <Dateimuster>..."
 
 #: builtin/commit.c:44
diff --git a/po/git.pot b/po/git.pot
index 430d033..4941fd7 100644
--- a/po/git.pot
+++ b/po/git.pot
@@ -1328,7 +1328,7 @@ msgid "failed to unlink '%s'"
 msgstr ""
 
 #: builtin/add.c:19
-msgid "git add [options] [--] <filepattern>..."
+msgid "git add [options] [--] <pathspec>..."
 msgstr ""
 
 #: builtin/add.c:62
@@ -3128,11 +3128,11 @@ msgid "--command must be the first argument"
 msgstr ""
 
 #: builtin/commit.c:34
-msgid "git commit [options] [--] <filepattern>..."
+msgid "git commit [options] [--] <pathspec>..."
 msgstr ""
 
 #: builtin/commit.c:39
-msgid "git status [options] [--] <filepattern>..."
+msgid "git status [options] [--] <pathspec>..."
 msgstr ""
 
 #: builtin/commit.c:44
diff --git a/po/sv.po b/po/sv.po
index ee6b0fc..c0ef050 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -1379,7 +1379,7 @@ msgid "failed to unlink '%s'"
 msgstr "misslyckades ta bort länken \"%s\""
 
 #: builtin/add.c:19
-msgid "git add [options] [--] <filepattern>..."
+msgid "git add [options] [--] <pathspec>..."
 msgstr "git add [flaggor] [--] <filmönster>..."
 
 #: builtin/add.c:62
@@ -3223,11 +3223,11 @@ msgid "--command must be the first argument"
 msgstr "--command måste vara första argument"
 
 #: builtin/commit.c:34
-msgid "git commit [options] [--] <filepattern>..."
+msgid "git commit [options] [--] <pathspec>..."
 msgstr "git commit [flaggor] [--] <filmöster>..."
 
 #: builtin/commit.c:39
-msgid "git status [options] [--] <filepattern>..."
+msgid "git status [options] [--] <pathspec>..."
 msgstr "git status [flaggor] [--] <filmönster>..."
 
 #: builtin/commit.c:44
diff --git a/po/vi.po b/po/vi.po
index 2ccdf86..78c6326 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -1412,7 +1412,7 @@ msgid "failed to unlink '%s'"
 msgstr "bỏ liên kết (unlink) %s không thành công"
 
 #: builtin/add.c:19
-msgid "git add [options] [--] <filepattern>..."
+msgid "git add [options] [--] <pathspec>..."
 msgstr "git add [các-tùy-chọn] [--] <mẫu-tập-tin>..."
 
 #: builtin/add.c:62
@@ -3281,11 +3281,11 @@ msgid "--command must be the first argument"
 msgstr "--command phải là đối số đầu tiên"
 
 #: builtin/commit.c:34
-msgid "git commit [options] [--] <filepattern>..."
+msgid "git commit [options] [--] <pathspec>..."
 msgstr "git commit [các-tùy-chọn] [--] <mẫu-tập-tin>..."
 
 #: builtin/commit.c:39
-msgid "git status [options] [--] <filepattern>..."
+msgid "git status [options] [--] <pathspec>..."
 msgstr "git status [các-tùy-chọn] [--] <mẫu-tập-tin>..."
 
 #: builtin/commit.c:44
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 46d158f..79cce0e 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -1405,7 +1405,7 @@ msgstr "无法删除 '%s'"
 
 #: builtin/add.c:19
 #, fuzzy
-msgid "git add [options] [--] <filepattern>..."
+msgid "git add [options] [--] <pathspec>..."
 msgstr "git apply [选项] [<补丁>...]"
 
 #: builtin/add.c:62
@@ -3278,12 +3278,12 @@ msgstr "--command 必须是第一个参数"
 
 #: builtin/commit.c:33
 #, fuzzy
-msgid "git commit [options] [--] <filepattern>..."
+msgid "git commit [options] [--] <pathspec>..."
 msgstr "git apply [选项] [<补丁>...]"
 
 #: builtin/commit.c:38
 #, fuzzy
-msgid "git status [options] [--] <filepattern>..."
+msgid "git status [options] [--] <pathspec>..."
 msgstr "git apply [选项] [<补丁>...]"
 
 #: builtin/commit.c:43
-- 
1.8.1.2.548.g956380a.dirty

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [RFC/PATCH] Replace filepattern with pathspec for consistency
  2013-02-12  9:24 [RFC/PATCH] Replace filepattern with pathspec for consistency Matthieu Moy
@ 2013-02-12 16:31 ` Junio C Hamano
  2013-02-12 17:06   ` Matthieu Moy
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2013-02-12 16:31 UTC (permalink / raw
  To: Matthieu Moy; +Cc: git, Jiang Xin

Matthieu Moy <Matthieu.Moy@imag.fr> writes:

> 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>
> ---
> I'm a bit unsure about the changes to the .po files, but I guess doing
> the substitution there too does the right thing.

I am not sure if that is the right thing from the workflow point of
view, though.

The strings that are fed to _() would be updated with your patch,
but the replacement will stay to be "filepattern" translated to the
target language.  Translators have to actively hunt for the messages
to update them.  If you left the .po files untouched, they would
notice when git.pot is updated the next time and that will ensure
that the affected messages get translated, no?

>  Documentation/git-add.txt | 12 ++++++------
>  builtin/add.c             |  2 +-
>  builtin/commit.c          |  4 ++--
>  po/de.po                  |  6 +++---
>  po/git.pot                |  6 +++---
>  po/sv.po                  |  6 +++---
>  po/vi.po                  |  6 +++---
>  po/zh_CN.po               |  6 +++---
>  8 files changed, 24 insertions(+), 24 deletions(-)

For the above reason, I am inclined to take the first three and drop
the rest.

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC/PATCH] Replace filepattern with pathspec for consistency
  2013-02-12 16:31 ` Junio C Hamano
@ 2013-02-12 17:06   ` Matthieu Moy
  2013-02-12 18:04     ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Matthieu Moy @ 2013-02-12 17:06 UTC (permalink / raw
  To: Junio C Hamano; +Cc: git, Jiang Xin

Junio C Hamano <gitster@pobox.com> writes:

> The strings that are fed to _() would be updated with your patch,
> but the replacement will stay to be "filepattern" translated to the
> target language.  Translators have to actively hunt for the messages
> to update them.  If you left the .po files untouched, they would
> notice when git.pot is updated the next time and that will ensure
> that the affected messages get translated, no?

Right, and I'm not competent to say how filepattern was translated in
any of the languages. Let me know if you want a resend without the po/
part.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC/PATCH] Replace filepattern with pathspec for consistency
  2013-02-12 17:06   ` Matthieu Moy
@ 2013-02-12 18:04     ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2013-02-12 18:04 UTC (permalink / raw
  To: Matthieu Moy; +Cc: git, Jiang Xin

Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:

> Junio C Hamano <gitster@pobox.com> writes:
>
>> The strings that are fed to _() would be updated with your patch,
>> but the replacement will stay to be "filepattern" translated to the
>> target language.  Translators have to actively hunt for the messages
>> to update them.  If you left the .po files untouched, they would
>> notice when git.pot is updated the next time and that will ensure
>> that the affected messages get translated, no?
>
> Right, and I'm not competent to say how filepattern was translated in
> any of the languages. Let me know if you want a resend without the po/
> part.

I'll remove the tail part of the patch myself.  Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-02-12 18:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-12  9:24 [RFC/PATCH] Replace filepattern with pathspec for consistency Matthieu Moy
2013-02-12 16:31 ` Junio C Hamano
2013-02-12 17:06   ` Matthieu Moy
2013-02-12 18:04     ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).