Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Git 1.7.8 changes for the everyday developer (johnkary.net)
123 points by johnkary on Dec 13, 2011 | hide | past | favorite | 15 comments


The author should try adding this to his .git/info/attributes file:

     *.py diff=python
That should make --function-context work better on python source files.


I wonder how hard it is to teach it new languages.


All you need to do is write a regex to match. Currently supported languages are:

BibTeX, C/C++, html, java, ObjectiveC, Pascal, PHP, Python, Ruby, and TeX.

More details can be found in the gitattributes(5) manpage


Isn't it kind of odd that that isn't the default, given that diff=python is already built in?


The "[command] learned [option]" construct is a really interesting way to phrase directed development effort. I'm not quite sure what the implications are, but it definitely changed the way I parsed and understood the post. "Git is getting smarter" versus "New features have been added to git."


We all know that Git will, one day, take over the world.


Whatever happened to generation numbers?


IIRC (I read the git mailing list) there was a lot of arguing about whether generation numbers should be in the commit headers or stored in separate cache, and then a different fix went in to speed up "tag --contains" and the discussion was pretty much abandoned.


wow. I didn't even know about git grep. Very useful


It's probably my most commonly-used git command, to the point where I have it aliased to "g g".


You guys should really look into http://betterthangrep.com/ :)


As amazing as ack is, it would take some effort to teach it how to grep through git history.


Way slower, because it includes vendored files I don't care about.


Agreed, ack is a really nice tool.


Nice summary. Thanks!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: