Ramkumar Ramachandra wrote:
> [1]: https://www.ohloh.net/p/git/factoids#FactoidCommentsLow
Since this has been coming up from time to time:
I have nothing against including helpful comments where appropriate.
But one aspect which that factoid misses is that git has some very
detailed, very dense documentation available in its commit log. Tools
like "git gui blame" and "git log -S" can show detailed historical
information about the purpose of every line of code. A nice feature
of such documentation is that it is in a context where it cannot fall
out of date.
So for example I can do
$ git log -S'if (len && ambiguous_path(str, len))' -- sha1_name.c
commit 11cf8801
Author: Nicolas Pitre <[email protected]>
Date: Thu Feb 1 17:29:33 2007 -0500
provide a nice @{...} syntax to always mean the current branch
reflog
This is shorter than HEAD@{...} and being nameless it has no
semantic
issues.
Signed-off-by: Nicolas Pitre <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
and then "git show 11cf8801" will show me exactly what change prompted
that "len" test.
The same is true of the Linux kernel, too.
Hope that helps,
Jonathan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html