Re: `git add <<windows 8.3 path to file inside repo>>` results in "fatal: ... is outside repository"
- From
Anthony Sottile <asottile@umich.edu>
- Date
- Mar 11, 2019, 17:53 UTC
- Message-ID
- <CA+dzEB=EaMoeSac09kj6huuwdk3sOLf7QQHEoghy2B8UoG2eyg@mail.gmail.com>
- In-Reply-To
- <10972e0e-7fe1-437f-efe6-cff82a1205e0@kdbg.org>
On Mon, Mar 11, 2019 at 10:48 AM Johannes Sixt <j6t@kdbg.org> wrote:
Show 19 quoted lines
> > Am 10.03.19 um 23:41 schrieb Anthony Sottile: > > git init longname-repo > > cd longname-repo > > touch f > > git add ..\longna~1\f > > > ... > > > > C:\Users\Anthony\AppData\Local\Temp\t\pre-commit-hooks\longname-repo>git > > add ..\longna~1\f > > fatal: ..\longna~1\f: '..\longna~1\f' is outside repository > > This has nothing to do with long vs. short path names. It would report > the same error when you say > > git add ..\longname-repo\f > > -- Hannes
Oops, I misreported while trying to minimize my reproduction
Here's an accurate bug report
git properly handles this:
git add C:\full\path\to\longname-repo\file
When the root of the repo root is `C:\full\path\to\longname-repo`
But it does not handle the equivalent 8.3 path:
git add C:\full\path\to\longna~1\file