Thread (1 message) 1 message, 1 author, 2016-06-15

Re: possible bug in git apply?

From: David Kastrup <hidden>
Date: 2016-06-15 22:43:26

Junio C Hamano [off-list ref] writes:
Linus Torvalds [off-list ref] writes:
quoted
It should. I thought we did that, but maybe there's some bug there.

See "remove_file()" in builtin-apply.c.

But yeah, it seems that the file *rename* ends up not triggering that 
logic! Very annoying.

Does this fix it? Totally untested, but it _looks_ obvious enough..
That would regress the fix made in aea19457, I am afraid.  If
you are in a subdirectory and the rename patch moves away the
last file in your current directory, the shell session you ran
the git-apply from will end up in an unlinked directory.

Maybe that is a pilot error, and we can revert aea19457
altogether?
I'd call it pilot error.  We can't really have git's behavior depend
on where somebody might point his cwd.  If we do that, we may never
remove any directory.  Once git tracks directories, it will be harder
to make this particular pilot error (git rm ../mycwd is more obviously
having this effect than git rm *), but a pilot error it is in my book.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help