threads / discuss / 33022

Ignore version update changes on git show report?

Subject: Ignore version update changes on git show report?

## tl;dr

3 messages between Feb 26, 2013 and Mar 1, 2013.

replies: 2people: 2as markdown or json

Preben Liland Madsen· Feb 26, 2013, 19:53 UTC · lore
Hello, 
I'm trying to investigate some what changes have been done between two versions of a software with the name IP.Board. 
This proves more troublesome than I thought, since their release builder appearantly updates the version number automatically in all files. 
This causes a lot of files to have this as the only change: 
- * IP.Board v3.4.2
+ * IP.Board v3.4.3
Which is quite annoying to have to go through and therefor is responsible for more than 800 files being changed. 
Is there some sort of git command or command I can combine together with git show that will ignore files with only these changes? Something along the lines of ignoring files where the only change matches this change or ignore files that've only gotten 1 line removed and 1 line added? 
Best regards, Preben
Michael J Gruber· Mar 1, 2013, 13:33 UTC · re: Preben Liland Madsen · lore

Re: Ignore version update changes on git show report?

Preben Liland Madsen venit, vidit, dixit 26.02.2013 20:53:
Show 20 quoted lines
> Hello, 
> 
> I'm trying to investigate some what changes have been done between two versions of a software with the name IP.Board. 
> 
> This proves more troublesome than I thought, since their release builder appearantly updates the version number automatically in all files. 
> 
> This causes a lot of files to have this as the only change: 
> 
> - * IP.Board v3.4.2
> + * IP.Board v3.4.3
> 
> Which is quite annoying to have to go through and therefor is responsible for more than 800 files being changed. 
> 
> Is there some sort of git command or command I can combine together with git show that will ignore files with only these changes? Something along the lines of ignoring files where the only change matches this change or ignore files that've only gotten 1 line removed and 1 line added? 
> 
> Best regards, Preben--
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
First of all, there is
git beat-with-stick
that you should apply to those responsible for that mess ;)

If you have to deal with that sort of situation then a textconv filter might get you as close as possible. Use "grep -v '^\* IP.Board v*'" as a textconv filter for those files, and those changes will disappear from the diff. (I do something like that for tracking my gitk config, which stores last window sizes.)

Michael
Preben Liland Madsen· Mar 1, 2013, 15:12 UTC · re: Michael J Gruber · lore

Re: Ignore version update changes on git show report?

Den 1. mars 2013 kl. 14.33 skrev Michael J Gruber:
Show 5 quoted lines
> First of all, there is
> 
> git beat-with-stick
> 
> that you should apply to those responsible for that mess ;)
Haha, yeah I should try that one ;-)
I wish they weren't included in their release, but what can you do... I'm sure they have their reason for including the updated version number. Maybe to ensure files have been updated or similar when doing support for their clients, I guess... Although for us it really is more a pain than gain that they update the version number in all their php files when we wish to review changes done in files we may have modified earlier or possibly investigate bugs that may suddenly crop up in newer versions.
Show 5 quoted lines
> If you have to deal with that sort of situation then a textconv filter
> might get you as close as possible. Use "grep -v '^\* IP.Board v*'" as a
> textconv filter for those files, and those changes will disappear from
> the diff. (I do something like that for tracking my gitk config, which
> stores last window sizes.)
Thanks! I got a similar tips on stackoverflow: http://stackoverflow.com/questions/15097401/git-any-way-to-ignore-files-that-have-gotten-version-number-changed-only/
But unfortunately that doesn't work for --stat it seems, but I've written a small "sketchy" shell-script to just ignore all lines with 2+- in them...
Best regards, Preben

← back to recent threads