Re: Interesting git-format-patch bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> wrote:
> "Olsen, Alan R" <alan.r.olsen@xxxxxxxxx> writes:
> > I found an interesting bug in git-format-patch.
> >
> > Say you have a branch A.  You create branch B and add a patch to
> > it. You then merge that patch into branch A. After the merge,
> > some other process (we will call it 'gerrit') uses annotate and
> > changes the comment on the patch that exists on branch B.
> >
> > Now someone runs git-format-patch for the last n patches on
> > branch A.  You should just get the original patch that was
> > merged over to branch A.  What you get is the patch that was
> > merged to branch A *and* the patch with the modified commit
> > comment on branch B. (Double the patches, double the
> > clean-up...)
>
> As you literally have patches that do essentially the same or
> similar things on two branches that was merged, you cannot
> expect to export each individual commit into a patch and not
> have conflicts among them.  So I do not think there is no
> answer than "don't do that".

To me, this seems to miss Alan's point:  only one patch was merged
to branch A, so git-format-patch applied to branch A should find
only one patch.  It can be argued either way whether that one-patch
report should include the gerrit annotations, but surely the
application of gerrit on branch B, _after the merge to branch A
has already been performed_, should not cause an additional patch
to magically appear on branch A.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]