Re: Inconsistencies with git log

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Friday, November 9, 2007 - 11:36 am

On Fri, 9 Nov 2007, Peter Baumann wrote:

Btw, you can *make* them the same by using

	git log --full-history --sparse .

which basically tells git that you do not want any of the history 
simplification that git log does by default.

There's two different kinds of simplifications (which is why there are two 
kinds of switches above):

 - the "simplify merges to just the parent that is identical"

   This basically means that if a merge result comes 100% from one of the 
   parents, by default we will only look at that parent. Using 
   --full-history avoids this.

 - the "dense" history, which removes simple commits that don't make any 
   changes

   This is the "--sparse" thing: it says that we're interested even in 
   regular commits that simply don't make any changes.


Actually, git itself creates these commits under several circumstances:

 - you can *force* it. No, "git commit" on its own doesn't allow it, but 
   you can do it quite easily with "git commit-tree" and setting things 
   up by hand.

 - you can import history from other SCM's. I think all importers will 
   honor other SCM's, and if they allow empty commits then the end result 
   will have empty commits in it too!

 - merges. This is the common case. You have a "git merge --ours" or 
   similar, which basically merges just one side (or, even without 
   "--ours", this is really common for the non-"." case: a merge just 
   doesn't touch some files at all). Then, the merge simplifier will first 
   turn it into a "single parent", and then densification will remove that 
   (now uninteresting) empty merge.


See above. Three cases, in fact.

		Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Inconsistencies with git log, Jon Smirl, (Wed Nov 7, 3:15 pm)
Re: Inconsistencies with git log, Johannes Schindelin, (Wed Nov 7, 3:42 pm)
Re: Inconsistencies with git log, Jon Smirl, (Wed Nov 7, 3:45 pm)
Re: Inconsistencies with git log, Johannes Schindelin, (Wed Nov 7, 3:58 pm)
Re: Inconsistencies with git log, David Symonds, (Wed Nov 7, 4:00 pm)
Re: Inconsistencies with git log, Jon Smirl, (Wed Nov 7, 4:03 pm)
Re: Inconsistencies with git log, Johannes Schindelin, (Wed Nov 7, 4:11 pm)
Re: Inconsistencies with git log, Jon Smirl, (Wed Nov 7, 4:16 pm)
Re: Inconsistencies with git log, Brian Gernhardt, (Wed Nov 7, 4:19 pm)
Re: Inconsistencies with git log, Jon Smirl, (Wed Nov 7, 4:29 pm)
Re: Inconsistencies with git log, David Symonds, (Wed Nov 7, 4:31 pm)
Re: Inconsistencies with git log, Johannes Schindelin, (Wed Nov 7, 5:04 pm)
Re: Inconsistencies with git log, Jon Smirl, (Wed Nov 7, 5:09 pm)
Re: Inconsistencies with git log, Johannes Schindelin, (Wed Nov 7, 5:09 pm)
[PATCH 1/2] Makefile: wt-status.h is also a lib header, Johannes Schindelin, (Wed Nov 7, 5:10 pm)
Re: Inconsistencies with git log, Andreas Ericsson, (Wed Nov 7, 5:11 pm)
[PATCH 2/2] git status: show relative paths when run in a ..., Johannes Schindelin, (Wed Nov 7, 5:12 pm)
Re: Inconsistencies with git log, David Symonds, (Wed Nov 7, 5:14 pm)
Re: Inconsistencies with git log, Andreas Ericsson, (Wed Nov 7, 5:16 pm)
Re: Inconsistencies with git log, Johannes Schindelin, (Wed Nov 7, 5:35 pm)
Re: Inconsistencies with git log, Brian Gernhardt, (Wed Nov 7, 5:52 pm)
Re: [PATCH 2/2] git status: show relative paths when run i ..., Johannes Schindelin, (Wed Nov 7, 6:00 pm)
Re: Inconsistencies with git log, Peter Baumann, (Thu Nov 8, 1:29 am)
Re: Inconsistencies with git log, Wincent Colaiuta, (Thu Nov 8, 2:19 am)
Re: Inconsistencies with git log, Wincent Colaiuta, (Thu Nov 8, 2:24 am)
Re: Inconsistencies with git log, David Symonds, (Thu Nov 8, 6:16 am)
Re: Inconsistencies with git log, Andreas Ericsson, (Thu Nov 8, 6:40 am)
Re: Inconsistencies with git log, Daniel Barkalow, (Thu Nov 8, 11:28 am)
Re: Inconsistencies with git log, Alex Riesen, (Thu Nov 8, 2:21 pm)
Re: Inconsistencies with git log, Alex Riesen, (Thu Nov 8, 2:23 pm)
[PATCH REPLACEMENT for 2/2] git status: show relative path ..., Johannes Schindelin, (Fri Nov 9, 8:30 am)
Re: Inconsistencies with git log, Linus Torvalds, (Fri Nov 9, 8:54 am)
Re: Inconsistencies with git log, Jon Smirl, (Fri Nov 9, 10:20 am)
Re: Inconsistencies with git log, Linus Torvalds, (Fri Nov 9, 10:38 am)
Re: Inconsistencies with git log, Linus Torvalds, (Fri Nov 9, 10:53 am)
Re: Inconsistencies with git log, Jon Smirl, (Fri Nov 9, 11:04 am)
Re: Inconsistencies with git log, Linus Torvalds, (Fri Nov 9, 11:14 am)
Re: Inconsistencies with git log, Peter Baumann, (Fri Nov 9, 11:22 am)
Re: Inconsistencies with git log, Junio C Hamano, (Fri Nov 9, 11:35 am)
Re: Inconsistencies with git log, Linus Torvalds, (Fri Nov 9, 11:36 am)
Re: Inconsistencies with git log, Peter Baumann, (Fri Nov 9, 11:39 am)
Re: [PATCH REPLACEMENT for 2/2] git status: show relative ..., Johannes Schindelin, (Sat Nov 10, 7:10 am)
Re: Inconsistencies with git log, Miles Bader, (Sat Nov 10, 3:51 pm)