1
0
mirror of https://github.com/git/git.git synced 2024-10-20 23:58:49 +02:00
git/builtin
Matthieu Moy bca3969534 checkout: proper error message on 'git checkout foo bar --'
The previous code was detecting the presence of "--" by looking only at
argument 1. As a result, "git checkout foo bar --" was interpreted as an
ambiguous file/revision list, and errored out with:

error: pathspec 'foo' did not match any file(s) known to git.
error: pathspec 'bar' did not match any file(s) known to git.
error: pathspec '--' did not match any file(s) known to git.

This patch fixes it by walking through the argument list to find the
"--", and now complains about the number of references given.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-18 12:57:16 -07:00
..
add.c Merge branch 'jc/add-ignore-removal' 2013-04-26 15:28:09 -07:00
annotate.c
apply.c update URL to the marc.info mail archive 2013-07-22 10:11:18 -07:00
archive.c pkt-line: provide a LARGE_PACKET_MAX static buffer 2013-02-20 13:42:22 -08:00
bisect--helper.c
blame.c Merge branch 'nd/pretty-formats' 2013-04-23 11:22:48 -07:00
branch.c branch: colour upstream branches 2013-04-15 11:04:44 -07:00
bundle.c
cat-file.c cat-file: print tags raw for "cat-file -p" 2013-04-17 14:48:45 -07:00
check-attr.c
check-ignore.c dir.c: git-status --ignored: don't scan the work tree twice 2013-04-15 12:36:42 -07:00
check-ref-format.c
checkout-index.c
checkout.c checkout: proper error message on 'git checkout foo bar --' 2013-10-18 12:57:16 -07:00
clean.c Merge branch 'as/check-ignore' 2013-01-23 21:19:10 -08:00
clone.c clone: let the user know when check_everything_connected is run 2013-05-11 10:28:54 -07:00
column.c
commit-tree.c commit-tree: document -S option consistently 2013-03-25 15:01:22 -07:00
commit.c Merge branch 'rs/commit-m-no-edit' into maint 2013-06-27 14:38:07 -07:00
config.c config: allow inaccessible configuration under $HOME 2013-04-15 07:26:50 -07:00
count-objects.c count-objects: add -H option to humanize sizes 2013-04-10 13:27:26 -07:00
credential.c
describe.c Merge branch 'jc/describe' into maint 2013-04-03 09:25:52 -07:00
diff-files.c
diff-index.c
diff-tree.c
diff.c
fast-export.c fast-export: add --signed-tags=warn-strip mode 2013-04-15 09:02:25 -07:00
fetch-pack.c Merge branch 'jk/pkt-line-cleanup' 2013-04-01 08:59:37 -07:00
fetch.c Merge branch 'jk/gc-auto-after-fetch' 2013-02-01 12:40:16 -08:00
fmt-merge-msg.c Merge branch 'rt/commentchar-fmt-merge-msg' into maint 2013-04-26 11:10:47 -07:00
for-each-ref.c
fsck.c
gc.c
grep.c Sync with 1.8.1 maintenance track 2013-04-03 09:18:01 -07:00
hash-object.c
help.c Merge branch 'ph/builtin-srcs-are-in-subdir-these-days' into maint 2013-07-21 22:51:29 -07:00
index-pack.c Merge branch 'nd/index-pack-threaded-fixes' into maint 2013-04-04 13:00:41 -07:00
init-db.c
log.c Merge branch 'rr/shortlog-doc' 2013-04-26 15:28:39 -07:00
ls-files.c use logical OR (||) instead of binary OR (|) in logical context 2013-06-13 14:47:07 -07:00
ls-remote.c
ls-tree.c
mailinfo.c
mailsplit.c mailsplit: sort maildir filenames more cleverly 2013-03-02 22:52:44 -08:00
merge-base.c use logical OR (||) instead of binary OR (|) in logical context 2013-06-13 14:47:07 -07:00
merge-file.c
merge-index.c
merge-ours.c
merge-recursive.c
merge-tree.c merge-tree: handle directory/empty conflict correctly 2013-05-06 22:17:00 -07:00
merge.c merge: use help_unknown_ref() 2013-05-08 15:34:33 -07:00
mktag.c
mktree.c
mv.c
name-rev.c
notes.c Merge branch 'ph/builtin-srcs-are-in-subdir-these-days' into maint 2013-07-21 22:51:29 -07:00
pack-objects.c
pack-redundant.c
pack-refs.c
patch-id.c
prune-packed.c
prune.c Merge branch 'jk/fully-peeled-packed-ref' into maint-1.8.1 2013-04-03 08:43:03 -07:00
push.c push: make push.default = current use resolved HEAD 2013-05-29 15:34:07 -07:00
read-tree.c
receive-pack.c Merge branch 'jk/receive-pack-deadlocks-with-early-failure' into maint 2013-04-26 11:12:17 -07:00
reflog.c Merge branch 'jc/maint-reflog-expire-clean-mark-typofix' into maint 2013-03-26 12:39:51 -07:00
remote-ext.c
remote-fd.c
remote.c remote: check for superfluous arguments in 'git remote add' 2013-04-24 13:12:51 -07:00
replace.c fix "builtin-*" references to be "builtin/*" 2013-06-18 11:05:51 -07:00
rerere.c
reset.c reset: update documentation to require only tree-ish with paths 2013-01-16 12:50:23 -08:00
rev-list.c
rev-parse.c
revert.c cherry-pick/revert: make usage say '<commit-ish>...' 2013-04-24 09:48:01 -07:00
rm.c rm: do not complain about d/f conflicts during deletion 2013-04-04 12:28:47 -07:00
send-pack.c teach get_remote_heads to read from a memory buffer 2013-02-24 00:17:38 -08:00
shortlog.c builtin/shortlog.c: make usage string consistent with log 2013-04-22 08:00:54 -07:00
show-branch.c show-branch: use strbuf instead of static buffer 2013-04-06 18:57:15 -07:00
show-ref.c
stripspace.c Allow custom "comment char" 2013-01-16 12:48:22 -08:00
symbolic-ref.c
tag.c Merge branch 'ph/tag-force-no-warn-on-creation' into maint 2013-04-03 09:24:51 -07:00
tar-tree.c
unpack-file.c
unpack-objects.c
update-index.c update-index: allow "-h" to also display options 2013-02-23 23:49:33 -08:00
update-ref.c
update-server-info.c
upload-archive.c pkt-line: provide a LARGE_PACKET_MAX static buffer 2013-02-20 13:42:22 -08:00
var.c
verify-pack.c
verify-tag.c gpg_interface: allow to request status return 2013-02-14 09:30:04 -08:00
write-tree.c