Re: [PATCH v2 1/2] mergetool: don't require a work tree for --tool-help

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

 



On Fri, Oct 10, 2014 at 10:01:57AM +0100, Charles Bailey wrote:
> On 10 Oct 2014, at 09:51, David Aguilar <davvid@xxxxxxxxx> wrote:
> > Changes since v1:
> > 
> > NONGIT_OK=Yes was added to make it actually work outside of a git repo.
> 
> Does this actually work? The reason that I haven't got around
> to resending my re-roll is that I found that I needed changes
> to git-sh-setup.sh because doing NONGIT_OK and then
> require_work_tree didn't correctly set GIT_DIR when it wasn't
> already explicitly set in the environment. (I believe the rest
> of mergetool relies on it.)
> 
> Perhaps I misunderstood, though.

Thanks for the heads-up.

I tested mergetool and it seems fine but indeed there's an
`if test -e "$GIT_DIR/MERGE_RR"` in there that is surely not
working as intended.

One solution would be to move the work done in the test -z "$NONGIT_OK"
block in git-sh-setup into a function e.g. git_dir_init () so
that we can defer the GIT_DIR initialization until after
require_work_tree has been called.
-- 
David
--
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]