Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Please can you explain about whitespace errors in git, what do they mean, what is 'squelching', and do I need to worry about it?

(Running msysgit, but with other users on linux).

There is already a 'definitive' answer for autocrlf here (set it to false git config --global core.autocrlf false )

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
987 views
Welcome To Ask or Share your Answers For Others

1 Answer

Squelching is initially a function used in telecommunication to set a threshold above which a signal is or isn't alllowed through.

In your case, when you see:

warning: squelched 104 whitespace errors
warning: 109 lines add whitespace errors. 

It means: instead of displaying 100+ error messages, it warns you it should have displayed those errors (but it won't, in order to not clutter the output)

I have no definitive recommendations for whitespace policy, except from identifying why they are introduced in the first place.
If your editor doesn't convert the eol (end of lines) characters between Window and Unix, then it means it somehow add or remove automatically whitespaces, which is not always useful.

A first test (as in this blog post) is to de-activate the policy:

git config core.whitespace nowarn

or try

git config core.whitespace fix

and see if that facilitates your rebase operations.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...