summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 67c08ce)
raw | patch | inline | side by side (parent: 67c08ce)
author | Andreas Ericsson <ae@op5.se> | |
Thu, 30 Nov 2006 11:28:28 +0000 (12:28 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 2 Dec 2006 05:55:45 +0000 (21:55 -0800) |
Without this patch "git commit file.c file2.c" produces the not
so stellar output:
error: pathspec 'file.c' did not match any.
error: pathspec 'file2.c' did not match any.
With this patch, the output is changed to:
error: pathspec 'file.c' did not match any file(s) known to git.
error: pathspec 'file2.c' did not match any file(s) known to git.
Did you forget to 'git add'?
Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
so stellar output:
error: pathspec 'file.c' did not match any.
error: pathspec 'file2.c' did not match any.
With this patch, the output is changed to:
error: pathspec 'file.c' did not match any file(s) known to git.
error: pathspec 'file2.c' did not match any file(s) known to git.
Did you forget to 'git add'?
Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-ls-files.c | patch | blob | history |
diff --git a/builtin-ls-files.c b/builtin-ls-files.c
index ad8c41e7310032c7a868ecb6a87e542af799c361..bc79ce40fc87b7a77d22f2fea85f2198102fcb67 100644 (file)
--- a/builtin-ls-files.c
+++ b/builtin-ls-files.c
for (num = 0; pathspec[num]; num++) {
if (ps_matched[num])
continue;
- error("pathspec '%s' did not match any.",
+ error("pathspec '%s' did not match any file(s) known to git.",
pathspec[num] + prefix_offset);
errors++;
}
+
+ if (errors)
+ fprintf(stderr, "Did you forget to 'git add'?\n");
+
return errors ? 1 : 0;
}