FHIR Chat · git showing lots of changes · committers

Stream: committers

Topic: git showing lots of changes


view this post on Zulip Rik Smithies (Apr 29 2020 at 17:09):

I'm using Tortoise Git client (maybe that is my problem) and recently it has been showing hundreds of files as changed when I try to commit one tiny change. When I do a diff, the files it shows have not actually changed. This didn't used to happen. A command line commit seems to show the same. Any git experts know why this might be?

view this post on Zulip Khalid Shahin (Apr 29 2020 at 17:15):

There were a few dependency changes the past few days that Grahame made. Maybe a full build wasn't pushed yet that uses those dependencies and yours happened to be the first one. Just a guess.

What are some of the files and folders does Git say have been changed?

view this post on Zulip Rik Smithies (Apr 29 2020 at 17:22):

it's not that recent, it's been happening for a few weeks. It shows 783 files changed, across virtually every folder. I thought my build was messed up, and eventually got a fresh one out today, changed one file and it still says hundreds have changed.

view this post on Zulip Khalid Shahin (Apr 29 2020 at 17:24):

I can try it on my computer. Can you send me the changed file?

view this post on Zulip Jose Costa Teixeira (Apr 29 2020 at 17:24):

are the changes in the content? or just line break changes?

view this post on Zulip Rik Smithies (Apr 29 2020 at 17:49):

@Khalid Shahin it doesn't matter what file is changed. I have changed different files and it is always the same. @Jose Costa Teixeira not sure what you mean, but I have made definite changes to one of the excel sheets. Not just whitespace.

view this post on Zulip Jose Costa Teixeira (Apr 29 2020 at 17:51):

image.png

view this post on Zulip Rik Smithies (Apr 29 2020 at 17:52):

I don't know what that is

view this post on Zulip Jose Costa Teixeira (Apr 29 2020 at 17:52):

sometimes the system (not sure what ) changes the line endings from CRLF to LF (i guess it's a windows/*nix thing)

view this post on Zulip Jose Costa Teixeira (Apr 29 2020 at 17:53):

so the content does not change but git will say this is changing

view this post on Zulip Jose Costa Teixeira (Apr 29 2020 at 17:53):

I don't know if that is what you have, i just thought of that as a possibility

view this post on Zulip Rik Smithies (Apr 29 2020 at 18:02):

ah, I don't think it is changing all the line endings. When I do a diff my tool doesn't show any difference. But I suppose it could be hiding that.

view this post on Zulip Rik Smithies (Apr 29 2020 at 18:03):

it is all text files that are showing as changes, none of them are images

view this post on Zulip Jose Costa Teixeira (Apr 29 2020 at 18:07):

yes, line endings are hidden

view this post on Zulip Jose Costa Teixeira (Apr 29 2020 at 18:08):

and it only happens in text files

view this post on Zulip Jose Costa Teixeira (Apr 29 2020 at 18:08):

(see my example - all .bat files that i edited manually in notepad)

view this post on Zulip Jose Costa Teixeira (Apr 29 2020 at 18:09):

can you send over one file that git says has changed, but you say it shouldn't have?

view this post on Zulip Rik Smithies (Apr 29 2020 at 18:10):

Using a different diff viewer it tells me that it is the line endings that have changed

view this post on Zulip Rik Smithies (Apr 29 2020 at 18:11):

the question is how to get git fetch to not do that, or to ignore that on a commit

view this post on Zulip Rik Smithies (Apr 29 2020 at 18:11):

if it is doing it automatically I would expect it to ignore it automatically as well

view this post on Zulip Jose Costa Teixeira (Apr 29 2020 at 18:16):

I never worried with it but perhaps you can change your git settings

view this post on Zulip Jose Costa Teixeira (Apr 29 2020 at 18:16):

https://help.github.com/en/github/using-git/configuring-git-to-handle-line-endings

view this post on Zulip Rik Smithies (Apr 29 2020 at 18:19):

I used the windows git client to fetch a clean build. At install it has an option and I'm pretty sure I selected "Checkout as-is, commit as-is". In other words don't mess with things. But it seems that may not be the right setting.

view this post on Zulip Jose Costa Teixeira (Apr 29 2020 at 18:28):

by default, my windows settings DO mess up the line feeds

view this post on Zulip Jose Costa Teixeira (Apr 29 2020 at 18:29):

i didn't bother with that until now, so I don't know how would that be fixed

view this post on Zulip Rik Smithies (Apr 29 2020 at 18:41):

when you say it messes it up, does it change them, but cope with it transparently on a commit? I don't care what it does as long as it fixes it automatically on the way back. I am reinstalling Git for Windows with different settings to see what happens. Thanks for the suggestion about line endings anyway, that definitely seems to be the issue.

view this post on Zulip Jose Costa Teixeira (Apr 29 2020 at 19:04):

sorry, but I don't know the insides of that. the way that line endings are done is irrelevant, so it doesn't break anything

view this post on Zulip Jose Costa Teixeira (Apr 29 2020 at 19:04):

it does create these annoying false positives

view this post on Zulip Rik Smithies (Apr 30 2020 at 10:14):

@Jose Costa Teixeira I was asking what it does for you. You say "my windows settings DO mess up the line feeds". But for you does that mess also mess up at commit time? When you commit, does it say all the files are changed? Or just the ones you actually changed?

view this post on Zulip Jose Costa Teixeira (Apr 30 2020 at 10:33):

it says more files are changed than I did change


Last updated: Apr 12 2022 at 19:14 UTC