1
0
mirror of https://github.com/git/git.git synced 2024-09-25 05:11:34 +02:00
git/builtin
John Keeping 2c63d6eb46 reset: handle submodule with trailing slash
When using tab-completion, a directory path will often end with a
trailing slash which currently confuses "git reset" when dealing with
submodules.  Now that we have parse_pathspec we can easily handle this
by simply adding the PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAP flag.

To do this, we need to move the read_cache() call before the
parse_pathspec() call.  All of the existing paths through cmd_reset()
that do not die early already call read_cache() at some point, so there
is no performance impact to doing this in the common case.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-13 12:37:35 -07:00
..
add.c Merge branch 'nd/magic-pathspec' 2013-09-09 14:50:44 -07:00
annotate.c
apply.c Replace deprecated OPT_BOOLEAN by OPT_BOOL 2013-08-05 11:32:19 -07:00
archive.c
bisect--helper.c Replace deprecated OPT_BOOLEAN by OPT_BOOL 2013-08-05 11:32:19 -07:00
blame.c Merge branch 'jl/submodule-mv' 2013-09-09 14:36:15 -07:00
branch.c branch, commit, name-rev: ease up boolean conditions 2013-08-07 08:30:30 -07:00
bundle.c
cat-file.c cat-file: only split on whitespace when %(rest) is used 2013-08-05 09:30:48 -07:00
check-attr.c Merge branch 'sb/parseopt-boolean-removal' 2013-09-04 12:39:03 -07:00
check-ignore.c Merge branch 'jl/submodule-mv' 2013-09-09 14:36:15 -07:00
check-mailmap.c builtin: add git-check-mailmap command 2013-07-13 10:19:37 -07:00
check-ref-format.c
checkout-index.c checkout-index: fix negations of even numbers of -n 2013-08-07 08:37:02 -07:00
checkout.c Merge branch 'nd/magic-pathspec' 2013-09-09 14:50:44 -07:00
clean.c Merge branch 'jl/submodule-mv' 2013-09-09 14:36:15 -07:00
clone.c Replace deprecated OPT_BOOLEAN by OPT_BOOL 2013-08-05 11:32:19 -07:00
column.c
commit-tree.c
commit.c Merge branch 'jl/submodule-mv' 2013-09-09 14:36:15 -07:00
config.c Merge branch 'jc/url-match' 2013-09-09 14:50:36 -07:00
count-objects.c
credential.c
describe.c Replace deprecated OPT_BOOLEAN by OPT_BOOL 2013-08-05 11:32:19 -07:00
diff-files.c convert read_cache_preload() to take struct pathspec 2013-07-15 10:56:08 -07:00
diff-index.c convert read_cache_preload() to take struct pathspec 2013-07-15 10:56:08 -07:00
diff-tree.c
diff.c pathspec: support :(literal) syntax for noglob pathspec 2013-07-15 10:56:09 -07:00
fast-export.c Merge branch 'sb/parseopt-boolean-removal' 2013-09-04 12:39:03 -07:00
fetch-pack.c Merge branch 'jc/push-cas' 2013-09-09 14:30:29 -07:00
fetch.c Merge branch 'jc/transport-do-not-use-connect-twice-in-fetch' 2013-09-09 14:50:37 -07:00
fmt-merge-msg.c
for-each-ref.c for-each-ref, quote: convert *_quote_print -> *_quote_buf 2013-07-30 08:06:27 -07:00
fsck.c Replace deprecated OPT_BOOLEAN by OPT_BOOL 2013-08-05 11:32:19 -07:00
gc.c Merge branch 'sb/parseopt-boolean-removal' 2013-09-04 12:39:03 -07:00
grep.c Merge branch 'jl/submodule-mv' 2013-09-09 14:36:15 -07:00
hash-object.c hash-object: replace stdin parsing OPT_BOOLEAN by OPT_COUNTUP 2013-08-07 08:30:55 -07:00
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 clone: open a shortcut for connectivity check 2013-05-28 08:07:20 -07:00
init-db.c
log.c Merge branch 'jl/submodule-mv' 2013-09-09 14:36:15 -07:00
ls-files.c Merge branch 'jl/submodule-mv' 2013-09-09 14:36:15 -07:00
ls-remote.c
ls-tree.c Merge branch 'jl/submodule-mv' 2013-09-09 14:36:15 -07:00
mailinfo.c
mailsplit.c
merge-base.c Replace deprecated OPT_BOOLEAN by OPT_BOOL 2013-08-05 11:32:19 -07:00
merge-file.c Replace deprecated OPT_BOOLEAN by OPT_BOOL 2013-08-05 11:32:19 -07:00
merge-index.c Convert "struct cache_entry *" to "const ..." wherever possible 2013-07-09 09:12:48 -07:00
merge-ours.c
merge-recursive.c
merge-tree.c
merge.c Replace deprecated OPT_BOOLEAN by OPT_BOOL 2013-08-05 11:32:19 -07:00
mktag.c
mktree.c
mv.c Merge branch 'jl/submodule-mv' 2013-09-09 14:36:15 -07:00
name-rev.c branch, commit, name-rev: ease up boolean conditions 2013-08-07 08:30:30 -07:00
notes.c Replace deprecated OPT_BOOLEAN by OPT_BOOL 2013-08-05 11:32:19 -07:00
pack-objects.c Don't close pack fd when free'ing pack windows 2013-08-02 09:27:26 -07:00
pack-redundant.c
pack-refs.c
patch-id.c
prune-packed.c prune-packed: avoid implying "1" is DRY_RUN in prune_packed_objects() 2013-05-28 09:20:54 -07:00
prune.c Merge branch 'nd/prune-packed-dryrun-verbose' 2013-06-06 12:17:52 -07:00
push.c Merge branch 'jc/push-cas' 2013-09-09 14:30:29 -07:00
read-tree.c diff-lib, read-tree, unpack-trees: mark cache_entry array paramters const 2013-06-02 15:31:14 -07:00
receive-pack.c cache.h: move remote/connect API out of it 2013-07-08 14:34:24 -07:00
reflog.c Merge branch 'jc/prune-all' 2013-05-29 14:23:04 -07:00
remote-ext.c
remote-fd.c
remote.c Replace deprecated OPT_BOOLEAN by OPT_BOOL 2013-08-05 11:32:19 -07:00
replace.c Replace deprecated OPT_BOOLEAN by OPT_BOOL 2013-08-05 11:32:19 -07:00
rerere.c rerere: convert to use parse_pathspec 2013-07-15 10:56:07 -07:00
reset.c reset: handle submodule with trailing slash 2013-09-13 12:37:35 -07:00
rev-list.c pretty: --format output should honor logOutputEncoding 2013-06-26 11:40:31 -07:00
rev-parse.c Merge branch 'sb/parseopt-boolean-removal' 2013-09-04 12:39:03 -07:00
revert.c revert: use the OPT_CMDMODE for parsing, reducing code 2013-08-07 08:37:12 -07:00
rm.c rm: re-use parse_pathspec's trailing-slash removal 2013-09-13 12:37:35 -07:00
send-pack.c send-pack: fix parsing of --force-with-lease option 2013-08-02 16:07:45 -07:00
shortlog.c Replace deprecated OPT_BOOLEAN by OPT_BOOL 2013-08-05 11:32:19 -07:00
show-branch.c Replace deprecated OPT_BOOLEAN by OPT_BOOL 2013-08-05 11:32:19 -07:00
show-ref.c Replace deprecated OPT_BOOLEAN by OPT_BOOL 2013-08-05 11:32:19 -07:00
stripspace.c
symbolic-ref.c
tag.c Replace deprecated OPT_BOOLEAN by OPT_BOOL 2013-08-05 11:32:19 -07:00
tar-tree.c tar-tree: remove dependency on sq_quote_print() 2013-07-30 08:10:35 -07:00
unpack-file.c
unpack-objects.c
update-index.c Merge branch 'jl/submodule-mv' 2013-09-09 14:36:15 -07:00
update-ref.c Replace deprecated OPT_BOOLEAN by OPT_BOOL 2013-08-05 11:32:19 -07:00
update-server-info.c
upload-archive.c
var.c
verify-pack.c
verify-tag.c
write-tree.c