git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: Johannes Sixt <j6t@kdbg.org>
Cc: Anthony Sottile <asottile@umich.edu>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: `git add <<windows 8.3 path to file inside repo>>` results in "fatal: ... is outside repository"
Date: Mon, 11 Mar 2019 17:55:19 +0000	[thread overview]
Message-ID: <20190311175519.6lbppv5u44w2u4sj@tb-raspi4> (raw)
In-Reply-To: <10972e0e-7fe1-437f-efe6-cff82a1205e0@kdbg.org>

On Mon, Mar 11, 2019 at 06:48:11PM +0100, Johannes Sixt wrote:
> 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

You can probably do another test:

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

And now nobody knows for shure if "longna~1"
is longname-rexxx or longname-repo

It may happen that it is longname-rep at this point in time,
at your machine.
It may happen that it is a complete different directory on another machine,
or even on your machine.
For that reason, to avoid that someone tampers data outside a repo,
"../" (or ..\ under windows) is not accepted by Git.

  parent reply	other threads:[~2019-03-11 17:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=20190311175519.6lbppv5u44w2u4sj@tb-raspi4 \
    --to=tboegi@web.de \
    --cc=asottile@umich.edu \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.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).