# git version 2.20.1.windows.1 throws file name too long in gitk

10 messages from 2019-01-04 to 2019-05-29. Participants: Bret Barkelew, Johannes Schindelin.
Thread: https://gitlist.dev/t/50150

## Bret Barkelew, 2019-01-04 02:21

Subject: git version 2.20.1.windows.1 throws file name too long in gitk
Message-ID: <CAGTkKag2sFy+Of=6uQeiGOQm0-NBrh9ixgzDoQXKR73+Ct3raQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAGTkKag2sFy%2BOf%3D6uQeiGOQm0-NBrh9ixgzDoQXKR73%2BCt3raQ%40mail.gmail.com

```
When I open gitk in a particular repository under this version of Git
for Windows, I now get a dialog box that says "Error: couldn't execute
"git": file name too long". I've noticed that the most pronounced
effect is that I cannot see the file diffs (or sometimes the file name
list) for any of the commits. I don't know the exact repro, but I've
narrowed down the following things:

- This does not happen with the same repo if I use a system that has
git 2.19.0.windows.1 on another machine.
- This does not happen on my current machine in a freshly cloned repo.
However, as soon as the remote updates with any changes on a given
fetch/pull, the repo is put in a bad state permanently.

I've pasted the output from gitk below...

couldn't execute "git": file name too long
couldn't execute "git": file name too long
    while executing
"open $cmd r"
    (procedure "getallcommits" line 48)
    invoked from within
"getallcommits"
    (procedure "readcache" line 80)
    invoked from within
"readcache file827e200"
    ("eval" body line 1)
    invoked from within
"eval $script"
    (procedure "dorunq" line 11)
    invoked from within
"dorunq"
    ("after" script)

Happy to gather whatever data needed.
Thanks!
- Bret Barkelew

```

## Bret Barkelew, 2019-01-04 03:38

Subject: Re: git version 2.20.1.windows.1 throws file name too long in gitk
Message-ID: <CAGTkKag-fTy3iZAKJxEnWD6_b_3pfuYvQQKBkLaeSL8wKM2sfg@mail.gmail.com>
URL: https://gitlist.dev/e/CAGTkKag-fTy3iZAKJxEnWD6_b_3pfuYvQQKBkLaeSL8wKM2sfg%40mail.gmail.com
In-Reply-To: <CAGyf7-HcncFOfmm5McEkOvCTkHNdePDSEQDZwEAK=z1bmC=QKw@mail.gmail.com>

```
They are the exact same path (with a different drive letter).

Another thing I've been able to confirm is I uninstalled git 2.20.1
and installed 2.19.0 on the failing system, and the older version of
Git works.
I've also tried a suggested fix I saw elsewhere to enable long path
names in the Windows registry, which did not resolve the issue with
git 2.20.1.

Happy to collect any additional data.
- Bret

On Thu, Jan 3, 2019 at 7:10 PM Bryan Turner <bturner@atlassian.com> wrote:
>
> On Thu, Jan 3, 2019 at 6:21 PM Bret Barkelew <bret@corthon.com> wrote:
>>
>> When I open gitk in a particular repository under this version of Git
>> for Windows, I now get a dialog box that says "Error: couldn't execute
>> "git": file name too long". I've noticed that the most pronounced
>> effect is that I cannot see the file diffs (or sometimes the file name
>> list) for any of the commits. I don't know the exact repro, but I've
>> narrowed down the following things:
>>
>> - This does not happen with the same repo if I use a system that has
>> git 2.19.0.windows.1 on another machine.
>> - This does not happen on my current machine in a freshly cloned repo.
>
>
> How “deep” are the paths to the different clones on the different systems? Are all of the clones at exactly the same path on disk?
>
> Git on Windows is (by defaulted) limited by MAX_PATH, which is 260 characters. That length is calculated including the path to the repository itself and then to the file inside the repository. That means, for example, a given repository cloned to C:\repo may not have issues, but the same repository cloned to C:\Users\Bryan\Documents\workspaces\repo may.
>
>>
>> However, as soon as the remote updates with any changes on a given
>> fetch/pull, the repo is put in a bad state permanently.
>>
>> I've pasted the output from gitk below...
>>
>> couldn't execute "git": file name too long
>> couldn't execute "git": file name too long
>>     while executing
>> "open $cmd r"
>>     (procedure "getallcommits" line 48)
>>     invoked from within
>> "getallcommits"
>>     (procedure "readcache" line 80)
>>     invoked from within
>> "readcache file827e200"
>>     ("eval" body line 1)
>>     invoked from within
>> "eval $script"
>>     (procedure "dorunq" line 11)
>>     invoked from within
>> "dorunq"
>>     ("after" script)
>>
>> Happy to gather whatever data needed.
>> Thanks!
>> - Bret Barkelew

```

## Johannes Schindelin, 2019-01-09 18:39

Subject: Re: git version 2.20.1.windows.1 throws file name too long in gitk
Message-ID: <nycvar.QRO.7.76.6.1901091936420.41@tvgsbejvaqbjf.bet>
URL: https://gitlist.dev/e/nycvar.QRO.7.76.6.1901091936420.41%40tvgsbejvaqbjf.bet
In-Reply-To: <CAGTkKag-fTy3iZAKJxEnWD6_b_3pfuYvQQKBkLaeSL8wKM2sfg@mail.gmail.com>

```
Hi Bret,


On Thu, 3 Jan 2019, Bret Barkelew wrote:

> They are the exact same path (with a different drive letter).

[it's a bit hard to follow the thread if you top-post a reply to an
inline-replied answer, maybe imitate the style of other mails in the
future.]

> Another thing I've been able to confirm is I uninstalled git 2.20.1
> and installed 2.19.0 on the failing system, and the older version of
> Git works.
> I've also tried a suggested fix I saw elsewhere to enable long path
> names in the Windows registry, which did not resolve the issue with
> git 2.20.1.
> 
> Happy to collect any additional data.

Please try the latest snapshot at
https://wingit.blob.core.windows.net/files/index.html (I *think* the bug
might be fixed via
https://github.com/git-for-windows/MINGW-packages/pull/32).

Ciao,
Johannes

> - Bret
> 
> On Thu, Jan 3, 2019 at 7:10 PM Bryan Turner <bturner@atlassian.com> wrote:
> >
> > On Thu, Jan 3, 2019 at 6:21 PM Bret Barkelew <bret@corthon.com> wrote:
> >>
> >> When I open gitk in a particular repository under this version of Git
> >> for Windows, I now get a dialog box that says "Error: couldn't execute
> >> "git": file name too long". I've noticed that the most pronounced
> >> effect is that I cannot see the file diffs (or sometimes the file name
> >> list) for any of the commits. I don't know the exact repro, but I've
> >> narrowed down the following things:
> >>
> >> - This does not happen with the same repo if I use a system that has
> >> git 2.19.0.windows.1 on another machine.
> >> - This does not happen on my current machine in a freshly cloned repo.
> >
> >
> > How “deep” are the paths to the different clones on the different systems? Are all of the clones at exactly the same path on disk?
> >
> > Git on Windows is (by defaulted) limited by MAX_PATH, which is 260 characters. That length is calculated including the path to the repository itself and then to the file inside the repository. That means, for example, a given repository cloned to C:\repo may not have issues, but the same repository cloned to C:\Users\Bryan\Documents\workspaces\repo may.
> >
> >>
> >> However, as soon as the remote updates with any changes on a given
> >> fetch/pull, the repo is put in a bad state permanently.
> >>
> >> I've pasted the output from gitk below...
> >>
> >> couldn't execute "git": file name too long
> >> couldn't execute "git": file name too long
> >>     while executing
> >> "open $cmd r"
> >>     (procedure "getallcommits" line 48)
> >>     invoked from within
> >> "getallcommits"
> >>     (procedure "readcache" line 80)
> >>     invoked from within
> >> "readcache file827e200"
> >>     ("eval" body line 1)
> >>     invoked from within
> >> "eval $script"
> >>     (procedure "dorunq" line 11)
> >>     invoked from within
> >> "dorunq"
> >>     ("after" script)
> >>
> >> Happy to gather whatever data needed.
> >> Thanks!
> >> - Bret Barkelew
> 
```

## Bret Barkelew, 2019-01-09 18:48

Subject: Re: git version 2.20.1.windows.1 throws file name too long in gitk
Message-ID: <CAGTkKajkW-U9mhh_GmTXmZQbnceEKX_BcMtOF4hOhEDZe2u9Bw@mail.gmail.com>
URL: https://gitlist.dev/e/CAGTkKajkW-U9mhh_GmTXmZQbnceEKX_BcMtOF4hOhEDZe2u9Bw%40mail.gmail.com
In-Reply-To: <nycvar.QRO.7.76.6.1901091936420.41@tvgsbejvaqbjf.bet>

```
Will try to reply in-line, when appropriate.
The latest snapshot (git version 2.20.1.windows.1.5.g6b286585b1) still
has the issue.

- Bret


On Wed, Jan 9, 2019 at 10:39 AM Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
>
> Hi Bret,
>
>
> On Thu, 3 Jan 2019, Bret Barkelew wrote:
>
> > They are the exact same path (with a different drive letter).
>
> [it's a bit hard to follow the thread if you top-post a reply to an
> inline-replied answer, maybe imitate the style of other mails in the
> future.]
>
> > Another thing I've been able to confirm is I uninstalled git 2.20.1
> > and installed 2.19.0 on the failing system, and the older version of
> > Git works.
> > I've also tried a suggested fix I saw elsewhere to enable long path
> > names in the Windows registry, which did not resolve the issue with
> > git 2.20.1.
> >
> > Happy to collect any additional data.
>
> Please try the latest snapshot at
> https://wingit.blob.core.windows.net/files/index.html (I *think* the bug
> might be fixed via
> https://github.com/git-for-windows/MINGW-packages/pull/32).
>
> Ciao,
> Johannes
>
> > - Bret
> >
> > On Thu, Jan 3, 2019 at 7:10 PM Bryan Turner <bturner@atlassian.com> wrote:
> > >
> > > On Thu, Jan 3, 2019 at 6:21 PM Bret Barkelew <bret@corthon.com> wrote:
> > >>
> > >> When I open gitk in a particular repository under this version of Git
> > >> for Windows, I now get a dialog box that says "Error: couldn't execute
> > >> "git": file name too long". I've noticed that the most pronounced
> > >> effect is that I cannot see the file diffs (or sometimes the file name
> > >> list) for any of the commits. I don't know the exact repro, but I've
> > >> narrowed down the following things:
> > >>
> > >> - This does not happen with the same repo if I use a system that has
> > >> git 2.19.0.windows.1 on another machine.
> > >> - This does not happen on my current machine in a freshly cloned repo.
> > >
> > >
> > > How “deep” are the paths to the different clones on the different systems? Are all of the clones at exactly the same path on disk?
> > >
> > > Git on Windows is (by defaulted) limited by MAX_PATH, which is 260 characters. That length is calculated including the path to the repository itself and then to the file inside the repository. That means, for example, a given repository cloned to C:\repo may not have issues, but the same repository cloned to C:\Users\Bryan\Documents\workspaces\repo may.
> > >
> > >>
> > >> However, as soon as the remote updates with any changes on a given
> > >> fetch/pull, the repo is put in a bad state permanently.
> > >>
> > >> I've pasted the output from gitk below...
> > >>
> > >> couldn't execute "git": file name too long
> > >> couldn't execute "git": file name too long
> > >>     while executing
> > >> "open $cmd r"
> > >>     (procedure "getallcommits" line 48)
> > >>     invoked from within
> > >> "getallcommits"
> > >>     (procedure "readcache" line 80)
> > >>     invoked from within
> > >> "readcache file827e200"
> > >>     ("eval" body line 1)
> > >>     invoked from within
> > >> "eval $script"
> > >>     (procedure "dorunq" line 11)
> > >>     invoked from within
> > >> "dorunq"
> > >>     ("after" script)
> > >>
> > >> Happy to gather whatever data needed.
> > >> Thanks!
> > >> - Bret Barkelew
> >

```

## Johannes Schindelin, 2019-01-10 15:19

Subject: Re: git version 2.20.1.windows.1 throws file name too long in gitk
Message-ID: <nycvar.QRO.7.76.6.1901101616100.41@tvgsbejvaqbjf.bet>
URL: https://gitlist.dev/e/nycvar.QRO.7.76.6.1901101616100.41%40tvgsbejvaqbjf.bet
In-Reply-To: <CAGTkKajkW-U9mhh_GmTXmZQbnceEKX_BcMtOF4hOhEDZe2u9Bw@mail.gmail.com>

```
Hi Bret,

in that case, please try to find a way to trace the commands in a Tcl/Tk
program (which gitk is) and see which command triggers the error.

Ciao,
Johannes


On Wed, 9 Jan 2019, Bret Barkelew wrote:

> Will try to reply in-line, when appropriate.
> The latest snapshot (git version 2.20.1.windows.1.5.g6b286585b1) still
> has the issue.
> 
> - Bret
> 
> 
> On Wed, Jan 9, 2019 at 10:39 AM Johannes Schindelin
> <Johannes.Schindelin@gmx.de> wrote:
> >
> > Hi Bret,
> >
> >
> > On Thu, 3 Jan 2019, Bret Barkelew wrote:
> >
> > > They are the exact same path (with a different drive letter).
> >
> > [it's a bit hard to follow the thread if you top-post a reply to an
> > inline-replied answer, maybe imitate the style of other mails in the
> > future.]
> >
> > > Another thing I've been able to confirm is I uninstalled git 2.20.1
> > > and installed 2.19.0 on the failing system, and the older version of
> > > Git works.
> > > I've also tried a suggested fix I saw elsewhere to enable long path
> > > names in the Windows registry, which did not resolve the issue with
> > > git 2.20.1.
> > >
> > > Happy to collect any additional data.
> >
> > Please try the latest snapshot at
> > https://wingit.blob.core.windows.net/files/index.html (I *think* the bug
> > might be fixed via
> > https://github.com/git-for-windows/MINGW-packages/pull/32).
> >
> > Ciao,
> > Johannes
> >
> > > - Bret
> > >
> > > On Thu, Jan 3, 2019 at 7:10 PM Bryan Turner <bturner@atlassian.com> wrote:
> > > >
> > > > On Thu, Jan 3, 2019 at 6:21 PM Bret Barkelew <bret@corthon.com> wrote:
> > > >>
> > > >> When I open gitk in a particular repository under this version of Git
> > > >> for Windows, I now get a dialog box that says "Error: couldn't execute
> > > >> "git": file name too long". I've noticed that the most pronounced
> > > >> effect is that I cannot see the file diffs (or sometimes the file name
> > > >> list) for any of the commits. I don't know the exact repro, but I've
> > > >> narrowed down the following things:
> > > >>
> > > >> - This does not happen with the same repo if I use a system that has
> > > >> git 2.19.0.windows.1 on another machine.
> > > >> - This does not happen on my current machine in a freshly cloned repo.
> > > >
> > > >
> > > > How “deep” are the paths to the different clones on the different systems? Are all of the clones at exactly the same path on disk?
> > > >
> > > > Git on Windows is (by defaulted) limited by MAX_PATH, which is 260 characters. That length is calculated including the path to the repository itself and then to the file inside the repository. That means, for example, a given repository cloned to C:\repo may not have issues, but the same repository cloned to C:\Users\Bryan\Documents\workspaces\repo may.
> > > >
> > > >>
> > > >> However, as soon as the remote updates with any changes on a given
> > > >> fetch/pull, the repo is put in a bad state permanently.
> > > >>
> > > >> I've pasted the output from gitk below...
> > > >>
> > > >> couldn't execute "git": file name too long
> > > >> couldn't execute "git": file name too long
> > > >>     while executing
> > > >> "open $cmd r"
> > > >>     (procedure "getallcommits" line 48)
> > > >>     invoked from within
> > > >> "getallcommits"
> > > >>     (procedure "readcache" line 80)
> > > >>     invoked from within
> > > >> "readcache file827e200"
> > > >>     ("eval" body line 1)
> > > >>     invoked from within
> > > >> "eval $script"
> > > >>     (procedure "dorunq" line 11)
> > > >>     invoked from within
> > > >> "dorunq"
> > > >>     ("after" script)
> > > >>
> > > >> Happy to gather whatever data needed.
> > > >> Thanks!
> > > >> - Bret Barkelew
> > >
> 
```

## Bret Barkelew, 2019-01-10 18:55

Subject: Re: git version 2.20.1.windows.1 throws file name too long in gitk
Message-ID: <CAGTkKagTCw-EcMo3M1P3XVtjbTcm4HPjCWGZ1sM_NnJwH7v_hg@mail.gmail.com>
URL: https://gitlist.dev/e/CAGTkKagTCw-EcMo3M1P3XVtjbTcm4HPjCWGZ1sM_NnJwH7v_hg%40mail.gmail.com
In-Reply-To: <nycvar.QRO.7.76.6.1901101616100.41@tvgsbejvaqbjf.bet>

```
On Thu, Jan 10, 2019 at 7:20 AM Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
>
> Hi Bret,
>
> in that case, please try to find a way to trace the commands in a Tcl/Tk
> program (which gitk is) and see which command triggers the error.

Er... that's a little out of my depth. I'll see if I can find time to learn.
Meanwhile, is there any way to request better instrumentation for the
error dialog so this data could have been collected for me?

>
> Ciao,
> Johannes
>
>
> On Wed, 9 Jan 2019, Bret Barkelew wrote:
>
> > Will try to reply in-line, when appropriate.
> > The latest snapshot (git version 2.20.1.windows.1.5.g6b286585b1) still
> > has the issue.
> >
> > - Bret
> >
> >
> > On Wed, Jan 9, 2019 at 10:39 AM Johannes Schindelin
> > <Johannes.Schindelin@gmx.de> wrote:
> > >
> > > Hi Bret,
> > >
> > >
> > > On Thu, 3 Jan 2019, Bret Barkelew wrote:
> > >
> > > > They are the exact same path (with a different drive letter).
> > >
> > > [it's a bit hard to follow the thread if you top-post a reply to an
> > > inline-replied answer, maybe imitate the style of other mails in the
> > > future.]
> > >
> > > > Another thing I've been able to confirm is I uninstalled git 2.20.1
> > > > and installed 2.19.0 on the failing system, and the older version of
> > > > Git works.
> > > > I've also tried a suggested fix I saw elsewhere to enable long path
> > > > names in the Windows registry, which did not resolve the issue with
> > > > git 2.20.1.
> > > >
> > > > Happy to collect any additional data.
> > >
> > > Please try the latest snapshot at
> > > https://wingit.blob.core.windows.net/files/index.html (I *think* the bug
> > > might be fixed via
> > > https://github.com/git-for-windows/MINGW-packages/pull/32).
> > >
> > > Ciao,
> > > Johannes
> > >
> > > > - Bret
> > > >
> > > > On Thu, Jan 3, 2019 at 7:10 PM Bryan Turner <bturner@atlassian.com> wrote:
> > > > >
> > > > > On Thu, Jan 3, 2019 at 6:21 PM Bret Barkelew <bret@corthon.com> wrote:
> > > > >>
> > > > >> When I open gitk in a particular repository under this version of Git
> > > > >> for Windows, I now get a dialog box that says "Error: couldn't execute
> > > > >> "git": file name too long". I've noticed that the most pronounced
> > > > >> effect is that I cannot see the file diffs (or sometimes the file name
> > > > >> list) for any of the commits. I don't know the exact repro, but I've
> > > > >> narrowed down the following things:
> > > > >>
> > > > >> - This does not happen with the same repo if I use a system that has
> > > > >> git 2.19.0.windows.1 on another machine.
> > > > >> - This does not happen on my current machine in a freshly cloned repo.
> > > > >
> > > > >
> > > > > How “deep” are the paths to the different clones on the different systems? Are all of the clones at exactly the same path on disk?
> > > > >
> > > > > Git on Windows is (by defaulted) limited by MAX_PATH, which is 260 characters. That length is calculated including the path to the repository itself and then to the file inside the repository. That means, for example, a given repository cloned to C:\repo may not have issues, but the same repository cloned to C:\Users\Bryan\Documents\workspaces\repo may.
> > > > >
> > > > >>
> > > > >> However, as soon as the remote updates with any changes on a given
> > > > >> fetch/pull, the repo is put in a bad state permanently.
> > > > >>
> > > > >> I've pasted the output from gitk below...
> > > > >>
> > > > >> couldn't execute "git": file name too long
> > > > >> couldn't execute "git": file name too long
> > > > >>     while executing
> > > > >> "open $cmd r"
> > > > >>     (procedure "getallcommits" line 48)
> > > > >>     invoked from within
> > > > >> "getallcommits"
> > > > >>     (procedure "readcache" line 80)
> > > > >>     invoked from within
> > > > >> "readcache file827e200"
> > > > >>     ("eval" body line 1)
> > > > >>     invoked from within
> > > > >> "eval $script"
> > > > >>     (procedure "dorunq" line 11)
> > > > >>     invoked from within
> > > > >> "dorunq"
> > > > >>     ("after" script)
> > > > >>
> > > > >> Happy to gather whatever data needed.
> > > > >> Thanks!
> > > > >> - Bret Barkelew
> > > >
> >

```

## Bret Barkelew, 2019-04-18 18:16

Subject: Re: git version 2.20.1.windows.1 throws file name too long in gitk
Message-ID: <CAGTkKajYiyT_OtX1mQECvxjvKXndjBYAqwgKMimJrroPAAvZJA@mail.gmail.com>
URL: https://gitlist.dev/e/CAGTkKajYiyT_OtX1mQECvxjvKXndjBYAqwgKMimJrroPAAvZJA%40mail.gmail.com
In-Reply-To: <CAGTkKagTCw-EcMo3M1P3XVtjbTcm4HPjCWGZ1sM_NnJwH7v_hg@mail.gmail.com>

```
This issue is now being reported by more users inside MS. I'll also
reach out to the Git for Windows advocacy group to see if they have
any ideas.

I have not had time to figure out the inner workings of Tcl/Tk. Is
there any way to turn on tracing/logging in Git for which commands are
being called by gitk?

On Thu, Jan 10, 2019 at 10:55 AM Bret Barkelew <bret@corthon.com> wrote:
>
> On Thu, Jan 10, 2019 at 7:20 AM Johannes Schindelin
> <Johannes.Schindelin@gmx.de> wrote:
> >
> > Hi Bret,
> >
> > in that case, please try to find a way to trace the commands in a Tcl/Tk
> > program (which gitk is) and see which command triggers the error.
>
> Er... that's a little out of my depth. I'll see if I can find time to learn.
> Meanwhile, is there any way to request better instrumentation for the
> error dialog so this data could have been collected for me?
>
> >
> > Ciao,
> > Johannes
> >
> >
> > On Wed, 9 Jan 2019, Bret Barkelew wrote:
> >
> > > Will try to reply in-line, when appropriate.
> > > The latest snapshot (git version 2.20.1.windows.1.5.g6b286585b1) still
> > > has the issue.
> > >
> > > - Bret
> > >
> > >
> > > On Wed, Jan 9, 2019 at 10:39 AM Johannes Schindelin
> > > <Johannes.Schindelin@gmx.de> wrote:
> > > >
> > > > Hi Bret,
> > > >
> > > >
> > > > On Thu, 3 Jan 2019, Bret Barkelew wrote:
> > > >
> > > > > They are the exact same path (with a different drive letter).
> > > >
> > > > [it's a bit hard to follow the thread if you top-post a reply to an
> > > > inline-replied answer, maybe imitate the style of other mails in the
> > > > future.]
> > > >
> > > > > Another thing I've been able to confirm is I uninstalled git 2.20.1
> > > > > and installed 2.19.0 on the failing system, and the older version of
> > > > > Git works.
> > > > > I've also tried a suggested fix I saw elsewhere to enable long path
> > > > > names in the Windows registry, which did not resolve the issue with
> > > > > git 2.20.1.
> > > > >
> > > > > Happy to collect any additional data.
> > > >
> > > > Please try the latest snapshot at
> > > > https://wingit.blob.core.windows.net/files/index.html (I *think* the bug
> > > > might be fixed via
> > > > https://github.com/git-for-windows/MINGW-packages/pull/32).
> > > >
> > > > Ciao,
> > > > Johannes
> > > >
> > > > > - Bret
> > > > >
> > > > > On Thu, Jan 3, 2019 at 7:10 PM Bryan Turner <bturner@atlassian.com> wrote:
> > > > > >
> > > > > > On Thu, Jan 3, 2019 at 6:21 PM Bret Barkelew <bret@corthon.com> wrote:
> > > > > >>
> > > > > >> When I open gitk in a particular repository under this version of Git
> > > > > >> for Windows, I now get a dialog box that says "Error: couldn't execute
> > > > > >> "git": file name too long". I've noticed that the most pronounced
> > > > > >> effect is that I cannot see the file diffs (or sometimes the file name
> > > > > >> list) for any of the commits. I don't know the exact repro, but I've
> > > > > >> narrowed down the following things:
> > > > > >>
> > > > > >> - This does not happen with the same repo if I use a system that has
> > > > > >> git 2.19.0.windows.1 on another machine.
> > > > > >> - This does not happen on my current machine in a freshly cloned repo.
> > > > > >
> > > > > >
> > > > > > How “deep” are the paths to the different clones on the different systems? Are all of the clones at exactly the same path on disk?
> > > > > >
> > > > > > Git on Windows is (by defaulted) limited by MAX_PATH, which is 260 characters. That length is calculated including the path to the repository itself and then to the file inside the repository. That means, for example, a given repository cloned to C:\repo may not have issues, but the same repository cloned to C:\Users\Bryan\Documents\workspaces\repo may.
> > > > > >
> > > > > >>
> > > > > >> However, as soon as the remote updates with any changes on a given
> > > > > >> fetch/pull, the repo is put in a bad state permanently.
> > > > > >>
> > > > > >> I've pasted the output from gitk below...
> > > > > >>
> > > > > >> couldn't execute "git": file name too long
> > > > > >> couldn't execute "git": file name too long
> > > > > >>     while executing
> > > > > >> "open $cmd r"
> > > > > >>     (procedure "getallcommits" line 48)
> > > > > >>     invoked from within
> > > > > >> "getallcommits"
> > > > > >>     (procedure "readcache" line 80)
> > > > > >>     invoked from within
> > > > > >> "readcache file827e200"
> > > > > >>     ("eval" body line 1)
> > > > > >>     invoked from within
> > > > > >> "eval $script"
> > > > > >>     (procedure "dorunq" line 11)
> > > > > >>     invoked from within
> > > > > >> "dorunq"
> > > > > >>     ("after" script)
> > > > > >>
> > > > > >> Happy to gather whatever data needed.
> > > > > >> Thanks!
> > > > > >> - Bret Barkelew
> > > > >
> > >

```

## Johannes Schindelin, 2019-04-27 23:20

Subject: Re: git version 2.20.1.windows.1 throws file name too long in gitk
Message-ID: <nycvar.QRO.7.76.6.1904271722290.45@tvgsbejvaqbjf.bet>
URL: https://gitlist.dev/e/nycvar.QRO.7.76.6.1904271722290.45%40tvgsbejvaqbjf.bet
In-Reply-To: <CAGTkKajYiyT_OtX1mQECvxjvKXndjBYAqwgKMimJrroPAAvZJA@mail.gmail.com>

```
Hi Bret,

On Thu, 18 Apr 2019, Bret Barkelew wrote:

> This issue is now being reported by more users inside MS. I'll also
> reach out to the Git for Windows advocacy group to see if they have
> any ideas.
>
> I have not had time to figure out the inner workings of Tcl/Tk. Is
> there any way to turn on tracing/logging in Git for which commands are
> being called by gitk?

Thank you for reaching out with detailed information internally, I am
happy to report that together with the help of Max Kirillov, this is now
resolved and a snapshot is available from
https://wingit.blob.core.windows.net/files/index.html that has the fix.

Ciao,
Johannes

> On Thu, Jan 10, 2019 at 10:55 AM Bret Barkelew <bret@corthon.com> wrote:
> >
> > On Thu, Jan 10, 2019 at 7:20 AM Johannes Schindelin
> > <Johannes.Schindelin@gmx.de> wrote:
> > >
> > > Hi Bret,
> > >
> > > in that case, please try to find a way to trace the commands in a Tcl/Tk
> > > program (which gitk is) and see which command triggers the error.
> >
> > Er... that's a little out of my depth. I'll see if I can find time to learn.
> > Meanwhile, is there any way to request better instrumentation for the
> > error dialog so this data could have been collected for me?
> >
> > >
> > > Ciao,
> > > Johannes
> > >
> > >
> > > On Wed, 9 Jan 2019, Bret Barkelew wrote:
> > >
> > > > Will try to reply in-line, when appropriate.
> > > > The latest snapshot (git version 2.20.1.windows.1.5.g6b286585b1) still
> > > > has the issue.
> > > >
> > > > - Bret
> > > >
> > > >
> > > > On Wed, Jan 9, 2019 at 10:39 AM Johannes Schindelin
> > > > <Johannes.Schindelin@gmx.de> wrote:
> > > > >
> > > > > Hi Bret,
> > > > >
> > > > >
> > > > > On Thu, 3 Jan 2019, Bret Barkelew wrote:
> > > > >
> > > > > > They are the exact same path (with a different drive letter).
> > > > >
> > > > > [it's a bit hard to follow the thread if you top-post a reply to an
> > > > > inline-replied answer, maybe imitate the style of other mails in the
> > > > > future.]
> > > > >
> > > > > > Another thing I've been able to confirm is I uninstalled git 2.20.1
> > > > > > and installed 2.19.0 on the failing system, and the older version of
> > > > > > Git works.
> > > > > > I've also tried a suggested fix I saw elsewhere to enable long path
> > > > > > names in the Windows registry, which did not resolve the issue with
> > > > > > git 2.20.1.
> > > > > >
> > > > > > Happy to collect any additional data.
> > > > >
> > > > > Please try the latest snapshot at
> > > > > https://wingit.blob.core.windows.net/files/index.html (I *think* the bug
> > > > > might be fixed via
> > > > > https://github.com/git-for-windows/MINGW-packages/pull/32).
> > > > >
> > > > > Ciao,
> > > > > Johannes
> > > > >
> > > > > > - Bret
> > > > > >
> > > > > > On Thu, Jan 3, 2019 at 7:10 PM Bryan Turner <bturner@atlassian.com> wrote:
> > > > > > >
> > > > > > > On Thu, Jan 3, 2019 at 6:21 PM Bret Barkelew <bret@corthon.com> wrote:
> > > > > > >>
> > > > > > >> When I open gitk in a particular repository under this version of Git
> > > > > > >> for Windows, I now get a dialog box that says "Error: couldn't execute
> > > > > > >> "git": file name too long". I've noticed that the most pronounced
> > > > > > >> effect is that I cannot see the file diffs (or sometimes the file name
> > > > > > >> list) for any of the commits. I don't know the exact repro, but I've
> > > > > > >> narrowed down the following things:
> > > > > > >>
> > > > > > >> - This does not happen with the same repo if I use a system that has
> > > > > > >> git 2.19.0.windows.1 on another machine.
> > > > > > >> - This does not happen on my current machine in a freshly cloned repo.
> > > > > > >
> > > > > > >
> > > > > > > How “deep” are the paths to the different clones on the different systems? Are all of the clones at exactly the same path on disk?
> > > > > > >
> > > > > > > Git on Windows is (by defaulted) limited by MAX_PATH, which is 260 characters. That length is calculated including the path to the repository itself and then to the file inside the repository. That means, for example, a given repository cloned to C:\repo may not have issues, but the same repository cloned to C:\Users\Bryan\Documents\workspaces\repo may.
> > > > > > >
> > > > > > >>
> > > > > > >> However, as soon as the remote updates with any changes on a given
> > > > > > >> fetch/pull, the repo is put in a bad state permanently.
> > > > > > >>
> > > > > > >> I've pasted the output from gitk below...
> > > > > > >>
> > > > > > >> couldn't execute "git": file name too long
> > > > > > >> couldn't execute "git": file name too long
> > > > > > >>     while executing
> > > > > > >> "open $cmd r"
> > > > > > >>     (procedure "getallcommits" line 48)
> > > > > > >>     invoked from within
> > > > > > >> "getallcommits"
> > > > > > >>     (procedure "readcache" line 80)
> > > > > > >>     invoked from within
> > > > > > >> "readcache file827e200"
> > > > > > >>     ("eval" body line 1)
> > > > > > >>     invoked from within
> > > > > > >> "eval $script"
> > > > > > >>     (procedure "dorunq" line 11)
> > > > > > >>     invoked from within
> > > > > > >> "dorunq"
> > > > > > >>     ("after" script)
> > > > > > >>
> > > > > > >> Happy to gather whatever data needed.
> > > > > > >> Thanks!
> > > > > > >> - Bret Barkelew
> > > > > >
> > > >
>

```

## Bret Barkelew, 2019-05-29 16:40

Subject: Re: git version 2.20.1.windows.1 throws file name too long in gitk
Message-ID: <CAGTkKagwzceU51O6dK_6-MRZdEW52-xEFoGBVf9z9XLVEJoAGg@mail.gmail.com>
URL: https://gitlist.dev/e/CAGTkKagwzceU51O6dK_6-MRZdEW52-xEFoGBVf9z9XLVEJoAGg%40mail.gmail.com
In-Reply-To: <nycvar.QRO.7.76.6.1904271722290.45@tvgsbejvaqbjf.bet>

```
I know it's an incredibly late reply, but I have not seen this issue
reappear since the patches. Thank you very much for helping!

- Bret

On Sat, Apr 27, 2019 at 4:20 PM Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
>
> Hi Bret,
>
> On Thu, 18 Apr 2019, Bret Barkelew wrote:
>
> > This issue is now being reported by more users inside MS. I'll also
> > reach out to the Git for Windows advocacy group to see if they have
> > any ideas.
> >
> > I have not had time to figure out the inner workings of Tcl/Tk. Is
> > there any way to turn on tracing/logging in Git for which commands are
> > being called by gitk?
>
> Thank you for reaching out with detailed information internally, I am
> happy to report that together with the help of Max Kirillov, this is now
> resolved and a snapshot is available from
> https://wingit.blob.core.windows.net/files/index.html that has the fix.
>
> Ciao,
> Johannes
>
> > On Thu, Jan 10, 2019 at 10:55 AM Bret Barkelew <bret@corthon.com> wrote:
> > >
> > > On Thu, Jan 10, 2019 at 7:20 AM Johannes Schindelin
> > > <Johannes.Schindelin@gmx.de> wrote:
> > > >
> > > > Hi Bret,
> > > >
> > > > in that case, please try to find a way to trace the commands in a Tcl/Tk
> > > > program (which gitk is) and see which command triggers the error.
> > >
> > > Er... that's a little out of my depth. I'll see if I can find time to learn.
> > > Meanwhile, is there any way to request better instrumentation for the
> > > error dialog so this data could have been collected for me?
> > >
> > > >
> > > > Ciao,
> > > > Johannes
> > > >
> > > >
> > > > On Wed, 9 Jan 2019, Bret Barkelew wrote:
> > > >
> > > > > Will try to reply in-line, when appropriate.
> > > > > The latest snapshot (git version 2.20.1.windows.1.5.g6b286585b1) still
> > > > > has the issue.
> > > > >
> > > > > - Bret
> > > > >
> > > > >
> > > > > On Wed, Jan 9, 2019 at 10:39 AM Johannes Schindelin
> > > > > <Johannes.Schindelin@gmx.de> wrote:
> > > > > >
> > > > > > Hi Bret,
> > > > > >
> > > > > >
> > > > > > On Thu, 3 Jan 2019, Bret Barkelew wrote:
> > > > > >
> > > > > > > They are the exact same path (with a different drive letter).
> > > > > >
> > > > > > [it's a bit hard to follow the thread if you top-post a reply to an
> > > > > > inline-replied answer, maybe imitate the style of other mails in the
> > > > > > future.]
> > > > > >
> > > > > > > Another thing I've been able to confirm is I uninstalled git 2.20.1
> > > > > > > and installed 2.19.0 on the failing system, and the older version of
> > > > > > > Git works.
> > > > > > > I've also tried a suggested fix I saw elsewhere to enable long path
> > > > > > > names in the Windows registry, which did not resolve the issue with
> > > > > > > git 2.20.1.
> > > > > > >
> > > > > > > Happy to collect any additional data.
> > > > > >
> > > > > > Please try the latest snapshot at
> > > > > > https://wingit.blob.core.windows.net/files/index.html (I *think* the bug
> > > > > > might be fixed via
> > > > > > https://github.com/git-for-windows/MINGW-packages/pull/32).
> > > > > >
> > > > > > Ciao,
> > > > > > Johannes
> > > > > >
> > > > > > > - Bret
> > > > > > >
> > > > > > > On Thu, Jan 3, 2019 at 7:10 PM Bryan Turner <bturner@atlassian.com> wrote:
> > > > > > > >
> > > > > > > > On Thu, Jan 3, 2019 at 6:21 PM Bret Barkelew <bret@corthon.com> wrote:
> > > > > > > >>
> > > > > > > >> When I open gitk in a particular repository under this version of Git
> > > > > > > >> for Windows, I now get a dialog box that says "Error: couldn't execute
> > > > > > > >> "git": file name too long". I've noticed that the most pronounced
> > > > > > > >> effect is that I cannot see the file diffs (or sometimes the file name
> > > > > > > >> list) for any of the commits. I don't know the exact repro, but I've
> > > > > > > >> narrowed down the following things:
> > > > > > > >>
> > > > > > > >> - This does not happen with the same repo if I use a system that has
> > > > > > > >> git 2.19.0.windows.1 on another machine.
> > > > > > > >> - This does not happen on my current machine in a freshly cloned repo.
> > > > > > > >
> > > > > > > >
> > > > > > > > How “deep” are the paths to the different clones on the different systems? Are all of the clones at exactly the same path on disk?
> > > > > > > >
> > > > > > > > Git on Windows is (by defaulted) limited by MAX_PATH, which is 260 characters. That length is calculated including the path to the repository itself and then to the file inside the repository. That means, for example, a given repository cloned to C:\repo may not have issues, but the same repository cloned to C:\Users\Bryan\Documents\workspaces\repo may.
> > > > > > > >
> > > > > > > >>
> > > > > > > >> However, as soon as the remote updates with any changes on a given
> > > > > > > >> fetch/pull, the repo is put in a bad state permanently.
> > > > > > > >>
> > > > > > > >> I've pasted the output from gitk below...
> > > > > > > >>
> > > > > > > >> couldn't execute "git": file name too long
> > > > > > > >> couldn't execute "git": file name too long
> > > > > > > >>     while executing
> > > > > > > >> "open $cmd r"
> > > > > > > >>     (procedure "getallcommits" line 48)
> > > > > > > >>     invoked from within
> > > > > > > >> "getallcommits"
> > > > > > > >>     (procedure "readcache" line 80)
> > > > > > > >>     invoked from within
> > > > > > > >> "readcache file827e200"
> > > > > > > >>     ("eval" body line 1)
> > > > > > > >>     invoked from within
> > > > > > > >> "eval $script"
> > > > > > > >>     (procedure "dorunq" line 11)
> > > > > > > >>     invoked from within
> > > > > > > >> "dorunq"
> > > > > > > >>     ("after" script)
> > > > > > > >>
> > > > > > > >> Happy to gather whatever data needed.
> > > > > > > >> Thanks!
> > > > > > > >> - Bret Barkelew
> > > > > > >
> > > > >
> >

```

## Johannes Schindelin, 2019-05-29 18:07

Subject: Re: git version 2.20.1.windows.1 throws file name too long in gitk
Message-ID: <nycvar.QRO.7.76.6.1905292004380.44@tvgsbejvaqbjf.bet>
URL: https://gitlist.dev/e/nycvar.QRO.7.76.6.1905292004380.44%40tvgsbejvaqbjf.bet
In-Reply-To: <CAGTkKagwzceU51O6dK_6-MRZdEW52-xEFoGBVf9z9XLVEJoAGg@mail.gmail.com>

```
Hi Bret,

On Wed, 29 May 2019, Bret Barkelew wrote:

> I know it's an incredibly late reply, but I have not seen this issue
> reappear since the patches. Thank you very much for helping!

It might be late, but it is even more welcome! Thanks for the feedback
(and I am particularly happy that it works for you).

Ciao,
Johannes

P.S.: For lurkers, I just realized that I never linked to the patches:
https://github.com/git-for-windows/git/pull/2170

As this PR really only touches code that is already in Git for Windows,
but not yet in git.git, I think I'll try to find some time post-v2.22.0 to
brush up those gitk patches and contribute them to the Git mailing list
for review.

> On Sat, Apr 27, 2019 at 4:20 PM Johannes Schindelin
> <Johannes.Schindelin@gmx.de> wrote:
> >
> > Hi Bret,
> >
> > On Thu, 18 Apr 2019, Bret Barkelew wrote:
> >
> > > This issue is now being reported by more users inside MS. I'll also
> > > reach out to the Git for Windows advocacy group to see if they have
> > > any ideas.
> > >
> > > I have not had time to figure out the inner workings of Tcl/Tk. Is
> > > there any way to turn on tracing/logging in Git for which commands are
> > > being called by gitk?
> >
> > Thank you for reaching out with detailed information internally, I am
> > happy to report that together with the help of Max Kirillov, this is now
> > resolved and a snapshot is available from
> > https://wingit.blob.core.windows.net/files/index.html that has the fix.
> >
> > Ciao,
> > Johannes
> >
> > > On Thu, Jan 10, 2019 at 10:55 AM Bret Barkelew <bret@corthon.com> wrote:
> > > >
> > > > On Thu, Jan 10, 2019 at 7:20 AM Johannes Schindelin
> > > > <Johannes.Schindelin@gmx.de> wrote:
> > > > >
> > > > > Hi Bret,
> > > > >
> > > > > in that case, please try to find a way to trace the commands in a Tcl/Tk
> > > > > program (which gitk is) and see which command triggers the error.
> > > >
> > > > Er... that's a little out of my depth. I'll see if I can find time to learn.
> > > > Meanwhile, is there any way to request better instrumentation for the
> > > > error dialog so this data could have been collected for me?
> > > >
> > > > >
> > > > > Ciao,
> > > > > Johannes
> > > > >
> > > > >
> > > > > On Wed, 9 Jan 2019, Bret Barkelew wrote:
> > > > >
> > > > > > Will try to reply in-line, when appropriate.
> > > > > > The latest snapshot (git version 2.20.1.windows.1.5.g6b286585b1) still
> > > > > > has the issue.
> > > > > >
> > > > > > - Bret
> > > > > >
> > > > > >
> > > > > > On Wed, Jan 9, 2019 at 10:39 AM Johannes Schindelin
> > > > > > <Johannes.Schindelin@gmx.de> wrote:
> > > > > > >
> > > > > > > Hi Bret,
> > > > > > >
> > > > > > >
> > > > > > > On Thu, 3 Jan 2019, Bret Barkelew wrote:
> > > > > > >
> > > > > > > > They are the exact same path (with a different drive letter).
> > > > > > >
> > > > > > > [it's a bit hard to follow the thread if you top-post a reply to an
> > > > > > > inline-replied answer, maybe imitate the style of other mails in the
> > > > > > > future.]
> > > > > > >
> > > > > > > > Another thing I've been able to confirm is I uninstalled git 2.20.1
> > > > > > > > and installed 2.19.0 on the failing system, and the older version of
> > > > > > > > Git works.
> > > > > > > > I've also tried a suggested fix I saw elsewhere to enable long path
> > > > > > > > names in the Windows registry, which did not resolve the issue with
> > > > > > > > git 2.20.1.
> > > > > > > >
> > > > > > > > Happy to collect any additional data.
> > > > > > >
> > > > > > > Please try the latest snapshot at
> > > > > > > https://wingit.blob.core.windows.net/files/index.html (I *think* the bug
> > > > > > > might be fixed via
> > > > > > > https://github.com/git-for-windows/MINGW-packages/pull/32).
> > > > > > >
> > > > > > > Ciao,
> > > > > > > Johannes
> > > > > > >
> > > > > > > > - Bret
> > > > > > > >
> > > > > > > > On Thu, Jan 3, 2019 at 7:10 PM Bryan Turner <bturner@atlassian.com> wrote:
> > > > > > > > >
> > > > > > > > > On Thu, Jan 3, 2019 at 6:21 PM Bret Barkelew <bret@corthon.com> wrote:
> > > > > > > > >>
> > > > > > > > >> When I open gitk in a particular repository under this version of Git
> > > > > > > > >> for Windows, I now get a dialog box that says "Error: couldn't execute
> > > > > > > > >> "git": file name too long". I've noticed that the most pronounced
> > > > > > > > >> effect is that I cannot see the file diffs (or sometimes the file name
> > > > > > > > >> list) for any of the commits. I don't know the exact repro, but I've
> > > > > > > > >> narrowed down the following things:
> > > > > > > > >>
> > > > > > > > >> - This does not happen with the same repo if I use a system that has
> > > > > > > > >> git 2.19.0.windows.1 on another machine.
> > > > > > > > >> - This does not happen on my current machine in a freshly cloned repo.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > How “deep” are the paths to the different clones on the different systems? Are all of the clones at exactly the same path on disk?
> > > > > > > > >
> > > > > > > > > Git on Windows is (by defaulted) limited by MAX_PATH, which is 260 characters. That length is calculated including the path to the repository itself and then to the file inside the repository. That means, for example, a given repository cloned to C:\repo may not have issues, but the same repository cloned to C:\Users\Bryan\Documents\workspaces\repo may.
> > > > > > > > >
> > > > > > > > >>
> > > > > > > > >> However, as soon as the remote updates with any changes on a given
> > > > > > > > >> fetch/pull, the repo is put in a bad state permanently.
> > > > > > > > >>
> > > > > > > > >> I've pasted the output from gitk below...
> > > > > > > > >>
> > > > > > > > >> couldn't execute "git": file name too long
> > > > > > > > >> couldn't execute "git": file name too long
> > > > > > > > >>     while executing
> > > > > > > > >> "open $cmd r"
> > > > > > > > >>     (procedure "getallcommits" line 48)
> > > > > > > > >>     invoked from within
> > > > > > > > >> "getallcommits"
> > > > > > > > >>     (procedure "readcache" line 80)
> > > > > > > > >>     invoked from within
> > > > > > > > >> "readcache file827e200"
> > > > > > > > >>     ("eval" body line 1)
> > > > > > > > >>     invoked from within
> > > > > > > > >> "eval $script"
> > > > > > > > >>     (procedure "dorunq" line 11)
> > > > > > > > >>     invoked from within
> > > > > > > > >> "dorunq"
> > > > > > > > >>     ("after" script)
> > > > > > > > >>
> > > > > > > > >> Happy to gather whatever data needed.
> > > > > > > > >> Thanks!
> > > > > > > > >> - Bret Barkelew
> > > > > > > >
> > > > > >
> > >
>

```
