From: Junio C Hamano <gitster@pobox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: david@lang.hm, git@vger.kernel.org, rob@landley.net
Subject: Re: possible bug in git apply?
Date: Mon, 06 Aug 2007 01:29:46 -0700 [thread overview]
Message-ID: <7vabt5dq11.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <alpine.LFD.0.999.0708050949220.5037@woody.linux-foundation.org> (Linus Torvalds's message of "Sun, 5 Aug 2007 09:59:03 -0700 (PDT)")
Linus Torvalds <torvalds@linux-foundation.org> writes:
> That said, if we really wanted to get it right, we should do this as a
> three-phase thing: (1) remove old files (2) create new files (3) for all
> removals and renames, try to remove source directories that might have
> become empty.
>
> That would fix it properly and for all cases.
Actually that will break the case of removing foo/bar, which is
the only file in directory foo, and creating a new file foo. So
if we really want to do all the corner cases, we would need to
do something like:
* scan the list of files that will remain (i.e., renamed-to,
modifed-in-place and created-anew) to note which directories
should remain in the result;
* remove old files, and remove its empty parent directories
that are not in the above list;
* create new files.
But in the meantime for 1.5.3, I think your patch is better than
what we currently have.
next prev parent reply other threads:[~2007-08-06 8:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-04 19:45 possible bug in git apply? david
2007-08-04 20:00 ` Junio C Hamano
2007-08-04 20:08 ` David Kastrup
2007-08-05 4:48 ` Linus Torvalds
2007-08-05 4:53 ` Linus Torvalds
2007-08-05 5:11 ` Junio C Hamano
2007-08-05 7:55 ` David Kastrup
2007-08-05 16:59 ` Linus Torvalds
2007-08-05 17:53 ` David Kastrup
2007-08-05 18:18 ` Linus Torvalds
2007-08-05 18:50 ` David Kastrup
2007-08-05 19:20 ` Linus Torvalds
2007-08-05 19:37 ` David Kastrup
2007-08-06 8:29 ` Junio C Hamano [this message]
2007-08-06 9:37 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vabt5dq11.fsf@assigned-by-dhcp.cox.net \
--to=gitster@pobox.com \
--cc=david@lang.hm \
--cc=git@vger.kernel.org \
--cc=rob@landley.net \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.