{"thread":{"id":"22572","subject":"git add -u nonexistent-file","startedAt":"2010-02-08T18:29:29Z","lastAt":"2010-02-10T05:57:27Z","messageCount":13,"participants":["SZEDER Gábor","Chris Packham","Jeff King","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"133937","messageId":"20100208182929.GB14355@neumann","threadId":"22572","inReplyTo":null,"subject":"git add -u nonexistent-file","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2010-02-08T18:29:29Z","receivedAt":"2010-02-08T18:29:29Z","isPatch":false,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"Hi,\n\n\n$ git --version\ngit version 1.7.0.rc1.84.g9879\n$ git add -u nonexistent-file\n$ echo $?\n0\n\nNo error message, no error in exit status.\n\nIs it OK this way?  Why?\n\n\nBest,\nGábor\n"},{"id":"133938","messageId":"a038bef51002081112s2d552835m4b34973f797ab4f8@mail.gmail.com","threadId":"22572","inReplyTo":"20100208182929.GB14355@neumann","subject":"Re: git add -u nonexistent-file","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2010-02-08T19:12:41Z","receivedAt":"2010-02-08T19:12:41Z","isPatch":false,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"2010/2/8 SZEDER Gábor <szeder@ira.uka.de>:\n> Hi,\n>\n>\n> $ git --version\n> git version 1.7.0.rc1.84.g9879\n> $ git add -u nonexistent-file\n> $ echo $?\n> 0\n>\n> No error message, no error in exit status.\n>\n> Is it OK this way?  Why?\n>\n>\n> Best,\n> Gábor\n>\n\nHi,\n\nI see the same behaviour with git version 1.6.4.2.\n\nFrom the man page of git-add\n\n-u, --update\n           Update only files that git already knows about, staging\nmodified content for\n           commit and marking deleted files for removal.\n\nSo git will only look at files that are already in the repository.\n\nIt looks like in the case you've highlighted git is ignoring the extra\nnon-option parameters on the command line. I'll let other people argue\nwhether this is by design or omission.\n\n'git add nonexistent-file' works as expected, exiting with an error\nmessage and non-zero exit status.\n"},{"id":"133974","messageId":"20100209003958.GA4065@coredump.intra.peff.net","threadId":"22572","inReplyTo":"a038bef51002081112s2d552835m4b34973f797ab4f8@mail.gmail.com","subject":"Re: git add -u nonexistent-file","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-02-09T00:39:58Z","receivedAt":"2010-02-09T00:39:58Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Feb 08, 2010 at 02:12:41PM -0500, Chris Packham wrote:\n\n> > $ git add -u nonexistent-file\n> > $ echo $?\n> > 0\n> [...]\n> It looks like in the case you've highlighted git is ignoring the extra\n> non-option parameters on the command line. I'll let other people argue\n> whether this is by design or omission.\n\nIt's not ignoring the extra parameters. They limit the scope of the\noperation. So:\n\n  $ git init\n  $ touch file && mkdir subdir && touch subdir/file\n  $ git add . && git commit -m one\n  $ echo changes >file && echo changes >subdir/file\n  $ git add -u subdir\n  $ git status\n  # On branch master\n  # Changes to be committed:\n  #       modified:   subdir/file\n  #\n  # Changed but not updated:\n  #       modified:   file\n  #\n\nThat being said, you noticed that the regular add case notes unused\npathspecs on the command line:\n\n  $ git add bogus\n  fatal: pathspec 'bogus' did not match any files\n\nWe could probably do the same here.\n\n-Peff\n"},{"id":"134039","messageId":"a038bef51002090643g23b35bb6xaa765ff13b80f5bb@mail.gmail.com","threadId":"22572","inReplyTo":"20100209003958.GA4065@coredump.intra.peff.net","subject":"Re: git add -u nonexistent-file","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2010-02-09T14:43:19Z","receivedAt":"2010-02-09T14:43:19Z","isPatch":false,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"On Mon, Feb 8, 2010 at 7:39 PM, Jeff King <peff@peff.net> wrote:\n> On Mon, Feb 08, 2010 at 02:12:41PM -0500, Chris Packham wrote:\n>\n>> > $ git add -u nonexistent-file\n>> > $ echo $?\n>> > 0\n>> [...]\n>> It looks like in the case you've highlighted git is ignoring the extra\n>> non-option parameters on the command line. I'll let other people argue\n>> whether this is by design or omission.\n>\n> It's not ignoring the extra parameters. They limit the scope of the\n> operation. So:\n>\n>  $ git init\n>  $ touch file && mkdir subdir && touch subdir/file\n>  $ git add . && git commit -m one\n>  $ echo changes >file && echo changes >subdir/file\n>  $ git add -u subdir\n>  $ git status\n>  # On branch master\n>  # Changes to be committed:\n>  #       modified:   subdir/file\n>  #\n>  # Changed but not updated:\n>  #       modified:   file\n>  #\n\nYep my bad. I tried the non-existent case but not the \"normal\" case.\nRe reading the man page it makes sense it just happens that the\n<filepattern> part scrolls off the top when I get to the -u part.\n\n> That being said, you noticed that the regular add case notes unused\n> pathspecs on the command line:\n>\n>  $ git add bogus\n>  fatal: pathspec 'bogus' did not match any files\n>\n> We could probably do the same here.\n\nI think so. By not having this error it led me to think \"OK it just\nthrows away the pathspec\". Gabor rightly thought that it does use it\nso shouldn't it be giving an error.\n\nIf I get brave enough I could attempt a patch but I wouldn't let that\ndissuade anyone that actually knows what they're doing from jumping in\nwith a patch.\n"},{"id":"134076","messageId":"1265751100-21558-1-git-send-email-judge.packham@gmail.com","threadId":"22572","inReplyTo":"a038bef51002090643g23b35bb6xaa765ff13b80f5bb@mail.gmail.com","subject":"[PATCH] test for add with non-existent pathspec","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2010-02-09T21:31:40Z","receivedAt":"2010-02-09T21:31:40Z","isPatch":true,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"Add a test for 'git add -u pathspec' and 'git add pathspec' where\npathspec does not exist. The expected result is that git add exits with\nan error message and an appropriate exit code.\n\nThis adds 1 expected failure to t/t2200-add-update.sh.\n\nSigned-off-by: Chris Packham <judge.packham@gmail.com>\n---\n\nIf anyone feels like pursuing this heres a patch to two simple tests around\nthis behaviour. I made an initial attempt to change builtin-add.c to print an\nerror message and set the exit code to a non-zero value but my naive attempt\nbroke the normal usage of 'git add pathspec'.\n\n t/t2200-add-update.sh |    5 +++++\n t/t3700-add.sh        |    5 +++++\n 2 files changed, 10 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh\nindex 9120750..dbabc3c 100755\n--- a/t/t2200-add-update.sh\n+++ b/t/t2200-add-update.sh\n@@ -176,4 +176,9 @@ test_expect_success 'add -u resolves unmerged paths' '\n \n '\n \n+test_expect_failure 'error out when attempting to add -u non-existent pathspec' '\n+\ttest_must_fail git add -u non-existent &&\n+\t! (git ls-files | grep \"non-existent\")\n+'\n+\n test_done\ndiff --git a/t/t3700-add.sh b/t/t3700-add.sh\nindex 85eb0fb..c77bb71 100755\n--- a/t/t3700-add.sh\n+++ b/t/t3700-add.sh\n@@ -255,4 +255,9 @@ test_expect_success 'git add to resolve conflicts on otherwise ignored path' '\n \tgit add track-this\n '\n \n+test_expect_success 'error out when attempting to add non-existent pathspec' '\n+\ttest_must_fail git add non-existent &&\n+\t! (git ls-files | grep \"non-existent\")\n+'\n+\n test_done\n-- \n1.6.4.2\n"},{"id":"134079","messageId":"7v7hqm2hs7.fsf@alter.siamese.dyndns.org","threadId":"22572","inReplyTo":"20100209003958.GA4065@coredump.intra.peff.net","subject":"Re: git add -u nonexistent-file","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-02-09T21:58:16Z","receivedAt":"2010-02-09T21:58:16Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> It's not ignoring the extra parameters. They limit the scope of the\n> operation. So:\n>\n>   $ git init\n>   $ touch file && mkdir subdir && touch subdir/file\n>   $ git add . && git commit -m one\n>   $ echo changes >file && echo changes >subdir/file\n>   $ git add -u subdir\n>   $ git status\n>   # On branch master\n>   # Changes to be committed:\n>   #       modified:   subdir/file\n>   #\n>   # Changed but not updated:\n>   #       modified:   file\n>   #\n>\n> That being said, you noticed that the regular add case notes unused\n> pathspecs on the command line:\n>\n>   $ git add bogus\n>   fatal: pathspec 'bogus' did not match any files\n>\n> We could probably do the same here.\n\nIt won't be entirely trivial to do so efficiently but it shouldn't be a\nrocket surgery.\n\nSomething like this (untested of course)?\n\n builtin-add.c |   38 +++++++++++++++++++++++++++++---------\n 1 files changed, 29 insertions(+), 9 deletions(-)\n\ndiff --git a/builtin-add.c b/builtin-add.c\nindex 2705f8d..87d2980 100644\n--- a/builtin-add.c\n+++ b/builtin-add.c\n@@ -117,7 +117,19 @@ static void fill_pathspec_matches(const char **pathspec, char *seen, int specs)\n \t}\n }\n \n-static void prune_directory(struct dir_struct *dir, const char **pathspec, int prefix)\n+static char *find_used_pathspec(const char **pathspec)\n+{\n+\tchar *seen;\n+\tint i;\n+\n+\tfor (i = 0; pathspec[i];  i++)\n+\t\t; /* just counting */\n+\tseen = xcalloc(i, 1);\n+\tfill_pathspec_matches(pathspec, seen, i);\n+\treturn seen;\n+}\n+\n+static char *prune_directory(struct dir_struct *dir, const char **pathspec, int prefix)\n {\n \tchar *seen;\n \tint i, specs;\n@@ -137,13 +149,7 @@ static void prune_directory(struct dir_struct *dir, const char **pathspec, int p\n \t}\n \tdir->nr = dst - dir->entries;\n \tfill_pathspec_matches(pathspec, seen, specs);\n-\n-\tfor (i = 0; i < specs; i++) {\n-\t\tif (!seen[i] && pathspec[i][0] && !file_exists(pathspec[i]))\n-\t\t\tdie(\"pathspec '%s' did not match any files\",\n-\t\t\t\t\tpathspec[i]);\n-\t}\n-        free(seen);\n+\treturn seen;\n }\n \n static void treat_gitlinks(const char **pathspec)\n@@ -359,6 +365,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)\n \tint flags;\n \tint add_new_files;\n \tint require_pathspec;\n+\tchar *seen = NULL;\n \n \tgit_config(add_config, NULL);\n \n@@ -418,7 +425,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)\n \t\t/* This picks up the paths that are not tracked */\n \t\tbaselen = fill_directory(&dir, pathspec);\n \t\tif (pathspec)\n-\t\t\tprune_directory(&dir, pathspec, baselen);\n+\t\t\tseen = prune_directory(&dir, pathspec, baselen);\n \t}\n \n \tif (refresh_only) {\n@@ -426,6 +433,19 @@ int cmd_add(int argc, const char **argv, const char *prefix)\n \t\tgoto finish;\n \t}\n \n+\tif (pathspec) {\n+\t\tint i;\n+\t\tif (!seen)\n+\t\t\tseen = find_used_pathspec(pathspec);\n+\t\tfor (i = 0; pathspec[i]; i++) {\n+\t\t\tif (!seen[i] && pathspec[i][0]\n+\t\t\t    && !file_exists(pathspec[i]))\n+\t\t\t\tdie(\"pathspec '%s' did not match any files\",\n+\t\t\t\t    pathspec[i]);\n+\t\t}\n+\t\tfree(seen);\n+\t}\n+\n \texit_status |= add_files_to_cache(prefix, pathspec, flags);\n \n \tif (add_new_files)\n"},{"id":"134081","messageId":"a038bef51002091417o1048c098x898517596115ed90@mail.gmail.com","threadId":"22572","inReplyTo":"7v7hqm2hs7.fsf@alter.siamese.dyndns.org","subject":"Re: git add -u nonexistent-file","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2010-02-09T22:17:54Z","receivedAt":"2010-02-09T22:17:54Z","isPatch":false,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"On Tue, Feb 9, 2010 at 4:58 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>\n> It won't be entirely trivial to do so efficiently but it shouldn't be a\n> rocket surgery.\n>\n> Something like this (untested of course)?\n>\n\nPasses my new test and all the rest in t2200-add-update.sh and t3700-add.sh.\n\nHows this for a commit message:\n\n  git add -u: give an error if pathspec unmatched\n\n  If a pathspec is supplied to 'git add -u' and no matching path is\n  matched, fail with an approriate error message and exit code.\n"},{"id":"134086","messageId":"1265754650-25438-1-git-send-email-judge.packham@gmail.com","threadId":"22572","inReplyTo":"a038bef51002091417o1048c098x898517596115ed90@mail.gmail.com","subject":"Re: git add -u nonexistent-file","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2010-02-09T22:30:47Z","receivedAt":"2010-02-09T22:30:47Z","isPatch":false,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"Heres the up to date series with Junios fix and my test. The two test patches\ncould be squashed together if we want to change the order.\n"},{"id":"134084","messageId":"1265754650-25438-2-git-send-email-judge.packham@gmail.com","threadId":"22572","inReplyTo":"1265754650-25438-1-git-send-email-judge.packham@gmail.com","subject":"[PATCH 1/3] test for add with non-existent pathspec","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2010-02-09T22:30:48Z","receivedAt":"2010-02-09T22:30:48Z","isPatch":true,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"Add a test for 'git add -u pathspec' and 'git add pathspec' where\npathspec does not exist. The expected result is that git add exits with\nan error message and an appropriate exit code.\n\nThis adds 1 expected failure to t/t2200-add-update.sh.\n\nSigned-off-by: Chris Packham <judge.packham@gmail.com>\n---\n t/t2200-add-update.sh |    5 +++++\n t/t3700-add.sh        |    5 +++++\n 2 files changed, 10 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh\nindex 9120750..dbabc3c 100755\n--- a/t/t2200-add-update.sh\n+++ b/t/t2200-add-update.sh\n@@ -176,4 +176,9 @@ test_expect_success 'add -u resolves unmerged paths' '\n \n '\n \n+test_expect_failure 'error out when attempting to add -u non-existent pathspec' '\n+\ttest_must_fail git add -u non-existent &&\n+\t! (git ls-files | grep \"non-existent\")\n+'\n+\n test_done\ndiff --git a/t/t3700-add.sh b/t/t3700-add.sh\nindex 85eb0fb..c77bb71 100755\n--- a/t/t3700-add.sh\n+++ b/t/t3700-add.sh\n@@ -255,4 +255,9 @@ test_expect_success 'git add to resolve conflicts on otherwise ignored path' '\n \tgit add track-this\n '\n \n+test_expect_success 'error out when attempting to add non-existent pathspec' '\n+\ttest_must_fail git add non-existent &&\n+\t! (git ls-files | grep \"non-existent\")\n+'\n+\n test_done\n-- \n1.6.4.2\n"},{"id":"134085","messageId":"1265754650-25438-3-git-send-email-judge.packham@gmail.com","threadId":"22572","inReplyTo":"1265754650-25438-2-git-send-email-judge.packham@gmail.com","subject":"[PATCH 2/3] git add -u: give an error if pathspec unmatched","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2010-02-09T22:30:49Z","receivedAt":"2010-02-09T22:30:49Z","isPatch":true,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"From: Junio C Hamano <gitster@pobox.com>\n\nIf a pathspec is supplied to 'git add -u' and no matching path is\nmatched, fail with an approriate error message and exit code.\n\nTested-by: Chris Packham <judge.packham@gmail.com>\n---\n builtin-add.c |   38 +++++++++++++++++++++++++++++---------\n 1 files changed, 29 insertions(+), 9 deletions(-)\n\ndiff --git a/builtin-add.c b/builtin-add.c\nindex 2705f8d..87d2980 100644\n--- a/builtin-add.c\n+++ b/builtin-add.c\n@@ -117,7 +117,19 @@ static void fill_pathspec_matches(const char **pathspec, char *seen, int specs)\n \t}\n }\n \n-static void prune_directory(struct dir_struct *dir, const char **pathspec, int prefix)\n+static char *find_used_pathspec(const char **pathspec)\n+{\n+\tchar *seen;\n+\tint i;\n+\n+\tfor (i = 0; pathspec[i];  i++)\n+\t\t; /* just counting */\n+\tseen = xcalloc(i, 1);\n+\tfill_pathspec_matches(pathspec, seen, i);\n+\treturn seen;\n+}\n+\n+static char *prune_directory(struct dir_struct *dir, const char **pathspec, int prefix)\n {\n \tchar *seen;\n \tint i, specs;\n@@ -137,13 +149,7 @@ static void prune_directory(struct dir_struct *dir, const char **pathspec, int p\n \t}\n \tdir->nr = dst - dir->entries;\n \tfill_pathspec_matches(pathspec, seen, specs);\n-\n-\tfor (i = 0; i < specs; i++) {\n-\t\tif (!seen[i] && pathspec[i][0] && !file_exists(pathspec[i]))\n-\t\t\tdie(\"pathspec '%s' did not match any files\",\n-\t\t\t\t\tpathspec[i]);\n-\t}\n-        free(seen);\n+\treturn seen;\n }\n \n static void treat_gitlinks(const char **pathspec)\n@@ -359,6 +365,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)\n \tint flags;\n \tint add_new_files;\n \tint require_pathspec;\n+\tchar *seen = NULL;\n \n \tgit_config(add_config, NULL);\n \n@@ -418,7 +425,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)\n \t\t/* This picks up the paths that are not tracked */\n \t\tbaselen = fill_directory(&dir, pathspec);\n \t\tif (pathspec)\n-\t\t\tprune_directory(&dir, pathspec, baselen);\n+\t\t\tseen = prune_directory(&dir, pathspec, baselen);\n \t}\n \n \tif (refresh_only) {\n@@ -426,6 +433,19 @@ int cmd_add(int argc, const char **argv, const char *prefix)\n \t\tgoto finish;\n \t}\n \n+\tif (pathspec) {\n+\t\tint i;\n+\t\tif (!seen)\n+\t\t\tseen = find_used_pathspec(pathspec);\n+\t\tfor (i = 0; pathspec[i]; i++) {\n+\t\t\tif (!seen[i] && pathspec[i][0]\n+\t\t\t    && !file_exists(pathspec[i]))\n+\t\t\t\tdie(\"pathspec '%s' did not match any files\",\n+\t\t\t\t    pathspec[i]);\n+\t\t}\n+\t\tfree(seen);\n+\t}\n+\n \texit_status |= add_files_to_cache(prefix, pathspec, flags);\n \n \tif (add_new_files)\n-- \n1.6.4.2\n"},{"id":"134087","messageId":"1265754650-25438-4-git-send-email-judge.packham@gmail.com","threadId":"22572","inReplyTo":"1265754650-25438-3-git-send-email-judge.packham@gmail.com","subject":"[PATCH 3/3] t2200-add-update.sh: change expected fail to success","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2010-02-09T22:30:50Z","receivedAt":"2010-02-09T22:30:50Z","isPatch":true,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"This changes the test added in bb73e5c to an expected success now that\nJunio has supplied a fix.\n\nSigned-off-by: Chris Packham <judge.packham@gmail.com>\n---\n t/t2200-add-update.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh\nindex dbabc3c..6302137 100755\n--- a/t/t2200-add-update.sh\n+++ b/t/t2200-add-update.sh\n@@ -176,7 +176,7 @@ test_expect_success 'add -u resolves unmerged paths' '\n \n '\n \n-test_expect_failure 'error out when attempting to add -u non-existent pathspec' '\n+test_expect_success 'error out when attempting to add -u non-existent pathspec' '\n \ttest_must_fail git add -u non-existent &&\n \t! (git ls-files | grep \"non-existent\")\n '\n-- \n1.6.4.2\n"},{"id":"134092","messageId":"7vy6j2vw08.fsf@alter.siamese.dyndns.org","threadId":"22572","inReplyTo":"a038bef51002091417o1048c098x898517596115ed90@mail.gmail.com","subject":"Re: git add -u nonexistent-file","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-02-09T23:18:15Z","receivedAt":"2010-02-09T23:18:15Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Chris Packham <judge.packham@gmail.com> writes:\n\n> On Tue, Feb 9, 2010 at 4:58 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>>\n>> It won't be entirely trivial to do so efficiently but it shouldn't be a\n>> rocket surgery.\n>>\n>> Something like this (untested of course)?\n>>\n>\n> Passes my new test and all the rest in t2200-add-update.sh and t3700-add.sh.\n\nThanks; will squash two tests into one.\n"},{"id":"134126","messageId":"20100210055727.GH28526@coredump.intra.peff.net","threadId":"22572","inReplyTo":"7v7hqm2hs7.fsf@alter.siamese.dyndns.org","subject":"Re: git add -u nonexistent-file","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-02-10T05:57:27Z","receivedAt":"2010-02-10T05:57:27Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Feb 09, 2010 at 01:58:16PM -0800, Junio C Hamano wrote:\n\n> > That being said, you noticed that the regular add case notes unused\n> > pathspecs on the command line:\n> >\n> >   $ git add bogus\n> >   fatal: pathspec 'bogus' did not match any files\n> >\n> > We could probably do the same here.\n> \n> It won't be entirely trivial to do so efficiently but it shouldn't be a\n> rocket surgery.\n> \n> Something like this (untested of course)?\n\nLooks like Chris gave it some basic testing. I read over the patch\nitself, and it looks sane to me.\n\n-Peff\n"}]}