Re: bugreport: git apply -3 confusing "lacks the necessary blob"

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

 



On Fri, 20 Aug 2021 11:19:39 +0200, Bagas Sanjaya wrote:
> On 19/08/21 01.17, Jan Kratochvil wrote:
> > reproducer:
> > (set -ex;: rm -rf gitgit;mkdir gitgit;cd gitgit;git init;echo a >x;git add x;git commit -am.;git checkout -b b;echo b >x;git commit -am.;git checkout master;echo c >x;git commit -am.;git diff master^..b|grep -v ^index >b.diff;git apply -3 b.diff || cat b.diff)
> 
> I can reproduce your issue on latest Git (2.33.0).
> 
> It seems like you remove `index` line, which **may** contain blob hash
> information required for three-way merge with git apply -3.
> 
> But if you don't remove it when generating patch that way, you will get
> expected conflict when git applying.

Yes.

The problem is when the 'index' line is already removed (as it was always
being removed in my existing setup) it is difficult to find out that is the
reason of this confusing message. So the error message should be different
when the 'index' line is missing at all.


Jan



[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]

  Powered by Linux