question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Directory in repo gets first letter of name duplicated in index but not filesystem, can't commit anymore

See original GitHub issue

Description

Using GitHub Desktop to access an internal repo, after checking out code and moving folders around, a commit and push worked fine. but a later fetch created a bizarre issue where the filename of one of the folders has the first letter of the name duplicated. This applies only to the index of the files in GitHub Desktop, not the actual filesystem folders.

Because of this, further commits, pushes or fetches always generate an error, usually about invalid paths.

Version

GitHub Desktop version: 1.0.10

OS version: Windows 7 Enterprise

Steps to Reproduce

  1. Clone a repo using the URL option
  2. Fetch files
  3. In the local filesystem, add a new folder such as “foo bar” and move files into it
  4. Commit the changes
  5. Push the repo.
  6. Do a fetch to synch any changes
  7. Observe if recently created folder is now listed with an extra letter, i.e. “ffoo bar” in index.
  8. Make a few changes
  9. Attempt to commit changes, observe error message.

Expected behavior: Foldernames not to change, commits to work

Actual behavior: Index munges folder name, loses its mind, Github becomes useless, children cry

Reproduces how often: 100% with the specific internal repo, do not know if it happens elsewhere.

Logs

2017-12-11T15:36:31.381Z - info: [ui] [AppStore] loading 1 repositories from store 2017-12-11T15:36:33.197Z - info: [ui] Executing getBranches: git for-each-ref --format=%(refname)%00%(refname:short)%00%(upstream:short)%00%(objectname)%00%(author)%00%(parent)%00%(symref)%00%(subject)%00%(body)%00%1F refs/heads refs/remotes (took 1.640s) 2017-12-11T15:36:33.525Z - info: [ui] Executing getRecentBranches: git log -g --no-abbrev-commit --pretty=oneline HEAD -n 2500 – (took 1.951s) 2017-12-11T15:36:33.852Z - info: [ui] Executing getStatus: git status --untracked-files=all --branch --porcelain=2 -z (took 2.478s) 2017-12-11T15:36:34.929Z - info: [ui] Executing getWorkingDirectoryDiff: git diff HEAD --no-ext-diff --patch-with-raw -z --no-color – 000 README.txt (took 1.059s) 2017-12-11T15:36:36.334Z - info: [ui] launching: 1.0.10 (Windows 6.1.7601) 2017-12-11T15:36:36.854Z - info: [ui] Executing getStatus: git status --untracked-files=all --branch --porcelain=2 -z (took 1.088s) 2017-12-11T15:36:37.915Z - info: [ui] Executing getAuthorIdentity: git var GIT_AUTHOR_IDENT (took 1.022s) 2017-12-11T15:36:40.846Z - info: [ui] Executing installGlobalLFSFilter: git lfs install --skip-repo (took 4.876s) 2017-12-11T15:38:00.071Z - error: [ui] git reset -- . exited with an unexpected code: 128. error: Invalid path 'prod/' fatal: make_cache_entry failed for path 'prod/'

2017-12-11T15:40:00.743Z - info: [ui] Executing getStatus: git status --untracked-files=all --branch --porcelain=2 -z (took 1.169s) 2017-12-11T15:41:16.253Z - info: [ui] Executing getStatus: git status --untracked-files=all --branch --porcelain=2 -z (took 1.156s) 2017-12-11T15:42:52.246Z - info: [ui] Executing getStatus: git status --untracked-files=all --branch --porcelain=2 -z (took 1.126s) 2017-12-11T15:43:52.905Z - error: [ui] git reset -- . exited with an unexpected code: 128. error: Invalid path 'prod/' fatal: make_cache_entry failed for path 'prod/'

2017-12-11T15:48:15.034Z - info: [ui] Executing getStatus: git status --untracked-files=all --branch --porcelain=2 -z (took 1.138s) 2017-12-11T15:48:16.176Z - info: [ui] Executing getWorkingDirectoryDiff: git diff HEAD --no-ext-diff --patch-with-raw -z --no-color – prod/\ (took 1.131s) 2017-12-11T15:50:55.919Z - info: [ui] Executing getStatus: git status --untracked-files=all --branch --porcelain=2 -z (took 1.207s) 2017-12-11T15:51:55.592Z - info: [ui] Executing getStatus: git status --untracked-files=all --branch --porcelain=2 -z (took 1.118s) 2017-12-11T15:52:49.754Z - info: [ui] Executing getStatus: git status --untracked-files=all --branch --porcelain=2 -z (took 1.013s)

Additional Information

Important note: While the log says the folder name is "prof/" there are no special characters in the folder name. I have also verified that I can clone this repo on a RHEL box using git with no errors, and commit changes as well.

I have tried wiping the local repo and re-cloning. Oddly, it will download everything just fine. Only afterwards does it munge the index and refuse future commits. This has eliminated any usefulness in using Github desktop as now I need to copy the files off the local PC to a Linux box, commit them there, and push… Then delete the repo on my Windows system and re-clone.

😕

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
nojdhcommented, Jan 8, 2018

I had the same issue and I found that the directories getting an extra letter had a .git from an old clone from another repository. Fixed it by simply removing the .git folders from the directories that had the issue.

2reactions
DeepMaccommented, Jan 8, 2018

@nojdh Was the old .git folder on the Windows filesystem prior to the issue? Or in the repo you cloned?

That may be what happened to me, I’ll need to check it in the office today.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I commit case-sensitive only filename changes in Git?
For example, renaming a file in a way that only changes letter case will cause git to report spurious conflicts or create duplicate...
Read more >
How to fix "The following module is missing from the file ...
Then either go to the Modules page and disable/uninstall it from there, or use Drush ( drush dis module_name && drush pm-uninstall module_name...
Read more >
Rename or Move files in GIT - Aram Koukia
In your Git working directory, you wish to rename a previously committed file named mycoolclass.cs to myCoolClass.cs and commit the newly renamed file....
Read more >
remove-section <name> git config [<file-option>] [--show-origin]
When writing, the new value is written to the repository local configuration file by default, and options --system , --global , --worktree ,...
Read more >
Project Config with vercel.json
json configuration file lets you configure, and override the default behavior of Vercel from within your project. This includes settings for: buildCommand ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found