1
0
mirror of https://github.com/git/git.git synced 2024-09-28 23:11:39 +02:00
git/builtin
Jeff King 9a6728d4d1 rm: do not complain about d/f conflicts during deletion
If we used to have an index entry "d/f", but "d" has been
replaced by a non-directory entry, the user may still want
to run "git rm" to delete the stale index entry. They could
use "git rm --cached" to just touch the index, but "git rm"
should also work: we explicitly try to handle the case that
the file has already been removed from the working tree.

However, because unlinking "d/f" in this case will not yield
ENOENT, but rather ENOTDIR, we do not notice that the file
is already gone. Instead, we report it as an error.

The simple solution is to treat ENOTDIR in this case exactly
like ENOENT; all we want to know is whether the file is
already gone, and if a leading path is no longer a
directory, then by definition the sub-path is gone.

Reported-by: jpinheiro <7jpinheiro@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-04 12:28:47 -07:00
..
add.c add: update pathless 'add [-u|-A]' warning to reflect change of plan 2013-03-11 07:57:35 -07:00
annotate.c
apply.c Merge branch 'jk/apply-similaritly-parsing' into maint 2013-02-25 08:03:44 -08:00
archive.c
bisect--helper.c
blame.c logmsg_reencode: lazily load missing commit buffers 2013-01-26 13:28:22 -08:00
branch.c Merge branch 'nd/branch-error-cases' into maint 2013-03-26 12:43:05 -07:00
bundle.c
cat-file.c cat-file: Fix an gcc -Wuninitialized warning 2013-03-29 23:47:00 -07:00
check-attr.c
check-ignore.c name-hash: allow hashing an empty string 2013-02-19 14:00:12 -08:00
check-ref-format.c
checkout-index.c
checkout.c checkout: print a message when switching unborn branches 2012-11-15 17:36:26 -08:00
clean.c Merge branch 'as/check-ignore' 2013-01-23 21:19:10 -08:00
clone.c Merge branch 'nd/clone-no-separate-git-dir-with-bare' into maint 2013-02-25 08:03:27 -08:00
column.c
commit-tree.c
commit.c git-commit: only append a newline to -m mesg if necessary 2013-02-19 09:30:50 -08:00
config.c Merge branch 'cn/config-missing-path' into maint 2012-11-25 18:35:46 -08:00
count-objects.c
credential.c
describe.c Merge branch 'jc/describe' into maint 2013-04-03 09:25:52 -07:00
diff-files.c
diff-index.c update-index/diff-index: use core.preloadindex to improve performance 2012-11-02 11:38:29 -04:00
diff-tree.c
diff.c Merge branch 'kb/preload-index-more' 2012-11-20 10:32:10 -08:00
fast-export.c fast-export: make sure updated refs get updated 2012-12-03 09:57:16 -08:00
fetch-pack.c fetch-pack: avoid repeatedly re-scanning pack directory 2013-01-26 19:37:30 -08:00
fetch.c Merge branch 'jk/gc-auto-after-fetch' 2013-02-01 12:40:16 -08:00
fmt-merge-msg.c Merge branch 'mg/gpg-interface-using-status' into maint 2013-04-03 09:26:27 -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 'jk/config-parsing-cleanup' 2013-02-04 10:24:50 -08:00
index-pack.c index-pack: fix buffer overflow caused by translations 2013-03-16 22:08:53 -07:00
init-db.c
log.c Merge branch 'ap/log-mailmap' 2013-01-20 17:06:53 -08:00
ls-files.c Merge branch 'as/check-ignore' 2013-01-23 21:19:10 -08:00
ls-remote.c
ls-tree.c pathspec: save the non-wildcard length part 2012-11-19 13:08:28 -08:00
mailinfo.c Merge branch 'jc/same-encoding' into maint 2012-12-07 14:10:56 -08:00
mailsplit.c mailsplit: sort maildir filenames more cleverly 2013-03-02 22:52:44 -08:00
merge-base.c
merge-file.c
merge-index.c Which merge_file() function do you mean? 2012-12-09 23:05:27 -08:00
merge-ours.c
merge-recursive.c
merge-tree.c merge-tree: fix typo in merge-tree.c::unresolved 2013-03-27 10:00:50 -07:00
merge.c Merge branch 'jc/custom-comment-char' 2013-02-04 10:23:49 -08:00
mktag.c
mktree.c
mv.c
name-rev.c
notes.c Allow custom "comment char" 2013-01-16 12:48:22 -08:00
pack-objects.c
pack-redundant.c Fix sizeof usage in get_permutations 2012-12-13 11:13:44 -08:00
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 Merge branch 'jc/push-reject-reasons' 2013-02-04 10:25:04 -08:00
read-tree.c
receive-pack.c Merge branch 'jc/hidden-refs' 2013-02-17 15:25:57 -08: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 Fix typo in remote set-head usage 2012-11-26 13:27:45 -08:00
replace.c replace: parse revision argument for -d 2012-11-13 08:34:14 -05: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 Move print_commit_list to libgit.a 2012-10-29 03:08:30 -04:00
rev-parse.c
revert.c
rm.c rm: do not complain about d/f conflicts during deletion 2013-04-04 12:28:47 -07:00
send-pack.c push: introduce REJECT_FETCH_FIRST and REJECT_NEEDS_FORCE 2013-01-24 14:37:23 -08:00
shortlog.c Merge branch 'ap/log-mailmap' 2013-01-20 17:06:53 -08:00
show-branch.c
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
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