News for hackers. Stuff that matters.
Re:Git 2.9 released by neogenix on Thursday June 16, 2016 @07:14AM (#11915351)
"In 2.9, Git's diff engine learned a new heuristic: it tries to keep hunk boundaries at blank lines, shifting the hunk "up" whenever the bottom of the hunk matches the bottom of the preceding context, until we hit a blank line. "

I like the new diff improvements

Re:Git 2.9 released by spb on Thursday June 16, 2016 @02:28PM (#11917961)
I don't understand why Git can't just make the [histogram algorithm][1] default, which has better performance than the base Myers algorithm, and is already built to integrate this type of heuristics (without the bugs that caused this patch to get held back).

[1]: http://stackoverflow.com/questions/32365271/whats-the-differ...

Re:Git 2.9 released by emmelaich on Thursday June 16, 2016 @07:19AM (#11915365)
In a few (relatively) short years, git's diff has improved on all the other diffs out there.
Re:Git 2.9 released by darfs on Thursday June 16, 2016 @07:23AM (#11915382)
I didnt even know about the mentioned diff-script: https://github.com/git/git/blob/master/contrib/diff-highligh... It gives pretty nice output :-)

I should definitely learn more about extending git!

Re:Git 2.9 released by Spiritus on Thursday June 16, 2016 @08:12AM (#11915559)
Re:Git 2.9 released by michaelmior on Thursday June 16, 2016 @08:19AM (#11915597)
+1 for this. I started using it a few months ago for all my git diffs and I quite like the output. The biggest thing for me is being able to easily see partial line changes.
Re:Git 2.9 released by 0942v8653 on Thursday June 16, 2016 @09:52AM (#11916061)
Requires Node though. Not sure that many people have that installed.
Re:Git 2.9 released by TimWolla on Thursday June 16, 2016 @09:56AM (#11916087)
It does not:

> For convenience, the recommended installation is via NPM. If you'd prefer, you may choose to do a manual installation instead. (highlighting by me)

It is written in Perl.

Re:Git 2.9 released by ymse on Thursday June 16, 2016 @04:05PM (#11918515)
Wait, what? A perl app distributed through NPM? What's next, a node app on CPAN?

Color me perplexed.

Re:Git 2.9 released by dietrichepp on Thursday June 16, 2016 @06:04PM (#11919226)
There are a lot of non-JS packages in NPM. The Closure compiler, for example.
Re:Git 2.9 released by maverickwoo on Thursday June 16, 2016 @04:39PM (#11918706)
My favorite git diff extension is the side-by-side diff by cdiff:

https://pypi.python.org/pypi/cdiff

It also features word-level change highlights and other common flares.

Re:Git 2.9 released by forrestthewoods on Thursday June 16, 2016 @10:09AM (#11916189)
Re:Git 2.9 released by merb on Thursday June 16, 2016 @06:04PM (#11919232)
Re:Git 2.9 released by zwieback on Thursday June 16, 2016 @10:30AM (#11916336)
It's the absolute best, been using it for years.
Re:Git 2.9 released by tomtheengineer on Thursday June 16, 2016 @01:14PM (#11917459)
Beyond Compare is the best I've found (especially for complex merges): http://www.scootersoftware.com/
Re:Git 2.9 released by philliphaydon on Thursday June 16, 2016 @01:40PM (#11917649)
Me too. I tried ataxia for about 6 months and hated it, got told about beyond compare, paid for a license after only a few days of the trial .
Re:Git 2.9 released by forrestthewoods on Thursday June 16, 2016 @04:23PM (#11918619)
Beyond Compare is great. I prefer Araxis. I think most people would be very happy with one of the two. Whichever you happen to prefer.
Re:Git 2.9 released by wscott on Thursday June 16, 2016 @02:34PM (#11917996)
Cool. BitKeeper internal diff, used for recording history and displaying changes has done this since 2001. https://gist.github.com/wscott/c403526ca19a210c13ad649136c15...

http://bkbits.net/u/bk/bugfix/?PAGE=patch&REV=3bdee65dgEb_uM...

Re:Git 2.9 released by broodbucket on Thursday June 16, 2016 @09:10AM (#11915816)
Does anyone know if this only works when displaying diffs, or when generating them? It'd definitely be nice if diffs were more readable when sent to mailing lists, i.e. from git format-patch.
Re:Git 2.9 released by creshal on Thursday June 16, 2016 @10:22AM (#11916276)
I'm fairly sure this applies only to the generating engine. (Otherwise it'd somehow need to reformat old diffs on the fly.)
Re:Git 2.9 released by avar on Thursday June 16, 2016 @01:32PM (#11917600)
Reformat old diffs? If you're under the impression that Git stores diffs you're mistaken. It stores the full file contents and delta-compresses them later.

Diffs in Git are purely a presentation format for human consumption.

Re:Git 2.9 released by creshal on Thursday June 16, 2016 @02:51PM (#11918104)
> Diffs in Git are purely a presentation format for human consumption.

git format-patch says hi. Obviously the diff engine changes won't apply to already generated text diffs.

Re:Git 2.9 released by hibbelig on Thursday June 16, 2016 @05:09PM (#11918884)
You can pipe an existing diff through diff-so-fancy or diff-highlight:

    cat foo.diff | diff-so-fancy
I've never tried, but that's what the doc says.

[time passes]

Oh yes, it seems to work. It doesn't do colors when I try it, but that's probably a misconfiguration on my side. It's how this is intended to be used.

Re:Git 2.9 released by Rafert on Thursday June 16, 2016 @03:30PM (#11918300)
Does anybody know if the new diff heuristic engine takes info from a .gitattributes file in to account? When using git diff to view changes it already makes a difference, see http://urbanautomaton.com/blog/2011/07/28/git-grep-and-langu...