Merge branch 'jc/setup'

* jc/setup:
  builtin-mv: minimum fix to avoid losing files
  git-add: adjust to the get_pathspec() changes.
  Make blame accept absolute paths
  setup: sanitize absolute and funny paths in get_pathspec()
This commit is contained in:
Junio C Hamano
2008-02-20 16:13:16 -08:00
7 changed files with 352 additions and 53 deletions

View File

@ -574,8 +574,17 @@ 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 (pathspec) {
if (argc != i) {
int cnt;
for (cnt = 0; pathspec[cnt]; cnt++)
;
if (cnt != (argc - i))
exit(1); /* error message already given */
}
prefix = verify_pathspec(prefix);
} else if (argc != i)
exit(1); /* error message already given */
/* Treat unmatching pathspec elements as errors */
if (pathspec && error_unmatch) {