{"thread":{"id":"32886","subject":"[RFC/PATCH] Replace filepattern with pathspec for consistency","startedAt":"2013-02-12T09:24:44Z","lastAt":"2013-02-12T18:04:11Z","messageCount":4,"participants":["Matthieu Moy","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"209337","messageId":"1360661084-8678-1-git-send-email-Matthieu.Moy@imag.fr","threadId":"32886","inReplyTo":null,"subject":"[RFC/PATCH] Replace filepattern with pathspec for consistency","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-02-12T09:24:44Z","receivedAt":"2013-02-12T09:24:44Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"pathspec is the most widely used term, and is the one defined in\ngitglossary.txt. <filepattern> was used only in the synopsys for git-add\nand git-commit, and in git-add.txt. Get rid of it.\n\nThis patch is obtained with by running:\n\n  perl -pi -e 's/filepattern/pathspec/' `git grep -l filepattern`\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\nI'm a bit unsure about the changes to the .po files, but I guess doing\nthe substitution there too does the right thing.\n\n Documentation/git-add.txt | 12 ++++++------\n builtin/add.c             |  2 +-\n builtin/commit.c          |  4 ++--\n po/de.po                  |  6 +++---\n po/git.pot                |  6 +++---\n po/sv.po                  |  6 +++---\n po/vi.po                  |  6 +++---\n po/zh_CN.po               |  6 +++---\n 8 files changed, 24 insertions(+), 24 deletions(-)\n\ndiff --git a/Documentation/git-add.txt b/Documentation/git-add.txt\nindex 5333559..388a225 100644\n--- a/Documentation/git-add.txt\n+++ b/Documentation/git-add.txt\n@@ -11,7 +11,7 @@ SYNOPSIS\n 'git add' [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p]\n \t  [--edit | -e] [--all | [--update | -u]] [--intent-to-add | -N]\n \t  [--refresh] [--ignore-errors] [--ignore-missing] [--]\n-\t  [<filepattern>...]\n+\t  [<pathspec>...]\n \n DESCRIPTION\n -----------\n@@ -49,7 +49,7 @@ commit.\n \n OPTIONS\n -------\n-<filepattern>...::\n+<pathspec>...::\n \tFiles to add content from.  Fileglobs (e.g. `*.c`) can\n \tbe given to add all matching files.  Also a\n \tleading directory name (e.g. `dir` to add `dir/file1`\n@@ -100,21 +100,21 @@ apply to the index. See EDITING PATCHES below.\n \n -u::\n --update::\n-\tOnly match <filepattern> against already tracked files in\n+\tOnly match <pathspec> against already tracked files in\n \tthe index rather than the working tree. That means that it\n \twill never stage new files, but that it will stage modified\n \tnew contents of tracked files and that it will remove files\n \tfrom the index if the corresponding files in the working tree\n \thave been removed.\n +\n-If no <filepattern> is given, the current version of Git defaults to\n+If no <pathspec> is given, the current version of Git defaults to\n \".\"; in other words, update all tracked files in the current directory\n and its subdirectories. This default will change in a future version\n-of Git, hence the form without <filepattern> should not be used.\n+of Git, hence the form without <pathspec> should not be used.\n \n -A::\n --all::\n-\tLike `-u`, but match <filepattern> against files in the\n+\tLike `-u`, but match <pathspec> against files in the\n \tworking tree in addition to the index. That means that it\n \twill find new files as well as staging modified content and\n \tremoving files that are no longer in the working tree.\ndiff --git a/builtin/add.c b/builtin/add.c\nindex 7738025..0dd014e 100644\n--- a/builtin/add.c\n+++ b/builtin/add.c\n@@ -17,7 +17,7 @@\n #include \"bulk-checkin.h\"\n \n static const char * const builtin_add_usage[] = {\n-\tN_(\"git add [options] [--] <filepattern>...\"),\n+\tN_(\"git add [options] [--] <pathspec>...\"),\n \tNULL\n };\n static int patch_interactive, add_interactive, edit_interactive;\ndiff --git a/builtin/commit.c b/builtin/commit.c\nindex 1a0e5f1..3348aa1 100644\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -31,12 +31,12 @@\n #include \"sequencer.h\"\n \n static const char * const builtin_commit_usage[] = {\n-\tN_(\"git commit [options] [--] <filepattern>...\"),\n+\tN_(\"git commit [options] [--] <pathspec>...\"),\n \tNULL\n };\n \n static const char * const builtin_status_usage[] = {\n-\tN_(\"git status [options] [--] <filepattern>...\"),\n+\tN_(\"git status [options] [--] <pathspec>...\"),\n \tNULL\n };\n \ndiff --git a/po/de.po b/po/de.po\nindex c8ad2f0..0183c28 100644\n--- a/po/de.po\n+++ b/po/de.po\n@@ -1410,7 +1410,7 @@ msgid \"failed to unlink '%s'\"\n msgstr \"Konnte '%s' nicht entfernen\"\n \n #: builtin/add.c:19\n-msgid \"git add [options] [--] <filepattern>...\"\n+msgid \"git add [options] [--] <pathspec>...\"\n msgstr \"git add [Optionen] [--] [<Dateimuster>...]\"\n \n #: builtin/add.c:62\n@@ -3296,11 +3296,11 @@ msgid \"--command must be the first argument\"\n msgstr \"Option --command muss zuerst angegeben werden\"\n \n #: builtin/commit.c:34\n-msgid \"git commit [options] [--] <filepattern>...\"\n+msgid \"git commit [options] [--] <pathspec>...\"\n msgstr \"git commit [Optionen] [--] <Dateimuster>...\"\n \n #: builtin/commit.c:39\n-msgid \"git status [options] [--] <filepattern>...\"\n+msgid \"git status [options] [--] <pathspec>...\"\n msgstr \"git status [Optionen] [--] <Dateimuster>...\"\n \n #: builtin/commit.c:44\ndiff --git a/po/git.pot b/po/git.pot\nindex 430d033..4941fd7 100644\n--- a/po/git.pot\n+++ b/po/git.pot\n@@ -1328,7 +1328,7 @@ msgid \"failed to unlink '%s'\"\n msgstr \"\"\n \n #: builtin/add.c:19\n-msgid \"git add [options] [--] <filepattern>...\"\n+msgid \"git add [options] [--] <pathspec>...\"\n msgstr \"\"\n \n #: builtin/add.c:62\n@@ -3128,11 +3128,11 @@ msgid \"--command must be the first argument\"\n msgstr \"\"\n \n #: builtin/commit.c:34\n-msgid \"git commit [options] [--] <filepattern>...\"\n+msgid \"git commit [options] [--] <pathspec>...\"\n msgstr \"\"\n \n #: builtin/commit.c:39\n-msgid \"git status [options] [--] <filepattern>...\"\n+msgid \"git status [options] [--] <pathspec>...\"\n msgstr \"\"\n \n #: builtin/commit.c:44\ndiff --git a/po/sv.po b/po/sv.po\nindex ee6b0fc..c0ef050 100644\n--- a/po/sv.po\n+++ b/po/sv.po\n@@ -1379,7 +1379,7 @@ msgid \"failed to unlink '%s'\"\n msgstr \"misslyckades ta bort länken \\\"%s\\\"\"\n \n #: builtin/add.c:19\n-msgid \"git add [options] [--] <filepattern>...\"\n+msgid \"git add [options] [--] <pathspec>...\"\n msgstr \"git add [flaggor] [--] <filmönster>...\"\n \n #: builtin/add.c:62\n@@ -3223,11 +3223,11 @@ msgid \"--command must be the first argument\"\n msgstr \"--command måste vara första argument\"\n \n #: builtin/commit.c:34\n-msgid \"git commit [options] [--] <filepattern>...\"\n+msgid \"git commit [options] [--] <pathspec>...\"\n msgstr \"git commit [flaggor] [--] <filmöster>...\"\n \n #: builtin/commit.c:39\n-msgid \"git status [options] [--] <filepattern>...\"\n+msgid \"git status [options] [--] <pathspec>...\"\n msgstr \"git status [flaggor] [--] <filmönster>...\"\n \n #: builtin/commit.c:44\ndiff --git a/po/vi.po b/po/vi.po\nindex 2ccdf86..78c6326 100644\n--- a/po/vi.po\n+++ b/po/vi.po\n@@ -1412,7 +1412,7 @@ msgid \"failed to unlink '%s'\"\n msgstr \"bỏ liên kết (unlink) %s không thành công\"\n \n #: builtin/add.c:19\n-msgid \"git add [options] [--] <filepattern>...\"\n+msgid \"git add [options] [--] <pathspec>...\"\n msgstr \"git add [các-tùy-chọn] [--] <mẫu-tập-tin>...\"\n \n #: builtin/add.c:62\n@@ -3281,11 +3281,11 @@ msgid \"--command must be the first argument\"\n msgstr \"--command phải là đối số đầu tiên\"\n \n #: builtin/commit.c:34\n-msgid \"git commit [options] [--] <filepattern>...\"\n+msgid \"git commit [options] [--] <pathspec>...\"\n msgstr \"git commit [các-tùy-chọn] [--] <mẫu-tập-tin>...\"\n \n #: builtin/commit.c:39\n-msgid \"git status [options] [--] <filepattern>...\"\n+msgid \"git status [options] [--] <pathspec>...\"\n msgstr \"git status [các-tùy-chọn] [--] <mẫu-tập-tin>...\"\n \n #: builtin/commit.c:44\ndiff --git a/po/zh_CN.po b/po/zh_CN.po\nindex 46d158f..79cce0e 100644\n--- a/po/zh_CN.po\n+++ b/po/zh_CN.po\n@@ -1405,7 +1405,7 @@ msgstr \"无法删除 '%s'\"\n \n #: builtin/add.c:19\n #, fuzzy\n-msgid \"git add [options] [--] <filepattern>...\"\n+msgid \"git add [options] [--] <pathspec>...\"\n msgstr \"git apply [选项] [<补丁>...]\"\n \n #: builtin/add.c:62\n@@ -3278,12 +3278,12 @@ msgstr \"--command 必须是第一个参数\"\n \n #: builtin/commit.c:33\n #, fuzzy\n-msgid \"git commit [options] [--] <filepattern>...\"\n+msgid \"git commit [options] [--] <pathspec>...\"\n msgstr \"git apply [选项] [<补丁>...]\"\n \n #: builtin/commit.c:38\n #, fuzzy\n-msgid \"git status [options] [--] <filepattern>...\"\n+msgid \"git status [options] [--] <pathspec>...\"\n msgstr \"git apply [选项] [<补丁>...]\"\n \n #: builtin/commit.c:43\n-- \n1.8.1.2.548.g956380a.dirty\n"},{"id":"209374","messageId":"7vliatijej.fsf@alter.siamese.dyndns.org","threadId":"32886","inReplyTo":"1360661084-8678-1-git-send-email-Matthieu.Moy@imag.fr","subject":"Re: [RFC/PATCH] Replace filepattern with pathspec for consistency","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-02-12T16:31:00Z","receivedAt":"2013-02-12T16:31:00Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@imag.fr> writes:\n\n> pathspec is the most widely used term, and is the one defined in\n> gitglossary.txt. <filepattern> was used only in the synopsys for git-add\n> and git-commit, and in git-add.txt. Get rid of it.\n>\n> This patch is obtained with by running:\n>\n>   perl -pi -e 's/filepattern/pathspec/' `git grep -l filepattern`\n>\n> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n> ---\n> I'm a bit unsure about the changes to the .po files, but I guess doing\n> the substitution there too does the right thing.\n\nI am not sure if that is the right thing from the workflow point of\nview, though.\n\nThe strings that are fed to _() would be updated with your patch,\nbut the replacement will stay to be \"filepattern\" translated to the\ntarget language.  Translators have to actively hunt for the messages\nto update them.  If you left the .po files untouched, they would\nnotice when git.pot is updated the next time and that will ensure\nthat the affected messages get translated, no?\n\n>  Documentation/git-add.txt | 12 ++++++------\n>  builtin/add.c             |  2 +-\n>  builtin/commit.c          |  4 ++--\n>  po/de.po                  |  6 +++---\n>  po/git.pot                |  6 +++---\n>  po/sv.po                  |  6 +++---\n>  po/vi.po                  |  6 +++---\n>  po/zh_CN.po               |  6 +++---\n>  8 files changed, 24 insertions(+), 24 deletions(-)\n\nFor the above reason, I am inclined to take the first three and drop\nthe rest.\n\nThanks.\n"},{"id":"209375","messageId":"vpq4nhhv4vc.fsf@grenoble-inp.fr","threadId":"32886","inReplyTo":"7vliatijej.fsf@alter.siamese.dyndns.org","subject":"Re: [RFC/PATCH] Replace filepattern with pathspec for consistency","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-02-12T17:06:31Z","receivedAt":"2013-02-12T17:06:31Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> The strings that are fed to _() would be updated with your patch,\n> but the replacement will stay to be \"filepattern\" translated to the\n> target language.  Translators have to actively hunt for the messages\n> to update them.  If you left the .po files untouched, they would\n> notice when git.pot is updated the next time and that will ensure\n> that the affected messages get translated, no?\n\nRight, and I'm not competent to say how filepattern was translated in\nany of the languages. Let me know if you want a resend without the po/\npart.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"209383","messageId":"7vmwv9h0is.fsf@alter.siamese.dyndns.org","threadId":"32886","inReplyTo":"vpq4nhhv4vc.fsf@grenoble-inp.fr","subject":"Re: [RFC/PATCH] Replace filepattern with pathspec for consistency","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-02-12T18:04:11Z","receivedAt":"2013-02-12T18:04:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n>> The strings that are fed to _() would be updated with your patch,\n>> but the replacement will stay to be \"filepattern\" translated to the\n>> target language.  Translators have to actively hunt for the messages\n>> to update them.  If you left the .po files untouched, they would\n>> notice when git.pot is updated the next time and that will ensure\n>> that the affected messages get translated, no?\n>\n> Right, and I'm not competent to say how filepattern was translated in\n> any of the languages. Let me know if you want a resend without the po/\n> part.\n\nI'll remove the tail part of the patch myself.  Thanks.\n"}]}