"git log --simplify-by-decoration" but including branch & merge points

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

 



Hi,

I'd like something like "git log --simplify-by-decoration" that also includes the commit that a branch was branched *from*. I find this useful to understanding the relationships between branches.

For example, for the following repository with 2 branches "master" and "branch":

    git log --graph --all --pretty="format:%d %s"
    *  (branch) b
    *  a
    | *  (master) 4
    | *  3
    |/  
    *  2
    *  1

I would like a way to hide commits "a" and "3" (like --simplify-by-decoration) but to *include* commit "2" (unlike --simplify-by-decoration) because it shows me the crucial information of *when* "branch" and "master" started to diverge. Ideally I would also like to see merge commits.

In summary: 
* Show any commit referred to by some branch or tag (as with --simplify-by-decoration),
* or with more than one parent (merges), 
* or with more than one child, as long as at least 2 children are reachable from the commits you've specified (this is to include branch-points of any branches you are interested in, but to exclude branches you don't care about. It's probably impossible to get this criteria absolutely perfect, but better to include some additional commits than to exclude ones I want to see).

I don't think this is currently possible. What would be the best way to achieve it? Maybe a new flag to git-log, to be used together with --simplify-by-decoration? I am willing to work on a patch for this if people agree that it would be useful and likely to be accepted.

In general, when providing several commit-limiting and history-simplification parameters to git-log, should they be ANDed or ORed together? For example "git log --merges --simplify-by-decoration" doesn't seem to provide any useful output; would it makes sense to change this to mean "show anything that simplify-by-decoration would show, but also show merge commits"?

Thanks,
David Röthlisberger.

--
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]