Re: Temporary git files for the gitdir created on a separate drive in workdir
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Sep 8, 2018, 06:08 UTC
- Message-ID
- <CACsJy8DymnKk+Xo6UPQyAsToNpkSX4Ae+jzc04+0qXrZ6bmb3w@mail.gmail.com>
- In-Reply-To
- <xmqqbm99xngs.fsf@gitster-ct.c.googlers.com>
On Fri, Sep 7, 2018 at 6:48 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 16 quoted lines
> > Hultqvist <hultqvist@silentorbit.com> writes: > > > Considering that the gitdir could be located on a different drive than > > the workdir wouldn't it make more sense to create the temporary files > > in a subdirectory inside the gitdir rather tan in the workdir? > > I do not think we intend to create temporary files, whose final > destination is somewhere under $GIT_DIR/, in any working tree; > rather, I think we try to create them inside $GIT_DIR (or possibly > if the destination is a file in a subdirectory of $GIT_DIR, then in > the same subdirectory). What you are seeing definitely smells like > a bug in the worktree code, perhaps getting confused by the fact > that the full path to these places look "unusual" by starting with a > single alphabet followed by a colon (IOW, this may manifest only in > Windows port).
I agree. Auditing the setup code did not reveal anything though. Our code should recognize these unusual Windows paths as absolute and while I spotted an incorrect use of '/' (instead of is_dir_sep) it does not explain the problem here.
Hultqvist, if you set environment variable GIT_TRACE_SETUP to 1 and run "git status" in G:\Test1, what does it say?
-- Duy