git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Linus Torvalds <torvalds@osdl.org>
Date
Oct 25, 2005, 22:29 UTC
Message-ID
<Pine.LNX.4.64.0510251525540.10477@g5.osdl.org>
In-Reply-To
<Pine.LNX.4.64.0510251459070.10477@g5.osdl.org>
On Tue, 25 Oct 2005, Linus Torvalds wrote:
Show 11 quoted lines
> 
> 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
Previous: Linus TorvaldsNext: Junio C Hamano
Message 2 of 5 in “git-rev-list: make --dense the default (and introduce "--sparse")”
  1. Linus TorvaldsOct 25, 2005
  2. Linus TorvaldsOct 25, 2005
  3. Junio C HamanoOct 26, 2005
  4. Linus TorvaldsOct 26, 2005
  5. Junio C HamanoOct 26, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.