Re: rev-list --parents --full-history + path: something's fishy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Sat, 24 May 2008, Johannes Sixt wrote:
> 
> but this does not:
> 
> $ git rev-list --full-history --parents HEAD -- a
> M A B
> B A
> A

That is the "correct" output.

That's what "--full-history" means: do not simplify merges away when all 
the data comes from just one branch (in this case from "B").

So it shows you commit 'M' because you asked for full-history.

Commit 'M' has parents 'C' and 'B', but since 'C' doesn't actually modify 
the file at all, the regular commit simplification will simplify 'C' away, 
so now that parent 'C' will become 'A'. So 'M' has the _simplified_ 
parent's 'A' and 'B'.

Then it shows 'B' (parent 'A') and 'A' (no parent).

> Of course, I'd expected to see this:
> 
> $ git rev-list --full-history --parents HEAD -- a
> B A
> A

Why did you ask for --full-history, if you're not interested in merges 
that are irrelevant? To get what you wanted, just do

	git rev-list --parents HEAD -- a

and it should give you exactly that output.

		Linus
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux