From: Anthony Sottile <asottile@umich.edu>
To: Git Mailing List <git@vger.kernel.org>
Subject: `git add <<windows 8.3 path to file inside repo>>` results in "fatal: ... is outside repository"
Date: Sun, 10 Mar 2019 15:41:51 -0700 [thread overview]
Message-ID: <CA+dzEBkkbQj0rCjvPfcET2Uvt6fP_v+wQE52ZkAND2Mps08SNQ@mail.gmail.com> (raw)
(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
next reply other threads:[~2019-03-10 22:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-10 22:41 Anthony Sottile [this message]
2019-03-11 17:48 ` `git add <<windows 8.3 path to file inside repo>>` results in "fatal: ... is outside repository" 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+dzEBkkbQj0rCjvPfcET2Uvt6fP_v+wQE52ZkAND2Mps08SNQ@mail.gmail.com \
--to=asottile@umich.edu \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).