aboutsummaryrefslogtreecommitdiff
path: root/builtin/checkout.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-08-23 15:34:31 -0700
committerJunio C Hamano <gitster@pobox.com>2011-08-23 15:34:31 -0700
commit6133e4da549efbda98565163705af0781b096a4c (patch)
treec1927b6f9096f182bd48c66fb91e93c616f2b29e /builtin/checkout.c
parentd0b46502de2893a121427b94321a2bfc8cffde27 (diff)
parent0f64bfa9567f697d6152ef9ea937d4b573029a08 (diff)
downloadgit-6133e4da549efbda98565163705af0781b096a4c.tar.gz
git-6133e4da549efbda98565163705af0781b096a4c.tar.xz
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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index d647a3130..4eaedff0c 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)