git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: "L2750558108@outlook.com" <L2750558108@outlook.com>
Cc: git <git@vger.kernel.org>
Subject: Re: When using git commit in a path with spaces, it prompts Cannot read "xxx": No such file or directory
Date: Mon, 27 Mar 2023 10:28:44 +0200 (CEST)	[thread overview]
Message-ID: <ca58a4a2-dd73-26f5-9d2f-13a658bbaa9b@gmx.de> (raw)
In-Reply-To: <BY5PR14MB35605DDFA6C7F6CD9DF89202B1A09@BY5PR14MB3560.namprd14.prod.outlook.com>

Hi,

On Fri, 17 Feb 2023, L2750558108@outlook.com wrote:

> In Windows
> When using git commit in a path with spaces, it prompts Cannot read "xxx": No such file or directory
>
> Reduce:
> 1.Init a respository at "C:/te st";
> 2.cd "C:/te st"
> 3.git add .
> 4.git commit
> 5.fatal: could not read 'C:/te': No such file or directory

I suspect that your Git version is basically super old, but I cannot know
for sure because vital information has been omitted from this bug report.

And I cannot reproduce (this was done in a PowerShell window):

	PS C:\> git init "te st"
	Initialized empty Git repository in C:/te st/.git/
	PS C:\> cd "te st"
	PS C:\te st> git add .
	PS C:\te st> git commit
	On branch main

	Initial commit

	nothing to commit (create/copy files and use "git add" to track)
	PS C:\te st> git commit --allow-empty -m "works!"
	[main (root-commit) 0d51f36] works!
	PS C:\te st>

In other words, Git has no problem with the space in the working
directory's path.

Ciao,
Johannes

      reply	other threads:[~2023-03-27  8:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-16 16:09 When using git commit in a path with spaces, it prompts Cannot read "xxx": No such file or directory L2750558108
2023-03-27  8:28 ` Johannes Schindelin [this message]

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=ca58a4a2-dd73-26f5-9d2f-13a658bbaa9b@gmx.de \
    --to=johannes.schindelin@gmx.de \
    --cc=L2750558108@outlook.com \
    --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).