Skip to content

Whitespace in filename causing errror checking out academicpages.github.io repo on Git-bash (MSYS2) under WIndows #2792

Closed
@wirawan0

Description

@wirawan0

Describe the bug
The current commit of academicpages.github.io (1acca92) failed to clone successfully under Windows. The culprit is stray whitespace characters in some of the file names.

To Reproduce
Steps to reproduce the behavior:
Simple clone this repo in Windows with "Git for Windows" under Git Bash terminal with:

    git clone https://github.com/academicpages/academicpages.github.io.git test-website

Expected behavior / Undesired actual outcome
No error should occur. Instead, I got an error in checking out the repo (although the clone was successful).

Screenshots

$ git clone https://github.com/academicpages/academicpages.github.io.git test-website
Cloning into 'test-website'...
remote: Enumerating objects: 3245, done.
remote: Total 3245 (delta 0), reused 0 (delta 0), pack-reused 3245 (from 1)
Receiving objects: 100% (3245/3245), 52.59 MiB | 17.64 MiB/s, done.
Resolving deltas: 100% (1353/1353), done.
error: invalid path '.github/    workflows  /scrape_talks.yml'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser N/A
  • Git Version: 2.37.3.windows.1

Additional context
I pinpointed the offending commit to this one:

|   commit a9501b94b458a0928870ec0e2454c14944666ab9
|   Author: Dimitra Maoutsa <maoutsa.d@hotmail.gr>
|   Date:   Sun Dec 29 21:36:39 2024 +0100
|
|       Create scrape_talks.yml
|
|    .github/    workflows  /scrape_talks.yml | 36 ++++++++++++++++++++++++++++++++++++
|    1 file changed, 36 insertions(+)
|

see also #2717 .

I created fork where I eliminated the stray whitespace from \ \ \ \ workflows\ \ -- see https://github.com/wirawan0/academicpages.github.io , the new commit cloned successfully under Git for Windows.

I wonder why the workflows subfolder was fenced with four leading whitespace chars and two training whitespace chars? Was that a way to protect from being applied automatically by GitHub Actions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions