Re: Temporary git files for the gitdir created on a separate drive in workdir
The bash commands are using a git and bash bundle that was installed in parallel with gitextensions(a gui for git)
G:\Min enhet> set GIT_TRACE_SETUP=1 G:\Min enhet> git st 10:40:28.881927 trace.c:318 setup: git_dir: C:/Users/hultqvist/Drive.git 10:40:28.881927 trace.c:319 setup: git_common_dir: C:/Users/hultqvist/Drive.git 10:40:28.881927 trace.c:320 setup: worktree: G:/Min enhet 10:40:28.881927 trace.c:321 setup: cwd: G:/Min enhet 10:40:28.881927 trace.c:322 setup: prefix: (null) 10:40:28.882930 chdir-notify.c:67 setup: chdir from 'G:/Min enhet' to 'G:/Min enhet' On branch master Your branch is up to date with 'nas/master'.
nothing to commit, working tree clean
$ cat .git gitdir: C:\Users\hultqvist\Drive.git
$cat C:/Users/hultqvist/Drive.git/config
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
ignorecase = true
autocrlf = false
...G:\Min enhet> git version $ git version git version 2.18.0.windows.1
Den lör 8 sep. 2018 kl 08:08 skrev Duy Nguyen <pclouds@gmail.com>:
Show 28 quoted lines
>
> On Fri, Sep 7, 2018 at 6:48 PM Junio C Hamano <gitster@pobox.com> wrote:
> >
> > 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