git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* `git add <<windows 8.3 path to file inside repo>>` results in "fatal: ... is outside repository"
@ 2019-03-10 22:41 Anthony Sottile
  2019-03-11 17:48 ` Johannes Sixt
  0 siblings, 1 reply; 8+ messages in thread
From: Anthony Sottile @ 2019-03-10 22:41 UTC (permalink / raw)
  To: Git Mailing List

(In case 8.3 filename isn't a familiar term):
https://en.wikipedia.org/wiki/8.3_filename

This is distilled down from an actual issue to a minimal testcase.

The original failure involves an automated test while running on azure
pipelines: https://asottile.visualstudio.com/asottile/_build/results?buildId=254

I'm using git on windows

>git --version
git version 2.21.0.windows.1

Here's a minimal case:

git init longname-repo
cd longname-repo
touch f
git add ..\longna~1\f

Here's the output:

C:\Users\Anthony\AppData\Local\Temp\t\pre-commit-hooks>git init longname-repo
Initialized empty Git repository in
C:/Users/Anthony/AppData/Local/Temp/t/pre-commit-hooks/longname-repo/.git/

C:\Users\Anthony\AppData\Local\Temp\t\pre-commit-hooks>cd longname-repo

C:\Users\Anthony\AppData\Local\Temp\t\pre-commit-hooks\longname-repo>touch 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

It is however inside the repository:

C:\Users\Anthony\AppData\Local\Temp\t\pre-commit-hooks\longname-repo>python
Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64
bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.path.samefile('f', r'..\longna~1\f')
True

Anthony

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-03-12 22:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-10 22:41 `git add <<windows 8.3 path to file inside repo>>` results in "fatal: ... is outside repository" Anthony Sottile
2019-03-11 17:48 ` Johannes Sixt
2019-03-11 17:53   ` Anthony Sottile
2019-03-11 17:55   ` Torsten Bögershausen
2019-03-11 18:16     ` Anthony Sottile
2019-03-11 19:34       ` Jack Adrian Zappa
2019-03-11 20:13         ` Anthony Sottile
2019-03-12 22:49         ` Johannes Schindelin

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).