Files marked as *modified after clone
See original GitHub issueI am using Node, on Windows
Problem
On Windows and with some repositories, isogit is telling me that all files are modified just after cloning the repo.
This is blocking me because I can’t find which files have been changed locally since the last commit
Steps to reproduce
npm i -g isomorphic-git
git clone https://github.com/acailly/isomorphic-git-issue-1275.git
cd isomorphic-git-issue-1275
isogit status --filepath="README.md"
> "*modified"
This is not reproduced on other repo like https://github.com/isomorphic-git/isomorphic-git.git
I do not reproduce it on the Ubuntu executed in WSL2 (Windows Subsystem for Linux), where the displayed status is correct (unmodified
)
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Files showing as modified directly after a Git clone
This was caused by the path to the file and the filename being too long for Windows. To resolve it, clone the repository...
Read more >git status shows as files modified directly after clones
The behavior which showing some files as modified could be related to line ending setting and multiple client used. Every operating system ...
Read more >Files showing as modified directly after a Git clone - Intellipaat
For this problem try: git config --global core.autocrlf input. Even then if it was showing the files are changed then:.
Read more >Some git-lfs tracked files shown as modified after git clone
The diff you've shown indicates that the files share the same mode but have different contents and at least one set of contents...
Read more >Use Git in MATLAB - MATLAB & Simulink - MathWorks
Clone Remote Git Repository · Mark Files for Addition · Review Changes · Commit Modified Files · Push Files · Resolve Conflicts ·...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I confirm this is a crlf issue, if I change
GitObject.wrap
implementation fromhttps://github.com/isomorphic-git/isomorphic-git/blob/f2e38053733f4c8ca4b7784d5c2a56addcf36bf4/src/models/GitObject.js#L4
to
then the bug disapeared \o/
I tried to set the
core.autocrlf
git config tofalse
and the bug disapeared too (even without the fix) But I want to keep it totrue
since I often work with people on Linux (including me)so it seems that line break issues are not handled in
isomorphic-git
and I don’t find any related issues, is it possible that I am the only one using this lib on Windows ? 😁 or maybe I am missing something, which is very possibleMy fix is a workaround oustide this repo and specific to my use case, so I don’t really have a good fix to submit