aboutsummaryrefslogtreecommitdiff
path: root/builtin-ls-files.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-03-08 21:29:56 -0800
committerJunio C Hamano <gitster@pobox.com>2008-03-08 21:29:56 -0800
commit175f5595511b047a320e5c6163c642ac1fc34681 (patch)
treef66169a0750929b474716969b2ba5b7a885a0ebc /builtin-ls-files.c
parent0ae496ccd85e121c01bddfdfc1a68aced04f79ff (diff)
parent5b7570cfb41c34ce585ede3fc1e45fa48febbd8f (diff)
downloadgit-175f5595511b047a320e5c6163c642ac1fc34681.tar.gz
git-175f5595511b047a320e5c6163c642ac1fc34681.tar.xz
Merge branch 'dp/clean-fix'
* dp/clean-fix: git-clean: add tests for relative path git-clean: correct printing relative path Make private quote_path() in wt-status.c available as quote_path_relative() Revert part of d089eba (setup: sanitize absolute and funny paths in get_pathspec()) Revert part of 1abf095 (git-add: adjust to the get_pathspec() changes) Revert part of 744dacd (builtin-mv: minimum fix to avoid losing files) get_pathspec(): die when an out-of-tree path is given
Diffstat (limited to 'builtin-ls-files.c')
-rw-r--r--builtin-ls-files.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/builtin-ls-files.c b/builtin-ls-files.c
index 25dbfb449..dc7eab89b 100644
--- a/builtin-ls-files.c
+++ b/builtin-ls-files.c
@@ -574,17 +574,8 @@ int cmd_ls_files(int argc, const char **argv, const char *prefix)
pathspec = get_pathspec(prefix, argv + i);
/* Verify that the pathspec matches the prefix */
- if (pathspec) {
- if (argc != i) {
- int cnt;
- for (cnt = 0; pathspec[cnt]; cnt++)
- ;
- if (cnt != (argc - i))
- exit(1); /* error message already given */
- }
+ if (pathspec)
prefix = verify_pathspec(prefix);
- } else if (argc != i)
- exit(1); /* error message already given */
/* Treat unmatching pathspec elements as errors */
if (pathspec && error_unmatch) {