Thread (2 messages) flat view 2 messages, 1 author, 2016-06-15

Re: git-rev-list: make --dense the default (and introduce "--sparse")

From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:42:09


On Tue, 25 Oct 2005, Linus Torvalds wrote:
This actually does three things:

 - make "--dense" the default for git-rev-list. Since dense is a no-op if 
   no filenames are given, this doesn't actually change any historical 
   behaviour, but it's logically the right default (if we want to prune on 
   filenames, do it fully. The sparse "merge-only" thing may be useful, 
   but it's not what you'd normally expect)

 - make "git-rev-parse" show the default revision control before it shows 
   any pathnames.
Btw, if it wasn't obvious, this has some subtle (and very nice) side 
effects.

For example, try this:

	git log git-fetch.sh

and notice how "git log" automagically became able to give per-file logs. 
With _zero_ changes to git-log.sh itself ;)

And same old rev-confusion-avoidance:

	git log -- gitk

to make clear that you want to get the log of "gitk the file", rather than 
"gitk the branch".

Magic. 

		Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help