{"thread":{"id":"63049","subject":"[Windows] Severe problems after upgrading to 2.48.1.windows.1","startedAt":"2025-03-03T15:21:35Z","lastAt":"2025-07-02T09:25:44Z","messageCount":10,"participants":["hohwiller","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"513405","messageId":"VI1PR02MB64955FD0B8A0B8C4438F605FFBC92@VI1PR02MB6495.eurprd02.prod.outlook.com","threadId":"63049","inReplyTo":null,"subject":"[Windows] Severe problems after upgrading to 2.48.1.windows.1","fromName":"","fromEmail":"hohwiller","sentAt":"2025-03-03T15:20:22Z","receivedAt":"2025-03-03T15:21:35Z","isPatch":false,"sender":{"key":"hohwiller","avatar":null},"body":"Dear Git gurus,\n\nThanks for making git – the greatest VCS ever!\n\nI just upgraded to 2.48.1.windows.1 (reinstall via Git-2.48.1-64-bit.exe).\nAlso I kept the checkbox to cache files (new feature?) – maybe a mistake, let see.\n\nAfter the upgrade, I pulled some repo with git-fork and got this error:\nerror: could not delete references: cannot lock ref 'refs/remotes/origin/bugfix/XY-74488': Unable to create 'D:/projects/projectname/workspaces/main/projectname/.git/refs/remotes/origin/bugfix/XY-74488.lock': File exists.\n\nI looked locally (even in CMD with copy & paste of the exact file reference) but the lock file is NOT there.\nI repeat the pull and get the same error, but no such lock file exists.\n\nTo avoid external side-effects from git-fork, I opened a new git-bash and called “git pull” manually in the terminal.\nThis did not give me any error but gave me this:\n$ git pull\nFrom ssh://git.company.com/repos/projectname\n   72477d57f026..de79f4dbbf68  …\n* [new branch] …\n* [new branch] …\n* [new branch] …\n* [new branch] …\n* [new branch] …\n* [new branch] …\n* [new branch] …\n   ce3979d639d7..b80b70a56da7 …\n$ echo $?\n1\n\nSo what could be the error leading to exit code 1?\n\nAlmost the same happens for git-fetch.\n\nI downgraded to git version 2.47.1.windows.2 and after that tried the same again.\nA difference is that now I additionally I get logs like this at the top\n$ git pull\nremote: Enumerating objects: 269, done.\nremote: Counting objects: 100% (143/143), done.\nremote: Compressing objects: 100% (41/41), done.\nremote: Total 269 (delta 89), reused 87 (delta 87), pack-reused 126\nReceiving objects: 100% (269/269), 59.37 KiB | 2.58 MiB/s, done.\nResolving deltas: 100% (94/94), completed with 51 local objects.\nFrom ssh://git.company.com/repos/projectname\n…\n$ echo $?\n1\n\nLooks familiar. Is it a bug or a feature that the latest git stops logging these status information?\n\nI have various other git repos that continue to work fine so I now rather think that this is not a general bug in git pull/fetch but related to the specific repo.\nHowever, that used to work for years before I upgraded today.\n\nStatus on that repo says:\n$ git status\nOn branch main\nYour branch is behind 'origin/main' by 387 commits, and can be fast-forwarded.\n  (use \"git pull\" to update your local branch)\n\nUntracked files:\n  (use \"git add <file>...\" to include in what will be committed)\n        find-tests.sh\n\nnothing added to commit but untracked files present (use \"git add\" to track)\n\nSorry to bother but do you have any further hints or ideas, what I could try to fix my problem?\n\nKind regards\n  Jörg\n\n\n________________________________\n\nFirma: Capgemini Deutschland GmbH\nAufsichtsratsvorsitzender: Dr. Volkmar Varnhagen\nGeschäftsführer: Henrik Ljungström (Sprecher) • Jost Förster • Felizitas Graeber • Vera Schierholt\n\nSitz: Berlin, Amtsgericht Berlin-Charlottenburg, HRB 98814\nThis message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.\n"},{"id":"515441","messageId":"d3f55106-8f87-b535-1c7c-29d382378342@gmx.de","threadId":"63049","inReplyTo":"VI1PR02MB64955FD0B8A0B8C4438F605FFBC92@VI1PR02MB6495.eurprd02.prod.outlook.com","subject":"Re: [Windows] Severe problems after upgrading to 2.48.1.windows.1","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2025-04-01T15:45:29Z","receivedAt":"2025-04-01T15:45:31Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Jörg,\n\nOn Mon, 3 Mar 2025, Hohwiller, Jörg wrote:\n\n> I just upgraded to 2.48.1.windows.1 (reinstall via Git-2.48.1-64-bit.exe).\n> Also I kept the checkbox to cache files (new feature?) – maybe a mistake, let see.\n\nIf you are referring to FSCache, no that's not a new feature.\n\n> After the upgrade, I pulled some repo with git-fork and got this error:\n> error: could not delete references: cannot lock ref 'refs/remotes/origin/bugfix/XY-74488': Unable to create 'D:/projects/projectname/workspaces/main/projectname/.git/refs/remotes/origin/bugfix/XY-74488.lock': File exists.\n\nWhile this looks different than\nhttps://github.com/git-for-windows/git/pull/5515 (where writing to a ReFS\ndrive on Windows 2022 was broken by a regression), the root cause as well\nas its fix could be the same. Can you test the latest snapshot at\nhttps://gitforwindows.org/git-snapshots/ to confirm or refute this\nhypothesis?\n\nCiao,\nJohannes\n\n>\n> I looked locally (even in CMD with copy & paste of the exact file reference) but the lock file is NOT there.\n> I repeat the pull and get the same error, but no such lock file exists.\n>\n> To avoid external side-effects from git-fork, I opened a new git-bash and called “git pull” manually in the terminal.\n> This did not give me any error but gave me this:\n> $ git pull\n> From ssh://git.company.com/repos/projectname\n>    72477d57f026..de79f4dbbf68  …\n> * [new branch] …\n> * [new branch] …\n> * [new branch] …\n> * [new branch] …\n> * [new branch] …\n> * [new branch] …\n> * [new branch] …\n>    ce3979d639d7..b80b70a56da7 …\n> $ echo $?\n> 1\n>\n> So what could be the error leading to exit code 1?\n>\n> Almost the same happens for git-fetch.\n>\n> I downgraded to git version 2.47.1.windows.2 and after that tried the same again.\n> A difference is that now I additionally I get logs like this at the top\n> $ git pull\n> remote: Enumerating objects: 269, done.\n> remote: Counting objects: 100% (143/143), done.\n> remote: Compressing objects: 100% (41/41), done.\n> remote: Total 269 (delta 89), reused 87 (delta 87), pack-reused 126\n> Receiving objects: 100% (269/269), 59.37 KiB | 2.58 MiB/s, done.\n> Resolving deltas: 100% (94/94), completed with 51 local objects.\n> From ssh://git.company.com/repos/projectname\n> …\n> $ echo $?\n> 1\n>\n> Looks familiar. Is it a bug or a feature that the latest git stops logging these status information?\n>\n> I have various other git repos that continue to work fine so I now rather think that this is not a general bug in git pull/fetch but related to the specific repo.\n> However, that used to work for years before I upgraded today.\n>\n> Status on that repo says:\n> $ git status\n> On branch main\n> Your branch is behind 'origin/main' by 387 commits, and can be fast-forwarded.\n>   (use \"git pull\" to update your local branch)\n>\n> Untracked files:\n>   (use \"git add <file>...\" to include in what will be committed)\n>         find-tests.sh\n>\n> nothing added to commit but untracked files present (use \"git add\" to track)\n>\n> Sorry to bother but do you have any further hints or ideas, what I could try to fix my problem?\n>\n> Kind regards\n>   Jörg\n>\n>\n> ________________________________\n>\n> Firma: Capgemini Deutschland GmbH\n> Aufsichtsratsvorsitzender: Dr. Volkmar Varnhagen\n> Geschäftsführer: Henrik Ljungström (Sprecher) • Jost Förster • Felizitas Graeber • Vera Schierholt\n>\n> Sitz: Berlin, Amtsgericht Berlin-Charlottenburg, HRB 98814\n> This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.\n>\n"},{"id":"515668","messageId":"VI1PR02MB6495A9779866FD337F2F8E1CFBA92@VI1PR02MB6495.eurprd02.prod.outlook.com","threadId":"63049","inReplyTo":"d3f55106-8f87-b535-1c7c-29d382378342@gmx.de","subject":"RE: [Windows] Severe problems after upgrading to 2.48.1.windows.1","fromName":"","fromEmail":"hohwiller","sentAt":"2025-04-04T14:11:49Z","receivedAt":"2025-04-04T14:13:10Z","isPatch":false,"sender":{"key":"hohwiller","avatar":null},"body":"Hi Johannes,\n\nThanks for your response and suggestions.\nI downloaded and installed the latest SNAPSHOT:\n\n$ git -v\ngit version 2.49.0.windows.1.7.g4ca71ba531.20250326122305\n\nHowever, the error still remains. I cannot pull my repo without the error I was referring to.\nThis blocks my workflows.\nThere are workarounds like using `git pull origin main` manually in git-bash but it is quite inconvenient not being able to use git via IntelliJ or git-fork without errors.\n\nKind regards\n  Jörg\n\n-----Original Message-----\nFrom: Johannes Schindelin <Johannes.Schindelin@gmx.de> \nSent: Tuesday, April 1, 2025 17:45\nTo: Hohwiller, Jörg <joerg.hohwiller@capgemini.com>\nCc: git@vger.kernel.org\nSubject: Re: [Windows] Severe problems after upgrading to 2.48.1.windows.1\n\n******This mail has been sent from an external source. Do not reply to it, or open any links/attachments unless you are sure of the sender's identity.******\n\nHi Jörg,\n\nOn Mon, 3 Mar 2025, Hohwiller, Jörg wrote:\n\n> I just upgraded to 2.48.1.windows.1 (reinstall via Git-2.48.1-64-bit.exe).\n> Also I kept the checkbox to cache files (new feature?) – maybe a mistake, let see.\n\nIf you are referring to FSCache, no that's not a new feature.\n\n> After the upgrade, I pulled some repo with git-fork and got this error:\n> error: could not delete references: cannot lock ref 'refs/remotes/origin/bugfix/XY-74488': Unable to create 'D:/projects/projectname/workspaces/main/projectname/.git/refs/remotes/origin/bugfix/XY-74488.lock': File exists.\n\nWhile this looks different than\nhttps://github.com/git-for-windows/git/pull/5515 (where writing to a ReFS drive on Windows 2022 was broken by a regression), the root cause as well as its fix could be the same. Can you test the latest snapshot at https://gitforwindows.org/git-snapshots/ to confirm or refute this hypothesis?\n\nCiao,\nJohannes\n\n>\n> I looked locally (even in CMD with copy & paste of the exact file reference) but the lock file is NOT there.\n> I repeat the pull and get the same error, but no such lock file exists.\n>\n> To avoid external side-effects from git-fork, I opened a new git-bash and called “git pull” manually in the terminal.\n> This did not give me any error but gave me this:\n> $ git pull\n> From ssh://git.company.com/repos/projectname\n>    72477d57f026..de79f4dbbf68  …\n> * [new branch] …\n> * [new branch] …\n> * [new branch] …\n> * [new branch] …\n> * [new branch] …\n> * [new branch] …\n> * [new branch] …\n>    ce3979d639d7..b80b70a56da7 …\n> $ echo $?\n> 1\n>\n> So what could be the error leading to exit code 1?\n>\n> Almost the same happens for git-fetch.\n>\n> I downgraded to git version 2.47.1.windows.2 and after that tried the same again.\n> A difference is that now I additionally I get logs like this at the \n> top $ git pull\n> remote: Enumerating objects: 269, done.\n> remote: Counting objects: 100% (143/143), done.\n> remote: Compressing objects: 100% (41/41), done.\n> remote: Total 269 (delta 89), reused 87 (delta 87), pack-reused 126 \n> Receiving objects: 100% (269/269), 59.37 KiB | 2.58 MiB/s, done.\n> Resolving deltas: 100% (94/94), completed with 51 local objects.\n> From ssh://git.company.com/repos/projectname\n> …\n> $ echo $?\n> 1\n>\n> Looks familiar. Is it a bug or a feature that the latest git stops logging these status information?\n>\n> I have various other git repos that continue to work fine so I now rather think that this is not a general bug in git pull/fetch but related to the specific repo.\n> However, that used to work for years before I upgraded today.\n>\n> Status on that repo says:\n> $ git status\n> On branch main\n> Your branch is behind 'origin/main' by 387 commits, and can be fast-forwarded.\n>   (use \"git pull\" to update your local branch)\n>\n> Untracked files:\n>   (use \"git add <file>...\" to include in what will be committed)\n>         find-tests.sh\n>\n> nothing added to commit but untracked files present (use \"git add\" to \n> track)\n>\n> Sorry to bother but do you have any further hints or ideas, what I could try to fix my problem?\n>\n> Kind regards\n>   Jörg\n>\n>\n> ________________________________\n>\n> Firma: Capgemini Deutschland GmbH\n> Aufsichtsratsvorsitzender: Dr. Volkmar Varnhagen\n> Geschäftsführer: Henrik Ljungström (Sprecher) • Jost Förster • \n> Felizitas Graeber • Vera Schierholt\n>\n> Sitz: Berlin, Amtsgericht Berlin-Charlottenburg, HRB 98814 This \n> message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.\n>\nThis message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.\n"},{"id":"516669","messageId":"a81435f0-f09d-9197-9776-2402457fdef0@gmx.de","threadId":"63049","inReplyTo":"VI1PR02MB6495A9779866FD337F2F8E1CFBA92@VI1PR02MB6495.eurprd02.prod.outlook.com","subject":"RE: [Windows] Severe problems after upgrading to 2.48.1.windows.1","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2025-04-24T13:09:56Z","receivedAt":"2025-04-24T13:09:59Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Jörg,\n\nOn Fri, 4 Apr 2025, Hohwiller, Jörg wrote:\n\n> Thanks for your response and suggestions.\n> I downloaded and installed the latest SNAPSHOT:\n> \n> $ git -v\n> git version 2.49.0.windows.1.7.g4ca71ba531.20250326122305\n> \n> However, the error still remains. I cannot pull my repo without the error I was referring to.\n\nI should have clarified that you will need to remove the `.lock` file\nmanually, unfortunately, before trying again (if it exists, that is).\n\nCiao,\nJohannes\n\n> This blocks my workflows.\n> There are workarounds like using `git pull origin main` manually in git-bash but it is quite inconvenient not being able to use git via IntelliJ or git-fork without errors.\n> \n> Kind regards\n>   Jörg\n> \n> -----Original Message-----\n> From: Johannes Schindelin <Johannes.Schindelin@gmx.de> \n> Sent: Tuesday, April 1, 2025 17:45\n> To: Hohwiller, Jörg <joerg.hohwiller@capgemini.com>\n> Cc: git@vger.kernel.org\n> Subject: Re: [Windows] Severe problems after upgrading to 2.48.1.windows.1\n> \n> ******This mail has been sent from an external source. Do not reply to it, or open any links/attachments unless you are sure of the sender's identity.******\n> \n> Hi Jörg,\n> \n> On Mon, 3 Mar 2025, Hohwiller, Jörg wrote:\n> \n> > I just upgraded to 2.48.1.windows.1 (reinstall via Git-2.48.1-64-bit.exe).\n> > Also I kept the checkbox to cache files (new feature?) – maybe a mistake, let see.\n> \n> If you are referring to FSCache, no that's not a new feature.\n> \n> > After the upgrade, I pulled some repo with git-fork and got this error:\n> > error: could not delete references: cannot lock ref 'refs/remotes/origin/bugfix/XY-74488': Unable to create 'D:/projects/projectname/workspaces/main/projectname/.git/refs/remotes/origin/bugfix/XY-74488.lock': File exists.\n> \n> While this looks different than\n> https://github.com/git-for-windows/git/pull/5515 (where writing to a ReFS drive on Windows 2022 was broken by a regression), the root cause as well as its fix could be the same. Can you test the latest snapshot at https://gitforwindows.org/git-snapshots/ to confirm or refute this hypothesis?\n> \n> Ciao,\n> Johannes\n> \n> >\n> > I looked locally (even in CMD with copy & paste of the exact file reference) but the lock file is NOT there.\n> > I repeat the pull and get the same error, but no such lock file exists.\n> >\n> > To avoid external side-effects from git-fork, I opened a new git-bash and called “git pull” manually in the terminal.\n> > This did not give me any error but gave me this:\n> > $ git pull\n> > From ssh://git.company.com/repos/projectname\n> >    72477d57f026..de79f4dbbf68  …\n> > * [new branch] …\n> > * [new branch] …\n> > * [new branch] …\n> > * [new branch] …\n> > * [new branch] …\n> > * [new branch] …\n> > * [new branch] …\n> >    ce3979d639d7..b80b70a56da7 …\n> > $ echo $?\n> > 1\n> >\n> > So what could be the error leading to exit code 1?\n> >\n> > Almost the same happens for git-fetch.\n> >\n> > I downgraded to git version 2.47.1.windows.2 and after that tried the same again.\n> > A difference is that now I additionally I get logs like this at the \n> > top $ git pull\n> > remote: Enumerating objects: 269, done.\n> > remote: Counting objects: 100% (143/143), done.\n> > remote: Compressing objects: 100% (41/41), done.\n> > remote: Total 269 (delta 89), reused 87 (delta 87), pack-reused 126 \n> > Receiving objects: 100% (269/269), 59.37 KiB | 2.58 MiB/s, done.\n> > Resolving deltas: 100% (94/94), completed with 51 local objects.\n> > From ssh://git.company.com/repos/projectname\n> > …\n> > $ echo $?\n> > 1\n> >\n> > Looks familiar. Is it a bug or a feature that the latest git stops logging these status information?\n> >\n> > I have various other git repos that continue to work fine so I now rather think that this is not a general bug in git pull/fetch but related to the specific repo.\n> > However, that used to work for years before I upgraded today.\n> >\n> > Status on that repo says:\n> > $ git status\n> > On branch main\n> > Your branch is behind 'origin/main' by 387 commits, and can be fast-forwarded.\n> >   (use \"git pull\" to update your local branch)\n> >\n> > Untracked files:\n> >   (use \"git add <file>...\" to include in what will be committed)\n> >         find-tests.sh\n> >\n> > nothing added to commit but untracked files present (use \"git add\" to \n> > track)\n> >\n> > Sorry to bother but do you have any further hints or ideas, what I could try to fix my problem?\n> >\n> > Kind regards\n> >   Jörg\n> >\n> >\n> > ________________________________\n> >\n> > Firma: Capgemini Deutschland GmbH\n> > Aufsichtsratsvorsitzender: Dr. Volkmar Varnhagen\n> > Geschäftsführer: Henrik Ljungström (Sprecher) • Jost Förster • \n> > Felizitas Graeber • Vera Schierholt\n> >\n> > Sitz: Berlin, Amtsgericht Berlin-Charlottenburg, HRB 98814 This \n> > message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.\n> >\n> This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.\n> \n"},{"id":"516670","messageId":"VI1PR02MB6495D1DDBF55288A5C75B15CFB852@VI1PR02MB6495.eurprd02.prod.outlook.com","threadId":"63049","inReplyTo":"a81435f0-f09d-9197-9776-2402457fdef0@gmx.de","subject":"RE: [Windows] Severe problems after upgrading to 2.48.1.windows.1","fromName":"","fromEmail":"hohwiller","sentAt":"2025-04-24T13:12:59Z","receivedAt":"2025-04-24T13:14:10Z","isPatch":false,"sender":{"key":"hohwiller","avatar":null},"body":"The `.lock` file never exists. I get this message on and on but the lock file referenced there with full path does not exist.\nI used copy & paste to the file to avoid typos, etc.\n\nI also observed that clients like git-fork keep stalling (everything greys out and I have to kill the process) frequently since this git update.\n\n-----Original Message-----\nFrom: Johannes Schindelin <Johannes.Schindelin@gmx.de> \nSent: Thursday, April 24, 2025 15:10\nTo: Hohwiller, Jörg <joerg.hohwiller@capgemini.com>\nCc: git@vger.kernel.org\nSubject: RE: [Windows] Severe problems after upgrading to 2.48.1.windows.1\n\n******This mail has been sent from an external source. Do not reply to it, or open any links/attachments unless you are sure of the sender's identity.******\n\nHi Jörg,\n\nOn Fri, 4 Apr 2025, Hohwiller, Jörg wrote:\n\n> Thanks for your response and suggestions.\n> I downloaded and installed the latest SNAPSHOT:\n> \n> $ git -v\n> git version 2.49.0.windows.1.7.g4ca71ba531.20250326122305\n> \n> However, the error still remains. I cannot pull my repo without the error I was referring to.\n\nI should have clarified that you will need to remove the `.lock` file manually, unfortunately, before trying again (if it exists, that is).\n\nCiao,\nJohannes\n\n> This blocks my workflows.\n> There are workarounds like using `git pull origin main` manually in git-bash but it is quite inconvenient not being able to use git via IntelliJ or git-fork without errors.\n> \n> Kind regards\n>   Jörg\n> \n> -----Original Message-----\n> From: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n> Sent: Tuesday, April 1, 2025 17:45\n> To: Hohwiller, Jörg <joerg.hohwiller@capgemini.com>\n> Cc: git@vger.kernel.org\n> Subject: Re: [Windows] Severe problems after upgrading to \n> 2.48.1.windows.1\n> \n> ******This mail has been sent from an external source. Do not reply to \n> it, or open any links/attachments unless you are sure of the sender's \n> identity.******\n> \n> Hi Jörg,\n> \n> On Mon, 3 Mar 2025, Hohwiller, Jörg wrote:\n> \n> > I just upgraded to 2.48.1.windows.1 (reinstall via Git-2.48.1-64-bit.exe).\n> > Also I kept the checkbox to cache files (new feature?) – maybe a mistake, let see.\n> \n> If you are referring to FSCache, no that's not a new feature.\n> \n> > After the upgrade, I pulled some repo with git-fork and got this error:\n> > error: could not delete references: cannot lock ref 'refs/remotes/origin/bugfix/XY-74488': Unable to create 'D:/projects/projectname/workspaces/main/projectname/.git/refs/remotes/origin/bugfix/XY-74488.lock': File exists.\n> \n> While this looks different than\n> https://github.com/git-for-windows/git/pull/5515 (where writing to a ReFS drive on Windows 2022 was broken by a regression), the root cause as well as its fix could be the same. Can you test the latest snapshot at https://gitforwindows.org/git-snapshots/ to confirm or refute this hypothesis?\n> \n> Ciao,\n> Johannes\n> \n> >\n> > I looked locally (even in CMD with copy & paste of the exact file reference) but the lock file is NOT there.\n> > I repeat the pull and get the same error, but no such lock file exists.\n> >\n> > To avoid external side-effects from git-fork, I opened a new git-bash and called “git pull” manually in the terminal.\n> > This did not give me any error but gave me this:\n> > $ git pull\n> > From ssh://git.company.com/repos/projectname\n> >    72477d57f026..de79f4dbbf68  …\n> > * [new branch] …\n> > * [new branch] …\n> > * [new branch] …\n> > * [new branch] …\n> > * [new branch] …\n> > * [new branch] …\n> > * [new branch] …\n> >    ce3979d639d7..b80b70a56da7 …\n> > $ echo $?\n> > 1\n> >\n> > So what could be the error leading to exit code 1?\n> >\n> > Almost the same happens for git-fetch.\n> >\n> > I downgraded to git version 2.47.1.windows.2 and after that tried the same again.\n> > A difference is that now I additionally I get logs like this at the \n> > top $ git pull\n> > remote: Enumerating objects: 269, done.\n> > remote: Counting objects: 100% (143/143), done.\n> > remote: Compressing objects: 100% (41/41), done.\n> > remote: Total 269 (delta 89), reused 87 (delta 87), pack-reused 126 \n> > Receiving objects: 100% (269/269), 59.37 KiB | 2.58 MiB/s, done.\n> > Resolving deltas: 100% (94/94), completed with 51 local objects.\n> > From ssh://git.company.com/repos/projectname\n> > …\n> > $ echo $?\n> > 1\n> >\n> > Looks familiar. Is it a bug or a feature that the latest git stops logging these status information?\n> >\n> > I have various other git repos that continue to work fine so I now rather think that this is not a general bug in git pull/fetch but related to the specific repo.\n> > However, that used to work for years before I upgraded today.\n> >\n> > Status on that repo says:\n> > $ git status\n> > On branch main\n> > Your branch is behind 'origin/main' by 387 commits, and can be fast-forwarded.\n> >   (use \"git pull\" to update your local branch)\n> >\n> > Untracked files:\n> >   (use \"git add <file>...\" to include in what will be committed)\n> >         find-tests.sh\n> >\n> > nothing added to commit but untracked files present (use \"git add\" \n> > to\n> > track)\n> >\n> > Sorry to bother but do you have any further hints or ideas, what I could try to fix my problem?\n> >\n> > Kind regards\n> >   Jörg\n> >\n> >\n> > ________________________________\n> >\n> > Firma: Capgemini Deutschland GmbH\n> > Aufsichtsratsvorsitzender: Dr. Volkmar Varnhagen\n> > Geschäftsführer: Henrik Ljungström (Sprecher) • Jost Förster • \n> > Felizitas Graeber • Vera Schierholt\n> >\n> > Sitz: Berlin, Amtsgericht Berlin-Charlottenburg, HRB 98814 This \n> > message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.\n> >\n> This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.\n> \n"},{"id":"516675","messageId":"VI1PR02MB64951BAFB488287E136125AFFB852@VI1PR02MB6495.eurprd02.prod.outlook.com","threadId":"63049","inReplyTo":"a81435f0-f09d-9197-9776-2402457fdef0@gmx.de","subject":"RE: [Windows] Severe problems after upgrading to 2.48.1.windows.1","fromName":"","fromEmail":"hohwiller","sentAt":"2025-04-24T14:29:09Z","receivedAt":"2025-04-24T14:30:24Z","isPatch":false,"sender":{"key":"hohwiller","avatar":null},"body":"Hi Johannes,\n\nAlso I see this error every time I run \"git pull origin main\":\n\nfatal: failed to run reflog\nerror: task 'gc' failed\n\nThe pull still works but I guess something is really wrong but cannot tell exactly what.\n\nKind regards\n  Jörg\n\n-----Original Message-----\nFrom: Johannes Schindelin <Johannes.Schindelin@gmx.de> \nSent: Thursday, April 24, 2025 15:10\nTo: Hohwiller, Jörg <joerg.hohwiller@capgemini.com>\nCc: git@vger.kernel.org\nSubject: RE: [Windows] Severe problems after upgrading to 2.48.1.windows.1\n\n******This mail has been sent from an external source. Do not reply to it, or open any links/attachments unless you are sure of the sender's identity.******\n\nHi Jörg,\n\nOn Fri, 4 Apr 2025, Hohwiller, Jörg wrote:\n\n> Thanks for your response and suggestions.\n> I downloaded and installed the latest SNAPSHOT:\n> \n> $ git -v\n> git version 2.49.0.windows.1.7.g4ca71ba531.20250326122305\n> \n> However, the error still remains. I cannot pull my repo without the error I was referring to.\n\nI should have clarified that you will need to remove the `.lock` file manually, unfortunately, before trying again (if it exists, that is).\n\nCiao,\nJohannes\n\n> This blocks my workflows.\n> There are workarounds like using `git pull origin main` manually in git-bash but it is quite inconvenient not being able to use git via IntelliJ or git-fork without errors.\n> \n> Kind regards\n>   Jörg\n> \n> -----Original Message-----\n> From: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n> Sent: Tuesday, April 1, 2025 17:45\n> To: Hohwiller, Jörg <joerg.hohwiller@capgemini.com>\n> Cc: git@vger.kernel.org\n> Subject: Re: [Windows] Severe problems after upgrading to \n> 2.48.1.windows.1\n> \n> ******This mail has been sent from an external source. Do not reply to \n> it, or open any links/attachments unless you are sure of the sender's \n> identity.******\n> \n> Hi Jörg,\n> \n> On Mon, 3 Mar 2025, Hohwiller, Jörg wrote:\n> \n> > I just upgraded to 2.48.1.windows.1 (reinstall via Git-2.48.1-64-bit.exe).\n> > Also I kept the checkbox to cache files (new feature?) – maybe a mistake, let see.\n> \n> If you are referring to FSCache, no that's not a new feature.\n> \n> > After the upgrade, I pulled some repo with git-fork and got this error:\n> > error: could not delete references: cannot lock ref 'refs/remotes/origin/bugfix/XY-74488': Unable to create 'D:/projects/projectname/workspaces/main/projectname/.git/refs/remotes/origin/bugfix/XY-74488.lock': File exists.\n> \n> While this looks different than\n> https://github.com/git-for-windows/git/pull/5515 (where writing to a ReFS drive on Windows 2022 was broken by a regression), the root cause as well as its fix could be the same. Can you test the latest snapshot at https://gitforwindows.org/git-snapshots/ to confirm or refute this hypothesis?\n> \n> Ciao,\n> Johannes\n> \n> >\n> > I looked locally (even in CMD with copy & paste of the exact file reference) but the lock file is NOT there.\n> > I repeat the pull and get the same error, but no such lock file exists.\n> >\n> > To avoid external side-effects from git-fork, I opened a new git-bash and called “git pull” manually in the terminal.\n> > This did not give me any error but gave me this:\n> > $ git pull\n> > From ssh://git.company.com/repos/projectname\n> >    72477d57f026..de79f4dbbf68  …\n> > * [new branch] …\n> > * [new branch] …\n> > * [new branch] …\n> > * [new branch] …\n> > * [new branch] …\n> > * [new branch] …\n> > * [new branch] …\n> >    ce3979d639d7..b80b70a56da7 …\n> > $ echo $?\n> > 1\n> >\n> > So what could be the error leading to exit code 1?\n> >\n> > Almost the same happens for git-fetch.\n> >\n> > I downgraded to git version 2.47.1.windows.2 and after that tried the same again.\n> > A difference is that now I additionally I get logs like this at the \n> > top $ git pull\n> > remote: Enumerating objects: 269, done.\n> > remote: Counting objects: 100% (143/143), done.\n> > remote: Compressing objects: 100% (41/41), done.\n> > remote: Total 269 (delta 89), reused 87 (delta 87), pack-reused 126 \n> > Receiving objects: 100% (269/269), 59.37 KiB | 2.58 MiB/s, done.\n> > Resolving deltas: 100% (94/94), completed with 51 local objects.\n> > From ssh://git.company.com/repos/projectname\n> > …\n> > $ echo $?\n> > 1\n> >\n> > Looks familiar. Is it a bug or a feature that the latest git stops logging these status information?\n> >\n> > I have various other git repos that continue to work fine so I now rather think that this is not a general bug in git pull/fetch but related to the specific repo.\n> > However, that used to work for years before I upgraded today.\n> >\n> > Status on that repo says:\n> > $ git status\n> > On branch main\n> > Your branch is behind 'origin/main' by 387 commits, and can be fast-forwarded.\n> >   (use \"git pull\" to update your local branch)\n> >\n> > Untracked files:\n> >   (use \"git add <file>...\" to include in what will be committed)\n> >         find-tests.sh\n> >\n> > nothing added to commit but untracked files present (use \"git add\" \n> > to\n> > track)\n> >\n> > Sorry to bother but do you have any further hints or ideas, what I could try to fix my problem?\n> >\n> > Kind regards\n> >   Jörg\n> >\n> >\n> > ________________________________\n> >\n> > Firma: Capgemini Deutschland GmbH\n> > Aufsichtsratsvorsitzender: Dr. Volkmar Varnhagen\n> > Geschäftsführer: Henrik Ljungström (Sprecher) • Jost Förster • \n> > Felizitas Graeber • Vera Schierholt\n> >\n> > Sitz: Berlin, Amtsgericht Berlin-Charlottenburg, HRB 98814 This \n> > message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.\n> >\n> This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.\n> \n"},{"id":"516788","messageId":"74e24bc5-5f19-fcfd-383c-a948ec98ff28@gmx.de","threadId":"63049","inReplyTo":"VI1PR02MB64951BAFB488287E136125AFFB852@VI1PR02MB6495.eurprd02.prod.outlook.com","subject":"RE: [Windows] Severe problems after upgrading to 2.48.1.windows.1","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2025-04-25T11:24:45Z","receivedAt":"2025-04-25T11:24:48Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Jörg,\n\nwould you be able to follow the same advice I have at\nhttps://github.com/git-for-windows/git/issues/5427#issuecomment-2735535941\nto build Git and investigate a bit further (because I cannot reproduce\nyour problem and therefore cannot do that for you):\n\n1. install the Git for Windows SDK:\n   https://gitforwindows.org/#download-sdk\n\n2. Create `/usr/src/git/config.mak` with the following contents to disable compiler optimization and ASLR:\n\n```\nDEVELOPER=1\nifndef NDEBUG\nCFLAGS := $(filter-out -O2,$(CFLAGS))\nASLR_OPTION := -Wl,--dynamicbase\nBASIC_LDFLAGS := $(filter-out $(ASLR_OPTION),$(BASIC_LDFLAGS))\nendif\n```\n\n1.  run `make` in `/usr/src/git/`.\n\nAfter that, you can run Git's executables in GDB like so:\n```\ngdb --args ./git.exe -C /path/to/refs/drive init test-git-repo\n\n```\n\nNow, it is useful to ask the debugger to pause the program when the code path is entered that outputs an error message. The functions in Git that output error messages are `error_builtin()` and `die_builtin()`. So you can set the breakpoints\n\n```\nb error_builtin\nb die_builtin\n```\n\nbefore calling `run` in `gdb` to stop execution at the appropriate time. Doing this will stop execution when the `error_builtin()` function is called, i.e. when the error message you reported would be shown. Once that is the case, you can obtain a back trace with `bt`. Example:\n\n```\n(gdb) bt\n#0  setup_git_directory_gently_1 (nongit_ok=0x0) at setup.c:846\n#1  0x000000000057dfd8 in setup_git_directory_gently (nongit_ok=0x0)\n    at setup.c:937\n#2  0x000000000057e211 in setup_git_directory () at setup.c:1014\n#3  0x0000000000487bfc in cmd_rev_parse (argc=2, argv=0x1951a88, prefix=0x0)\n    at builtin/rev-parse.c:589\n#4  0x000000000040296a in run_builtin (p=0x5fb8e8 <commands+2184>, argc=2,\n    argv=0x1951a88) at git.c:373\n#5  0x0000000000402c8d in handle_builtin (argc=2, argv=0x1951a88) at git.c:579\n#6  0x0000000000402e2a in run_argv (argcp=0x108fe00, argv=0x108fdb8)\n    at git.c:637\n#7  0x0000000000402fb9 in cmd_main (argc=2, argv=0x1951a88) at git.c:709\n#8  0x000000000049f699 in mingw_main (argc=3, argv=0x1951a80)\n    at common-main.c:40\n#9  0x000000000049f64d in main (argc=3, argv=0x3230498) at common-main.c:25\n\n```\n\nThis back trace shows which functions were called by which other functions. The inner-most code location is `#0`, which was called from `#1`, which was called from `#2`, etc. In the example above, the `main()` function called the `mingw_main()` function which in turn called the `cmd_main()` function, and so on, until eventually the `setup_git_directory_gently()` function was called, which then called the `setup_git_directory_gently_1()` function, where the execution was stopped to let you, the user, inspect the current state in the debugger.\n\nYou can inspect the source code at the current code location using the `l` command (or specify a line number or even a file and a line number like so: `l git.c:709`, or a function name, like so: `l run_builtin`).\n\nYou can navigate between the different stack frames using `up` and `down` (which is confusingly the opposite direction as in the list above).\n\nImportantly in this instance, you can go `up` to the function that issues the error message, then inspect the surrounding code with `l`. This should already be very helpful in the investigation to figure _what_ is going wrong, and if all you do to help this ticket is run with the debugging so far and then paste the output of `gdb` in this ticket, it should go a long way to fix this bug.\n\nPlease let us know how it goes!\n\nOn Thu, 24 Apr 2025, Hohwiller, Jörg wrote:\n\n> Hi Johannes,\n> \n> Also I see this error every time I run \"git pull origin main\":\n> \n> fatal: failed to run reflog\n> error: task 'gc' failed\n> \n> The pull still works but I guess something is really wrong but cannot tell exactly what.\n> \n> Kind regards\n>   Jörg\n> \n> -----Original Message-----\n> From: Johannes Schindelin <Johannes.Schindelin@gmx.de> \n> Sent: Thursday, April 24, 2025 15:10\n> To: Hohwiller, Jörg <joerg.hohwiller@capgemini.com>\n> Cc: git@vger.kernel.org\n> Subject: RE: [Windows] Severe problems after upgrading to 2.48.1.windows.1\n> \n> ******This mail has been sent from an external source. Do not reply to it, or open any links/attachments unless you are sure of the sender's identity.******\n> \n> Hi Jörg,\n> \n> On Fri, 4 Apr 2025, Hohwiller, Jörg wrote:\n> \n> > Thanks for your response and suggestions.\n> > I downloaded and installed the latest SNAPSHOT:\n> > \n> > $ git -v\n> > git version 2.49.0.windows.1.7.g4ca71ba531.20250326122305\n> > \n> > However, the error still remains. I cannot pull my repo without the error I was referring to.\n> \n> I should have clarified that you will need to remove the `.lock` file manually, unfortunately, before trying again (if it exists, that is).\n> \n> Ciao,\n> Johannes\n> \n> > This blocks my workflows.\n> > There are workarounds like using `git pull origin main` manually in git-bash but it is quite inconvenient not being able to use git via IntelliJ or git-fork without errors.\n> > \n> > Kind regards\n> >   Jörg\n> > \n> > -----Original Message-----\n> > From: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n> > Sent: Tuesday, April 1, 2025 17:45\n> > To: Hohwiller, Jörg <joerg.hohwiller@capgemini.com>\n> > Cc: git@vger.kernel.org\n> > Subject: Re: [Windows] Severe problems after upgrading to \n> > 2.48.1.windows.1\n> > \n> > ******This mail has been sent from an external source. Do not reply to \n> > it, or open any links/attachments unless you are sure of the sender's \n> > identity.******\n> > \n> > Hi Jörg,\n> > \n> > On Mon, 3 Mar 2025, Hohwiller, Jörg wrote:\n> > \n> > > I just upgraded to 2.48.1.windows.1 (reinstall via Git-2.48.1-64-bit.exe).\n> > > Also I kept the checkbox to cache files (new feature?) – maybe a mistake, let see.\n> > \n> > If you are referring to FSCache, no that's not a new feature.\n> > \n> > > After the upgrade, I pulled some repo with git-fork and got this error:\n> > > error: could not delete references: cannot lock ref 'refs/remotes/origin/bugfix/XY-74488': Unable to create 'D:/projects/projectname/workspaces/main/projectname/.git/refs/remotes/origin/bugfix/XY-74488.lock': File exists.\n> > \n> > While this looks different than\n> > https://github.com/git-for-windows/git/pull/5515 (where writing to a ReFS drive on Windows 2022 was broken by a regression), the root cause as well as its fix could be the same. Can you test the latest snapshot at https://gitforwindows.org/git-snapshots/ to confirm or refute this hypothesis?\n> > \n> > Ciao,\n> > Johannes\n> > \n> > >\n> > > I looked locally (even in CMD with copy & paste of the exact file reference) but the lock file is NOT there.\n> > > I repeat the pull and get the same error, but no such lock file exists.\n> > >\n> > > To avoid external side-effects from git-fork, I opened a new git-bash and called “git pull” manually in the terminal.\n> > > This did not give me any error but gave me this:\n> > > $ git pull\n> > > From ssh://git.company.com/repos/projectname\n> > >    72477d57f026..de79f4dbbf68  …\n> > > * [new branch] …\n> > > * [new branch] …\n> > > * [new branch] …\n> > > * [new branch] …\n> > > * [new branch] …\n> > > * [new branch] …\n> > > * [new branch] …\n> > >    ce3979d639d7..b80b70a56da7 …\n> > > $ echo $?\n> > > 1\n> > >\n> > > So what could be the error leading to exit code 1?\n> > >\n> > > Almost the same happens for git-fetch.\n> > >\n> > > I downgraded to git version 2.47.1.windows.2 and after that tried the same again.\n> > > A difference is that now I additionally I get logs like this at the \n> > > top $ git pull\n> > > remote: Enumerating objects: 269, done.\n> > > remote: Counting objects: 100% (143/143), done.\n> > > remote: Compressing objects: 100% (41/41), done.\n> > > remote: Total 269 (delta 89), reused 87 (delta 87), pack-reused 126 \n> > > Receiving objects: 100% (269/269), 59.37 KiB | 2.58 MiB/s, done.\n> > > Resolving deltas: 100% (94/94), completed with 51 local objects.\n> > > From ssh://git.company.com/repos/projectname\n> > > …\n> > > $ echo $?\n> > > 1\n> > >\n> > > Looks familiar. Is it a bug or a feature that the latest git stops logging these status information?\n> > >\n> > > I have various other git repos that continue to work fine so I now rather think that this is not a general bug in git pull/fetch but related to the specific repo.\n> > > However, that used to work for years before I upgraded today.\n> > >\n> > > Status on that repo says:\n> > > $ git status\n> > > On branch main\n> > > Your branch is behind 'origin/main' by 387 commits, and can be fast-forwarded.\n> > >   (use \"git pull\" to update your local branch)\n> > >\n> > > Untracked files:\n> > >   (use \"git add <file>...\" to include in what will be committed)\n> > >         find-tests.sh\n> > >\n> > > nothing added to commit but untracked files present (use \"git add\" \n> > > to\n> > > track)\n> > >\n> > > Sorry to bother but do you have any further hints or ideas, what I could try to fix my problem?\n> > >\n> > > Kind regards\n> > >   Jörg\n> > >\n> > >\n> > > ________________________________\n> > >\n> > > Firma: Capgemini Deutschland GmbH\n> > > Aufsichtsratsvorsitzender: Dr. Volkmar Varnhagen\n> > > Geschäftsführer: Henrik Ljungström (Sprecher) • Jost Förster • \n> > > Felizitas Graeber • Vera Schierholt\n> > >\n> > > Sitz: Berlin, Amtsgericht Berlin-Charlottenburg, HRB 98814 This \n> > > message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.\n> > >\n> > This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.\n> > \n> \n"},{"id":"520812","messageId":"VI1PR02MB64959DB453F766E69CBB2AD9FB45A@VI1PR02MB6495.eurprd02.prod.outlook.com","threadId":"63049","inReplyTo":"74e24bc5-5f19-fcfd-383c-a948ec98ff28@gmx.de","subject":"RE: [Windows] Severe problems after upgrading to 2.48.1.windows.1","fromName":"","fromEmail":"hohwiller","sentAt":"2025-06-27T15:34:53Z","receivedAt":"2025-06-27T15:36:04Z","isPatch":false,"sender":{"key":"hohwiller","avatar":null},"body":"Hi Johannes,\n\nThanks for the detailed instructions.\nI am still seeing really wired errors like this:\n\nerror: cannot lock ref 'refs/remotes/origin/main': is at 3a7074794ada9e417dee0a8ddd1248bcb86721b0 but expected 81c93e5393e41850c8de7d7b924e9f346c1d2ccc\n! 81c93e5393e4..3a7074794ada  main                    -> origin/main  (unable to update local ref)\nerror: could not fetch origin\n\nSurely, I can simply trash my repo and clone from scratch but as a developer I know how hard it can be to reproduce such edge-case errors and how valuable such state can be.\n\nI tried to follow your instructions:\n1. done\n2. done\n3. failed:\n\n/usr/src/git (master)\n$ make\nmake: *** No targets specified and no makefile found.  Stop.\n\n$ ls -la\ntotal 9\ndrwxr-xr-x 1 hohwille 1049089   0 Jun 27 17:28 ./\ndrwxr-xr-x 1 hohwille 1049089   0 Jun 27 17:25 ../\ndrwxr-xr-x 1 hohwille 1049089   0 Jun 27 17:25 .git/\n-rw-r--r-- 1 hohwille 1049089 168 Jun 27 17:28 config.mak\n\nSorry, but I have to give up again.\n\nI will save a backup of that repo but have to create a fresh clone as currently I am completely blocked and every git pull / git gc / ... fails with exit code 1.\n\nCheers\n  Jörg\n\n-----Original Message-----\nFrom: Johannes Schindelin <Johannes.Schindelin@gmx.de> \nSent: Friday, April 25, 2025 13:25\nTo: Hohwiller, Jörg <joerg.hohwiller@capgemini.com>\nCc: git@vger.kernel.org\nSubject: RE: [Windows] Severe problems after upgrading to 2.48.1.windows.1\n\n******This mail has been sent from an external source. Do not reply to it, or open any links/attachments unless you are sure of the sender's identity.******\n\nHi Jörg,\n\nwould you be able to follow the same advice I have at\nhttps://github.com/git-for-windows/git/issues/5427#issuecomment-2735535941\nto build Git and investigate a bit further (because I cannot reproduce your problem and therefore cannot do that for you):\n\n1. install the Git for Windows SDK:\n   https://gitforwindows.org/#download-sdk\n\n2. Create `/usr/src/git/config.mak` with the following contents to disable compiler optimization and ASLR:\n\n```\nDEVELOPER=1\nifndef NDEBUG\nCFLAGS := $(filter-out -O2,$(CFLAGS))\nASLR_OPTION := -Wl,--dynamicbase\nBASIC_LDFLAGS := $(filter-out $(ASLR_OPTION),$(BASIC_LDFLAGS)) endif ```\n\n1.  run `make` in `/usr/src/git/`.\n\nAfter that, you can run Git's executables in GDB like so:\n```\ngdb --args ./git.exe -C /path/to/refs/drive init test-git-repo\n\n```\n\nNow, it is useful to ask the debugger to pause the program when the code path is entered that outputs an error message. The functions in Git that output error messages are `error_builtin()` and `die_builtin()`. So you can set the breakpoints\n\n```\nb error_builtin\nb die_builtin\n```\n\nbefore calling `run` in `gdb` to stop execution at the appropriate time. Doing this will stop execution when the `error_builtin()` function is called, i.e. when the error message you reported would be shown. Once that is the case, you can obtain a back trace with `bt`. Example:\n\n```\n(gdb) bt\n#0  setup_git_directory_gently_1 (nongit_ok=0x0) at setup.c:846\n#1  0x000000000057dfd8 in setup_git_directory_gently (nongit_ok=0x0)\n    at setup.c:937\n#2  0x000000000057e211 in setup_git_directory () at setup.c:1014\n#3  0x0000000000487bfc in cmd_rev_parse (argc=2, argv=0x1951a88, prefix=0x0)\n    at builtin/rev-parse.c:589\n#4  0x000000000040296a in run_builtin (p=0x5fb8e8 <commands+2184>, argc=2,\n    argv=0x1951a88) at git.c:373\n#5  0x0000000000402c8d in handle_builtin (argc=2, argv=0x1951a88) at git.c:579\n#6  0x0000000000402e2a in run_argv (argcp=0x108fe00, argv=0x108fdb8)\n    at git.c:637\n#7  0x0000000000402fb9 in cmd_main (argc=2, argv=0x1951a88) at git.c:709\n#8  0x000000000049f699 in mingw_main (argc=3, argv=0x1951a80)\n    at common-main.c:40\n#9  0x000000000049f64d in main (argc=3, argv=0x3230498) at common-main.c:25\n\n```\n\nThis back trace shows which functions were called by which other functions. The inner-most code location is `#0`, which was called from `#1`, which was called from `#2`, etc. In the example above, the `main()` function called the `mingw_main()` function which in turn called the `cmd_main()` function, and so on, until eventually the `setup_git_directory_gently()` function was called, which then called the `setup_git_directory_gently_1()` function, where the execution was stopped to let you, the user, inspect the current state in the debugger.\n\nYou can inspect the source code at the current code location using the `l` command (or specify a line number or even a file and a line number like so: `l git.c:709`, or a function name, like so: `l run_builtin`).\n\nYou can navigate between the different stack frames using `up` and `down` (which is confusingly the opposite direction as in the list above).\n\nImportantly in this instance, you can go `up` to the function that issues the error message, then inspect the surrounding code with `l`. This should already be very helpful in the investigation to figure _what_ is going wrong, and if all you do to help this ticket is run with the debugging so far and then paste the output of `gdb` in this ticket, it should go a long way to fix this bug.\n\nPlease let us know how it goes!\n\nOn Thu, 24 Apr 2025, Hohwiller, Jörg wrote:\n\n> Hi Johannes,\n> \n> Also I see this error every time I run \"git pull origin main\":\n> \n> fatal: failed to run reflog\n> error: task 'gc' failed\n> \n> The pull still works but I guess something is really wrong but cannot tell exactly what.\n> \n> Kind regards\n>   Jörg\n> \n> -----Original Message-----\n> From: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n> Sent: Thursday, April 24, 2025 15:10\n> To: Hohwiller, Jörg <joerg.hohwiller@capgemini.com>\n> Cc: git@vger.kernel.org\n> Subject: RE: [Windows] Severe problems after upgrading to \n> 2.48.1.windows.1\n> \n> ******This mail has been sent from an external source. Do not reply to \n> it, or open any links/attachments unless you are sure of the sender's \n> identity.******\n> \n> Hi Jörg,\n> \n> On Fri, 4 Apr 2025, Hohwiller, Jörg wrote:\n> \n> > Thanks for your response and suggestions.\n> > I downloaded and installed the latest SNAPSHOT:\n> > \n> > $ git -v\n> > git version 2.49.0.windows.1.7.g4ca71ba531.20250326122305\n> > \n> > However, the error still remains. I cannot pull my repo without the error I was referring to.\n> \n> I should have clarified that you will need to remove the `.lock` file manually, unfortunately, before trying again (if it exists, that is).\n> \n> Ciao,\n> Johannes\n> \n> > This blocks my workflows.\n> > There are workarounds like using `git pull origin main` manually in git-bash but it is quite inconvenient not being able to use git via IntelliJ or git-fork without errors.\n> > \n> > Kind regards\n> >   Jörg\n> > \n> > -----Original Message-----\n> > From: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n> > Sent: Tuesday, April 1, 2025 17:45\n> > To: Hohwiller, Jörg <joerg.hohwiller@capgemini.com>\n> > Cc: git@vger.kernel.org\n> > Subject: Re: [Windows] Severe problems after upgrading to\n> > 2.48.1.windows.1\n> > \n> > ******This mail has been sent from an external source. Do not reply \n> > to it, or open any links/attachments unless you are sure of the \n> > sender's\n> > identity.******\n> > \n> > Hi Jörg,\n> > \n> > On Mon, 3 Mar 2025, Hohwiller, Jörg wrote:\n> > \n> > > I just upgraded to 2.48.1.windows.1 (reinstall via Git-2.48.1-64-bit.exe).\n> > > Also I kept the checkbox to cache files (new feature?) – maybe a mistake, let see.\n> > \n> > If you are referring to FSCache, no that's not a new feature.\n> > \n> > > After the upgrade, I pulled some repo with git-fork and got this error:\n> > > error: could not delete references: cannot lock ref 'refs/remotes/origin/bugfix/XY-74488': Unable to create 'D:/projects/projectname/workspaces/main/projectname/.git/refs/remotes/origin/bugfix/XY-74488.lock': File exists.\n> > \n> > While this looks different than\n> > https://github.com/git-for-windows/git/pull/5515 (where writing to a ReFS drive on Windows 2022 was broken by a regression), the root cause as well as its fix could be the same. Can you test the latest snapshot at https://gitforwindows.org/git-snapshots/ to confirm or refute this hypothesis?\n> > \n> > Ciao,\n> > Johannes\n> > \n> > >\n> > > I looked locally (even in CMD with copy & paste of the exact file reference) but the lock file is NOT there.\n> > > I repeat the pull and get the same error, but no such lock file exists.\n> > >\n> > > To avoid external side-effects from git-fork, I opened a new git-bash and called “git pull” manually in the terminal.\n> > > This did not give me any error but gave me this:\n> > > $ git pull\n> > > From ssh://git.company.com/repos/projectname\n> > >    72477d57f026..de79f4dbbf68  …\n> > > * [new branch] …\n> > > * [new branch] …\n> > > * [new branch] …\n> > > * [new branch] …\n> > > * [new branch] …\n> > > * [new branch] …\n> > > * [new branch] …\n> > >    ce3979d639d7..b80b70a56da7 …\n> > > $ echo $?\n> > > 1\n> > >\n> > > So what could be the error leading to exit code 1?\n> > >\n> > > Almost the same happens for git-fetch.\n> > >\n> > > I downgraded to git version 2.47.1.windows.2 and after that tried the same again.\n> > > A difference is that now I additionally I get logs like this at \n> > > the top $ git pull\n> > > remote: Enumerating objects: 269, done.\n> > > remote: Counting objects: 100% (143/143), done.\n> > > remote: Compressing objects: 100% (41/41), done.\n> > > remote: Total 269 (delta 89), reused 87 (delta 87), pack-reused \n> > > 126 Receiving objects: 100% (269/269), 59.37 KiB | 2.58 MiB/s, done.\n> > > Resolving deltas: 100% (94/94), completed with 51 local objects.\n> > > From ssh://git.company.com/repos/projectname\n> > > …\n> > > $ echo $?\n> > > 1\n> > >\n> > > Looks familiar. Is it a bug or a feature that the latest git stops logging these status information?\n> > >\n> > > I have various other git repos that continue to work fine so I now rather think that this is not a general bug in git pull/fetch but related to the specific repo.\n> > > However, that used to work for years before I upgraded today.\n> > >\n> > > Status on that repo says:\n> > > $ git status\n> > > On branch main\n> > > Your branch is behind 'origin/main' by 387 commits, and can be fast-forwarded.\n> > >   (use \"git pull\" to update your local branch)\n> > >\n> > > Untracked files:\n> > >   (use \"git add <file>...\" to include in what will be committed)\n> > >         find-tests.sh\n> > >\n> > > nothing added to commit but untracked files present (use \"git add\" \n> > > to\n> > > track)\n> > >\n> > > Sorry to bother but do you have any further hints or ideas, what I could try to fix my problem?\n> > >\n> > > Kind regards\n> > >   Jörg\n> > >\n> > >\n> > > ________________________________\n> > >\n> > > Firma: Capgemini Deutschland GmbH\n> > > Aufsichtsratsvorsitzender: Dr. Volkmar Varnhagen\n> > > Geschäftsführer: Henrik Ljungström (Sprecher) • Jost Förster • \n> > > Felizitas Graeber • Vera Schierholt\n> > >\n> > > Sitz: Berlin, Amtsgericht Berlin-Charlottenburg, HRB 98814 This \n> > > message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.\n> > >\n> > This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.\n> > \n> \n"},{"id":"520817","messageId":"AM7PR02MB64846D60AF39992B13B36E75FB45A@AM7PR02MB6484.eurprd02.prod.outlook.com","threadId":"63049","inReplyTo":"VI1PR02MB64959DB453F766E69CBB2AD9FB45A@VI1PR02MB6495.eurprd02.prod.outlook.com","subject":"RE: [Windows] Severe problems after upgrading to 2.48.1.windows.1","fromName":"","fromEmail":"hohwiller","sentAt":"2025-06-27T18:24:29Z","receivedAt":"2025-06-27T18:25:40Z","isPatch":false,"sender":{"key":"hohwiller","avatar":null},"body":"Hi there,\n\nI have news:\n\nI uninstalled git 2.48.1.windows.1 and installed Git-2.50.0-64-bit.exe.\nThe problems persisted and since I was blocked anyhow, I decided to move the repo to an archive folder and clone from scratch.\nI tried this 20x times and it always failed.\nI got something like this\n\nReceiving objects:  34% (4912036/14447164), 429.30 MiB | 14.19 MiB/s\n\nAnd at some random point (1%, 34%, max. was between 50% and 60%) it crashed with\n\nclient_loop: send disconnect: Connection reset by peer\n\nI asked my colleagues and they tested this and it worked fine.\nThey had older versions of git.\nSo I uninstalled git once more and now installed Git-2.46.0-64-bit.exe (4 releases back in my downloads folder).\n\nSurpise: git clone worked on the first try like a charm.\n\nBTW: with Git-2.50.0-64-bit.exe also step 1. (install the Git for Windows SDK) failed on the first try with the same error but succeeded after deleting the installation and installing again.\n\nSo my assumption is recent versions of Git have QA issues.\nI assume that maybe bundled OpenSSL may be a candidate to have a deeper look, but is just my first guess.\n\np.s.: I also used git 2.46.0.windows.1 and went to my archived broken git clone and did run\ngit remote update origin --prune\n\nBut that failed again with the same error after claiming to have deleted hundreds of remote branches and added other hundreds of remote branches from/to origin.\nSo maybe after all the experiments with latest git releases something in `.git` folder got corrupted. Again just gut feeling...\n\nHave a nice weekend\n  Jörg\n\n-----Original Message-----\nFrom: Hohwiller, Jörg \nSent: Friday, June 27, 2025 17:35\nTo: Johannes Schindelin <Johannes.Schindelin@gmx.de>\nCc: git@vger.kernel.org\nSubject: RE: [Windows] Severe problems after upgrading to 2.48.1.windows.1\n\nHi Johannes,\n\nThanks for the detailed instructions.\nI am still seeing really wired errors like this:\n\nerror: cannot lock ref 'refs/remotes/origin/main': is at 3a7074794ada9e417dee0a8ddd1248bcb86721b0 but expected 81c93e5393e41850c8de7d7b924e9f346c1d2ccc\n! 81c93e5393e4..3a7074794ada  main                    -> origin/main  (unable to update local ref)\nerror: could not fetch origin\n\nSurely, I can simply trash my repo and clone from scratch but as a developer I know how hard it can be to reproduce such edge-case errors and how valuable such state can be.\n\nI tried to follow your instructions:\n1. done\n2. done\n3. failed:\n\n/usr/src/git (master)\n$ make\nmake: *** No targets specified and no makefile found.  Stop.\n\n$ ls -la\ntotal 9\ndrwxr-xr-x 1 hohwille 1049089   0 Jun 27 17:28 ./\ndrwxr-xr-x 1 hohwille 1049089   0 Jun 27 17:25 ../\ndrwxr-xr-x 1 hohwille 1049089   0 Jun 27 17:25 .git/\n-rw-r--r-- 1 hohwille 1049089 168 Jun 27 17:28 config.mak\n\nSorry, but I have to give up again.\n\nI will save a backup of that repo but have to create a fresh clone as currently I am completely blocked and every git pull / git gc / ... fails with exit code 1.\n\nCheers\n  Jörg\n\n-----Original Message-----\nFrom: Johannes Schindelin <Johannes.Schindelin@gmx.de>\nSent: Friday, April 25, 2025 13:25\nTo: Hohwiller, Jörg <joerg.hohwiller@capgemini.com>\nCc: git@vger.kernel.org\nSubject: RE: [Windows] Severe problems after upgrading to 2.48.1.windows.1\n\n******This mail has been sent from an external source. Do not reply to it, or open any links/attachments unless you are sure of the sender's identity.******\n\nHi Jörg,\n\nwould you be able to follow the same advice I have at\nhttps://github.com/git-for-windows/git/issues/5427#issuecomment-2735535941\nto build Git and investigate a bit further (because I cannot reproduce your problem and therefore cannot do that for you):\n\n1. install the Git for Windows SDK:\n   https://gitforwindows.org/#download-sdk\n\n2. Create `/usr/src/git/config.mak` with the following contents to disable compiler optimization and ASLR:\n\n```\nDEVELOPER=1\nifndef NDEBUG\nCFLAGS := $(filter-out -O2,$(CFLAGS))\nASLR_OPTION := -Wl,--dynamicbase\nBASIC_LDFLAGS := $(filter-out $(ASLR_OPTION),$(BASIC_LDFLAGS)) endif ```\n\n1.  run `make` in `/usr/src/git/`.\n\nAfter that, you can run Git's executables in GDB like so:\n```\ngdb --args ./git.exe -C /path/to/refs/drive init test-git-repo\n\n```\n\nNow, it is useful to ask the debugger to pause the program when the code path is entered that outputs an error message. The functions in Git that output error messages are `error_builtin()` and `die_builtin()`. So you can set the breakpoints\n\n```\nb error_builtin\nb die_builtin\n```\n\nbefore calling `run` in `gdb` to stop execution at the appropriate time. Doing this will stop execution when the `error_builtin()` function is called, i.e. when the error message you reported would be shown. Once that is the case, you can obtain a back trace with `bt`. Example:\n\n```\n(gdb) bt\n#0  setup_git_directory_gently_1 (nongit_ok=0x0) at setup.c:846\n#1  0x000000000057dfd8 in setup_git_directory_gently (nongit_ok=0x0)\n    at setup.c:937\n#2  0x000000000057e211 in setup_git_directory () at setup.c:1014\n#3  0x0000000000487bfc in cmd_rev_parse (argc=2, argv=0x1951a88, prefix=0x0)\n    at builtin/rev-parse.c:589\n#4  0x000000000040296a in run_builtin (p=0x5fb8e8 <commands+2184>, argc=2,\n    argv=0x1951a88) at git.c:373\n#5  0x0000000000402c8d in handle_builtin (argc=2, argv=0x1951a88) at git.c:579\n#6  0x0000000000402e2a in run_argv (argcp=0x108fe00, argv=0x108fdb8)\n    at git.c:637\n#7  0x0000000000402fb9 in cmd_main (argc=2, argv=0x1951a88) at git.c:709\n#8  0x000000000049f699 in mingw_main (argc=3, argv=0x1951a80)\n    at common-main.c:40\n#9  0x000000000049f64d in main (argc=3, argv=0x3230498) at common-main.c:25\n\n```\n\nThis back trace shows which functions were called by which other functions. The inner-most code location is `#0`, which was called from `#1`, which was called from `#2`, etc. In the example above, the `main()` function called the `mingw_main()` function which in turn called the `cmd_main()` function, and so on, until eventually the `setup_git_directory_gently()` function was called, which then called the `setup_git_directory_gently_1()` function, where the execution was stopped to let you, the user, inspect the current state in the debugger.\n\nYou can inspect the source code at the current code location using the `l` command (or specify a line number or even a file and a line number like so: `l git.c:709`, or a function name, like so: `l run_builtin`).\n\nYou can navigate between the different stack frames using `up` and `down` (which is confusingly the opposite direction as in the list above).\n\nImportantly in this instance, you can go `up` to the function that issues the error message, then inspect the surrounding code with `l`. This should already be very helpful in the investigation to figure _what_ is going wrong, and if all you do to help this ticket is run with the debugging so far and then paste the output of `gdb` in this ticket, it should go a long way to fix this bug.\n\nPlease let us know how it goes!\n\nOn Thu, 24 Apr 2025, Hohwiller, Jörg wrote:\n\n> Hi Johannes,\n> \n> Also I see this error every time I run \"git pull origin main\":\n> \n> fatal: failed to run reflog\n> error: task 'gc' failed\n> \n> The pull still works but I guess something is really wrong but cannot tell exactly what.\n> \n> Kind regards\n>   Jörg\n> \n> -----Original Message-----\n> From: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n> Sent: Thursday, April 24, 2025 15:10\n> To: Hohwiller, Jörg <joerg.hohwiller@capgemini.com>\n> Cc: git@vger.kernel.org\n> Subject: RE: [Windows] Severe problems after upgrading to\n> 2.48.1.windows.1\n> \n> ******This mail has been sent from an external source. Do not reply to \n> it, or open any links/attachments unless you are sure of the sender's\n> identity.******\n> \n> Hi Jörg,\n> \n> On Fri, 4 Apr 2025, Hohwiller, Jörg wrote:\n> \n> > Thanks for your response and suggestions.\n> > I downloaded and installed the latest SNAPSHOT:\n> > \n> > $ git -v\n> > git version 2.49.0.windows.1.7.g4ca71ba531.20250326122305\n> > \n> > However, the error still remains. I cannot pull my repo without the error I was referring to.\n> \n> I should have clarified that you will need to remove the `.lock` file manually, unfortunately, before trying again (if it exists, that is).\n> \n> Ciao,\n> Johannes\n> \n> > This blocks my workflows.\n> > There are workarounds like using `git pull origin main` manually in git-bash but it is quite inconvenient not being able to use git via IntelliJ or git-fork without errors.\n> > \n> > Kind regards\n> >   Jörg\n> > \n> > -----Original Message-----\n> > From: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n> > Sent: Tuesday, April 1, 2025 17:45\n> > To: Hohwiller, Jörg <joerg.hohwiller@capgemini.com>\n> > Cc: git@vger.kernel.org\n> > Subject: Re: [Windows] Severe problems after upgrading to\n> > 2.48.1.windows.1\n> > \n> > ******This mail has been sent from an external source. Do not reply \n> > to it, or open any links/attachments unless you are sure of the \n> > sender's\n> > identity.******\n> > \n> > Hi Jörg,\n> > \n> > On Mon, 3 Mar 2025, Hohwiller, Jörg wrote:\n> > \n> > > I just upgraded to 2.48.1.windows.1 (reinstall via Git-2.48.1-64-bit.exe).\n> > > Also I kept the checkbox to cache files (new feature?) – maybe a mistake, let see.\n> > \n> > If you are referring to FSCache, no that's not a new feature.\n> > \n> > > After the upgrade, I pulled some repo with git-fork and got this error:\n> > > error: could not delete references: cannot lock ref 'refs/remotes/origin/bugfix/XY-74488': Unable to create 'D:/projects/projectname/workspaces/main/projectname/.git/refs/remotes/origin/bugfix/XY-74488.lock': File exists.\n> > \n> > While this looks different than\n> > https://github.com/git-for-windows/git/pull/5515 (where writing to a ReFS drive on Windows 2022 was broken by a regression), the root cause as well as its fix could be the same. Can you test the latest snapshot at https://gitforwindows.org/git-snapshots/ to confirm or refute this hypothesis?\n> > \n> > Ciao,\n> > Johannes\n> > \n> > >\n> > > I looked locally (even in CMD with copy & paste of the exact file reference) but the lock file is NOT there.\n> > > I repeat the pull and get the same error, but no such lock file exists.\n> > >\n> > > To avoid external side-effects from git-fork, I opened a new git-bash and called “git pull” manually in the terminal.\n> > > This did not give me any error but gave me this:\n> > > $ git pull\n> > > From ssh://git.company.com/repos/projectname\n> > >    72477d57f026..de79f4dbbf68  …\n> > > * [new branch] …\n> > > * [new branch] …\n> > > * [new branch] …\n> > > * [new branch] …\n> > > * [new branch] …\n> > > * [new branch] …\n> > > * [new branch] …\n> > >    ce3979d639d7..b80b70a56da7 …\n> > > $ echo $?\n> > > 1\n> > >\n> > > So what could be the error leading to exit code 1?\n> > >\n> > > Almost the same happens for git-fetch.\n> > >\n> > > I downgraded to git version 2.47.1.windows.2 and after that tried the same again.\n> > > A difference is that now I additionally I get logs like this at \n> > > the top $ git pull\n> > > remote: Enumerating objects: 269, done.\n> > > remote: Counting objects: 100% (143/143), done.\n> > > remote: Compressing objects: 100% (41/41), done.\n> > > remote: Total 269 (delta 89), reused 87 (delta 87), pack-reused\n> > > 126 Receiving objects: 100% (269/269), 59.37 KiB | 2.58 MiB/s, done.\n> > > Resolving deltas: 100% (94/94), completed with 51 local objects.\n> > > From ssh://git.company.com/repos/projectname\n> > > …\n> > > $ echo $?\n> > > 1\n> > >\n> > > Looks familiar. Is it a bug or a feature that the latest git stops logging these status information?\n> > >\n> > > I have various other git repos that continue to work fine so I now rather think that this is not a general bug in git pull/fetch but related to the specific repo.\n> > > However, that used to work for years before I upgraded today.\n> > >\n> > > Status on that repo says:\n> > > $ git status\n> > > On branch main\n> > > Your branch is behind 'origin/main' by 387 commits, and can be fast-forwarded.\n> > >   (use \"git pull\" to update your local branch)\n> > >\n> > > Untracked files:\n> > >   (use \"git add <file>...\" to include in what will be committed)\n> > >         find-tests.sh\n> > >\n> > > nothing added to commit but untracked files present (use \"git add\" \n> > > to\n> > > track)\n> > >\n> > > Sorry to bother but do you have any further hints or ideas, what I could try to fix my problem?\n> > >\n> > > Kind regards\n> > >   Jörg\n> > >\n> > >\n> > > ________________________________\n> > >\n> > > Firma: Capgemini Deutschland GmbH\n> > > Aufsichtsratsvorsitzender: Dr. Volkmar Varnhagen\n> > > Geschäftsführer: Henrik Ljungström (Sprecher) • Jost Förster • \n> > > Felizitas Graeber • Vera Schierholt\n> > >\n> > > Sitz: Berlin, Amtsgericht Berlin-Charlottenburg, HRB 98814 This \n> > > message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.\n> > >\n> > This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.\n> > \n> \n"},{"id":"521159","messageId":"af1bac80-00f7-a0d6-54f2-326f47925b18@gmx.de","threadId":"63049","inReplyTo":"VI1PR02MB64959DB453F766E69CBB2AD9FB45A@VI1PR02MB6495.eurprd02.prod.outlook.com","subject":"RE: [Windows] Severe problems after upgrading to 2.48.1.windows.1","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2025-07-02T09:25:40Z","receivedAt":"2025-07-02T09:25:44Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Jörg,\n\nOn Fri, 27 Jun 2025, Hohwiller, Jörg wrote:\n\n> Thanks for the detailed instructions.\n> I am still seeing really wired errors like this:\n> \n> error: cannot lock ref 'refs/remotes/origin/main': is at 3a7074794ada9e417dee0a8ddd1248bcb86721b0 but expected 81c93e5393e41850c8de7d7b924e9f346c1d2ccc\n> ! 81c93e5393e4..3a7074794ada  main                    -> origin/main  (unable to update local ref)\n> error: could not fetch origin\n> \n> Surely, I can simply trash my repo and clone from scratch but as a developer I know how hard it can be to reproduce such edge-case errors and how valuable such state can be.\n> \n> I tried to follow your instructions:\n> 1. done\n> 2. done\n> 3. failed:\n> \n> /usr/src/git (master)\n> $ make\n> make: *** No targets specified and no makefile found.  Stop.\n\nRight, step two should have been to call `sdk cd git`, which would have\ninitialized your clone. You can do that post-hoc via:\n\n\tcd /usr/src/git\n\tgit fetch origin v2.50.0.windows.2\n\tgit switch -d FETCH_HEAD\n\nCiao,\nJohannes\n\n> \n> $ ls -la\n> total 9\n> drwxr-xr-x 1 hohwille 1049089   0 Jun 27 17:28 ./\n> drwxr-xr-x 1 hohwille 1049089   0 Jun 27 17:25 ../\n> drwxr-xr-x 1 hohwille 1049089   0 Jun 27 17:25 .git/\n> -rw-r--r-- 1 hohwille 1049089 168 Jun 27 17:28 config.mak\n> \n> Sorry, but I have to give up again.\n> \n> I will save a backup of that repo but have to create a fresh clone as currently I am completely blocked and every git pull / git gc / ... fails with exit code 1.\n> \n> Cheers\n>   Jörg\n> \n> -----Original Message-----\n> From: Johannes Schindelin <Johannes.Schindelin@gmx.de> \n> Sent: Friday, April 25, 2025 13:25\n> To: Hohwiller, Jörg <joerg.hohwiller@capgemini.com>\n> Cc: git@vger.kernel.org\n> Subject: RE: [Windows] Severe problems after upgrading to 2.48.1.windows.1\n> \n> ******This mail has been sent from an external source. Do not reply to it, or open any links/attachments unless you are sure of the sender's identity.******\n> \n> Hi Jörg,\n> \n> would you be able to follow the same advice I have at\n> https://github.com/git-for-windows/git/issues/5427#issuecomment-2735535941\n> to build Git and investigate a bit further (because I cannot reproduce your problem and therefore cannot do that for you):\n> \n> 1. install the Git for Windows SDK:\n>    https://gitforwindows.org/#download-sdk\n> \n> 2. Create `/usr/src/git/config.mak` with the following contents to disable compiler optimization and ASLR:\n> \n> ```\n> DEVELOPER=1\n> ifndef NDEBUG\n> CFLAGS := $(filter-out -O2,$(CFLAGS))\n> ASLR_OPTION := -Wl,--dynamicbase\n> BASIC_LDFLAGS := $(filter-out $(ASLR_OPTION),$(BASIC_LDFLAGS)) endif ```\n> \n> 1.  run `make` in `/usr/src/git/`.\n> \n> After that, you can run Git's executables in GDB like so:\n> ```\n> gdb --args ./git.exe -C /path/to/refs/drive init test-git-repo\n> \n> ```\n> \n> Now, it is useful to ask the debugger to pause the program when the code path is entered that outputs an error message. The functions in Git that output error messages are `error_builtin()` and `die_builtin()`. So you can set the breakpoints\n> \n> ```\n> b error_builtin\n> b die_builtin\n> ```\n> \n> before calling `run` in `gdb` to stop execution at the appropriate time. Doing this will stop execution when the `error_builtin()` function is called, i.e. when the error message you reported would be shown. Once that is the case, you can obtain a back trace with `bt`. Example:\n> \n> ```\n> (gdb) bt\n> #0  setup_git_directory_gently_1 (nongit_ok=0x0) at setup.c:846\n> #1  0x000000000057dfd8 in setup_git_directory_gently (nongit_ok=0x0)\n>     at setup.c:937\n> #2  0x000000000057e211 in setup_git_directory () at setup.c:1014\n> #3  0x0000000000487bfc in cmd_rev_parse (argc=2, argv=0x1951a88, prefix=0x0)\n>     at builtin/rev-parse.c:589\n> #4  0x000000000040296a in run_builtin (p=0x5fb8e8 <commands+2184>, argc=2,\n>     argv=0x1951a88) at git.c:373\n> #5  0x0000000000402c8d in handle_builtin (argc=2, argv=0x1951a88) at git.c:579\n> #6  0x0000000000402e2a in run_argv (argcp=0x108fe00, argv=0x108fdb8)\n>     at git.c:637\n> #7  0x0000000000402fb9 in cmd_main (argc=2, argv=0x1951a88) at git.c:709\n> #8  0x000000000049f699 in mingw_main (argc=3, argv=0x1951a80)\n>     at common-main.c:40\n> #9  0x000000000049f64d in main (argc=3, argv=0x3230498) at common-main.c:25\n> \n> ```\n> \n> This back trace shows which functions were called by which other functions. The inner-most code location is `#0`, which was called from `#1`, which was called from `#2`, etc. In the example above, the `main()` function called the `mingw_main()` function which in turn called the `cmd_main()` function, and so on, until eventually the `setup_git_directory_gently()` function was called, which then called the `setup_git_directory_gently_1()` function, where the execution was stopped to let you, the user, inspect the current state in the debugger.\n> \n> You can inspect the source code at the current code location using the `l` command (or specify a line number or even a file and a line number like so: `l git.c:709`, or a function name, like so: `l run_builtin`).\n> \n> You can navigate between the different stack frames using `up` and `down` (which is confusingly the opposite direction as in the list above).\n> \n> Importantly in this instance, you can go `up` to the function that issues the error message, then inspect the surrounding code with `l`. This should already be very helpful in the investigation to figure _what_ is going wrong, and if all you do to help this ticket is run with the debugging so far and then paste the output of `gdb` in this ticket, it should go a long way to fix this bug.\n> \n> Please let us know how it goes!\n> \n> On Thu, 24 Apr 2025, Hohwiller, Jörg wrote:\n> \n> > Hi Johannes,\n> > \n> > Also I see this error every time I run \"git pull origin main\":\n> > \n> > fatal: failed to run reflog\n> > error: task 'gc' failed\n> > \n> > The pull still works but I guess something is really wrong but cannot tell exactly what.\n> > \n> > Kind regards\n> >   Jörg\n> > \n> > -----Original Message-----\n> > From: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n> > Sent: Thursday, April 24, 2025 15:10\n> > To: Hohwiller, Jörg <joerg.hohwiller@capgemini.com>\n> > Cc: git@vger.kernel.org\n> > Subject: RE: [Windows] Severe problems after upgrading to \n> > 2.48.1.windows.1\n> > \n> > ******This mail has been sent from an external source. Do not reply to \n> > it, or open any links/attachments unless you are sure of the sender's \n> > identity.******\n> > \n> > Hi Jörg,\n> > \n> > On Fri, 4 Apr 2025, Hohwiller, Jörg wrote:\n> > \n> > > Thanks for your response and suggestions.\n> > > I downloaded and installed the latest SNAPSHOT:\n> > > \n> > > $ git -v\n> > > git version 2.49.0.windows.1.7.g4ca71ba531.20250326122305\n> > > \n> > > However, the error still remains. I cannot pull my repo without the error I was referring to.\n> > \n> > I should have clarified that you will need to remove the `.lock` file manually, unfortunately, before trying again (if it exists, that is).\n> > \n> > Ciao,\n> > Johannes\n> > \n> > > This blocks my workflows.\n> > > There are workarounds like using `git pull origin main` manually in git-bash but it is quite inconvenient not being able to use git via IntelliJ or git-fork without errors.\n> > > \n> > > Kind regards\n> > >   Jörg\n> > > \n> > > -----Original Message-----\n> > > From: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n> > > Sent: Tuesday, April 1, 2025 17:45\n> > > To: Hohwiller, Jörg <joerg.hohwiller@capgemini.com>\n> > > Cc: git@vger.kernel.org\n> > > Subject: Re: [Windows] Severe problems after upgrading to\n> > > 2.48.1.windows.1\n> > > \n> > > ******This mail has been sent from an external source. Do not reply \n> > > to it, or open any links/attachments unless you are sure of the \n> > > sender's\n> > > identity.******\n> > > \n> > > Hi Jörg,\n> > > \n> > > On Mon, 3 Mar 2025, Hohwiller, Jörg wrote:\n> > > \n> > > > I just upgraded to 2.48.1.windows.1 (reinstall via Git-2.48.1-64-bit.exe).\n> > > > Also I kept the checkbox to cache files (new feature?) – maybe a mistake, let see.\n> > > \n> > > If you are referring to FSCache, no that's not a new feature.\n> > > \n> > > > After the upgrade, I pulled some repo with git-fork and got this error:\n> > > > error: could not delete references: cannot lock ref 'refs/remotes/origin/bugfix/XY-74488': Unable to create 'D:/projects/projectname/workspaces/main/projectname/.git/refs/remotes/origin/bugfix/XY-74488.lock': File exists.\n> > > \n> > > While this looks different than\n> > > https://github.com/git-for-windows/git/pull/5515 (where writing to a ReFS drive on Windows 2022 was broken by a regression), the root cause as well as its fix could be the same. Can you test the latest snapshot at https://gitforwindows.org/git-snapshots/ to confirm or refute this hypothesis?\n> > > \n> > > Ciao,\n> > > Johannes\n> > > \n> > > >\n> > > > I looked locally (even in CMD with copy & paste of the exact file reference) but the lock file is NOT there.\n> > > > I repeat the pull and get the same error, but no such lock file exists.\n> > > >\n> > > > To avoid external side-effects from git-fork, I opened a new git-bash and called “git pull” manually in the terminal.\n> > > > This did not give me any error but gave me this:\n> > > > $ git pull\n> > > > From ssh://git.company.com/repos/projectname\n> > > >    72477d57f026..de79f4dbbf68  …\n> > > > * [new branch] …\n> > > > * [new branch] …\n> > > > * [new branch] …\n> > > > * [new branch] …\n> > > > * [new branch] …\n> > > > * [new branch] …\n> > > > * [new branch] …\n> > > >    ce3979d639d7..b80b70a56da7 …\n> > > > $ echo $?\n> > > > 1\n> > > >\n> > > > So what could be the error leading to exit code 1?\n> > > >\n> > > > Almost the same happens for git-fetch.\n> > > >\n> > > > I downgraded to git version 2.47.1.windows.2 and after that tried the same again.\n> > > > A difference is that now I additionally I get logs like this at \n> > > > the top $ git pull\n> > > > remote: Enumerating objects: 269, done.\n> > > > remote: Counting objects: 100% (143/143), done.\n> > > > remote: Compressing objects: 100% (41/41), done.\n> > > > remote: Total 269 (delta 89), reused 87 (delta 87), pack-reused \n> > > > 126 Receiving objects: 100% (269/269), 59.37 KiB | 2.58 MiB/s, done.\n> > > > Resolving deltas: 100% (94/94), completed with 51 local objects.\n> > > > From ssh://git.company.com/repos/projectname\n> > > > …\n> > > > $ echo $?\n> > > > 1\n> > > >\n> > > > Looks familiar. Is it a bug or a feature that the latest git stops logging these status information?\n> > > >\n> > > > I have various other git repos that continue to work fine so I now rather think that this is not a general bug in git pull/fetch but related to the specific repo.\n> > > > However, that used to work for years before I upgraded today.\n> > > >\n> > > > Status on that repo says:\n> > > > $ git status\n> > > > On branch main\n> > > > Your branch is behind 'origin/main' by 387 commits, and can be fast-forwarded.\n> > > >   (use \"git pull\" to update your local branch)\n> > > >\n> > > > Untracked files:\n> > > >   (use \"git add <file>...\" to include in what will be committed)\n> > > >         find-tests.sh\n> > > >\n> > > > nothing added to commit but untracked files present (use \"git add\" \n> > > > to\n> > > > track)\n> > > >\n> > > > Sorry to bother but do you have any further hints or ideas, what I could try to fix my problem?\n> > > >\n> > > > Kind regards\n> > > >   Jörg\n> > > >\n> > > >\n> > > > ________________________________\n> > > >\n> > > > Firma: Capgemini Deutschland GmbH\n> > > > Aufsichtsratsvorsitzender: Dr. Volkmar Varnhagen\n> > > > Geschäftsführer: Henrik Ljungström (Sprecher) • Jost Förster • \n> > > > Felizitas Graeber • Vera Schierholt\n> > > >\n> > > > Sitz: Berlin, Amtsgericht Berlin-Charlottenburg, HRB 98814 This \n> > > > message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.\n> > > >\n> > > This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.\n> > > \n> > \n> \n"}]}