diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-08-24 00:34:31 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-08-24 00:34:31 +0200 |
commit | 6133e4da549efbda98565163705af0781b096a4c (patch) | |
tree | c1927b6f9096f182bd48c66fb91e93c616f2b29e /builtin/checkout.c | |
parent | Merge branch 'maint' (diff) | |
parent | ls-files: fix pathspec display on error (diff) | |
download | git-6133e4da549efbda98565163705af0781b096a4c.tar.xz git-6133e4da549efbda98565163705af0781b096a4c.zip |
Merge branch 'cb/maint-ls-files-error-report'
* cb/maint-ls-files-error-report:
ls-files: fix pathspec display on error
Diffstat (limited to 'builtin/checkout.c')
-rw-r--r-- | builtin/checkout.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c index d647a31303..4eaedff0c4 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -201,7 +201,7 @@ static int checkout_merged(int pos, struct checkout *state) } static int checkout_paths(struct tree *source_tree, const char **pathspec, - struct checkout_opts *opts) + const char *prefix, struct checkout_opts *opts) { int pos; struct checkout state; @@ -231,7 +231,7 @@ static int checkout_paths(struct tree *source_tree, const char **pathspec, match_pathspec(pathspec, ce->name, ce_namelen(ce), 0, ps_matched); } - if (report_path_error(ps_matched, pathspec, 0)) + if (report_path_error(ps_matched, pathspec, prefix)) return 1; /* "checkout -m path" to recreate conflicted state */ @@ -1064,7 +1064,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix) if (1 < !!opts.writeout_stage + !!opts.force + !!opts.merge) die(_("git checkout: --ours/--theirs, --force and --merge are incompatible when\nchecking out of the index.")); - return checkout_paths(source_tree, pathspec, &opts); + return checkout_paths(source_tree, pathspec, prefix, &opts); } if (patch_mode) |