git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Josh Mandel <jmandel@gmail.com>
To: git@vger.kernel.org
Cc: Grahame Grieve <grahame@healthintersections.com.au>
Subject: Misleading error message with invalid filename on Windows
Date: Thu, 14 Mar 2019 17:31:19 -0500	[thread overview]
Message-ID: <CANSMLKELiaTR81zscG6Or9psL2ZLizAtYEqT72WGHdY92sAFQA@mail.gmail.com> (raw)
In-Reply-To: <CANSMLKFUXza=qj14gOd+jzX+R+R_JDO8XqmrjXYukB9s0FDhMQ@mail.gmail.com>

Running git 2.21.0 on Windows with certain invalid file names like
"c:\root.txt" (see https://github.com/jmandel/local-path-test as a
test case), I get an expected "invalid path" error when I clone the
repository.

But if I actually have a file at this path (i.e., outside of the git
working tree, at root of my file system) then I instead receive a
different error message:

$ touch /c/root.txt
$ git clone https://github.com/jmandel/local-path-test.git

> error: Untracked working tree file 'c:\root.txt' would be overwritten by merge.

This error message is misleading, in that (if I understand correctly)
there's actually no danger of my local file (which is *not* in the
working tree at all) being overwritten.

Best,
Josh

           reply	other threads:[~2019-03-14 22:31 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <CANSMLKFUXza=qj14gOd+jzX+R+R_JDO8XqmrjXYukB9s0FDhMQ@mail.gmail.com>]

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=CANSMLKELiaTR81zscG6Or9psL2ZLizAtYEqT72WGHdY92sAFQA@mail.gmail.com \
    --to=jmandel@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=grahame@healthintersections.com.au \
    /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).