git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* When using git commit in a path with spaces, it prompts Cannot read "xxx": No such file or directory
@ 2023-02-16 16:09 L2750558108
  2023-03-27  8:28 ` Johannes Schindelin
  0 siblings, 1 reply; 2+ messages in thread
From: L2750558108 @ 2023-02-16 16:09 UTC (permalink / raw)
  To: git

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

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

* Re: When using git commit in a path with spaces, it prompts Cannot read "xxx": No such file or directory
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Schindelin @ 2023-03-27  8:28 UTC (permalink / raw)
  To: L2750558108@outlook.com; +Cc: git

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

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

end of thread, other threads:[~2023-03-27  8:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

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).