Re: [PATCHv2 2/2] merge-one-file: fix broken merges with alternate work trees

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

 



Jeff King <peff@xxxxxxxx> writes:

> This patch makes merge-one-file chdir to the toplevel of the working
> tree (and exit if we don't have one). This most closely matches the
> assumption made by the original script (before separate work trees were
> invented), and matches what happens when the script is called as part of
> a merge strategy.
>
> While we're at it, we'll also error-check the call to cat.
> Merging a file in a subdirectory could in fact fail, as the
> redirection relies on the "checkout-index" call just prior
> to create leading directories. But we never noticed, since
> we ignored the error return from running cat.

This part is probably incorrect as we have && before cat that checks
an error from checkout-index that fails to create such a subdirectory, no?

And then "exec git update-index -- $4" at the last step would have failed.

Other than that, the patch looks much nicer and more modern.

Will queue.

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