git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Don Zickus <dzickus@redhat.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-apply doesn't handle same name patches well
Date: Fri, 13 Jun 2008 16:42:19 -0400	[thread overview]
Message-ID: <20080613204219.GE7703@redhat.com> (raw)
In-Reply-To: <alpine.DEB.1.00.0806132131180.6439@racer>

On Fri, Jun 13, 2008 at 09:32:52PM +0100, Johannes Schindelin wrote:
> Hi,
> 
> On Fri, 13 Jun 2008, Don Zickus wrote:
> 
> > When working with a lot of people who backport patches all day long, 
> > every once in a while I get a patch that modifies the same file more 
> > than once inside the same patch.  git-apply either fails if the second 
> > change relies on the first change or silently drops the first change if 
> > the second change is independent.
> > 
> > The silent part is the scary scenario for us.  Also this behaviour is 
> > different from the patch-utils.
> > 
> > I have modified git-apply to cache the filenames of files it modifies 
> > such that if a later patch chunk modifies a file in the cache it will 
> > buffer the previously changed file instead of reading the original file 
> > from disk.
> > 
> > Logic has been put in to handle creations/deletions/renames/copies.  All the
> > relevant tests of git-apply succeed.
> > 
> > A new test has been added to cover the two cases I addressed.
> > 
> > The fix is relatively straight-forward.  But I'm not sure if this new
> > behaviour is something the git community wants.
> 
> The scary part is about adding a linked list for file names you want to 
> look up.
> 
> Not that performance matters here, I guess, but we _already_ have 
> something much more efficient in Git, namely path-lists.
> 
> You could use that, and end up with a substantially smaller patch.

Thanks for the feedback.  I was unaware of path-lists.  I'll try to find
an example and implement it if it works.

Cheers,
Don

  reply	other threads:[~2008-06-13 20:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-13 16:55 [PATCH] git-apply doesn't handle same name patches well Don Zickus
2008-06-13 20:32 ` Johannes Schindelin
2008-06-13 20:42   ` Don Zickus [this message]
2008-06-13 22:48   ` [PATCH] path-list documentation: document all functions and data structures Miklos Vajna
2008-06-13 23:30     ` Olivier Marin
2008-06-14  0:13       ` Miklos Vajna
2008-06-14  0:56       ` Miklos Vajna
2008-06-14 12:50         ` Olivier Marin
2008-06-14 22:50           ` Miklos Vajna
2008-06-14 18:08         ` Johannes Schindelin
2008-06-14 23:22           ` Miklos Vajna
2008-06-15  9:01             ` Jakub Narebski
2008-06-15 12:06               ` Miklos Vajna
2008-06-15  5:04           ` Junio C Hamano
2008-06-16  9:01 ` [PATCH] git-apply doesn't handle same name patches well Mike Ralphson

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=20080613204219.GE7703@redhat.com \
    --to=dzickus@redhat.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).