Re: Removing useless merge commit with "filter-branch"

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

 



Anatol Pomozov <anatol.pomozov@xxxxxxxxx> writes:

> |
> o      - merge commit that previously merged feature X
> |\
> | \
> |  \
> o  |   - real commit
> |   |
> |  /
> |/
> |

It is unclear how many commits are drawn in the above picture and
what "feature X" is about in the above picture.  Care to redraw the
commit DAG to explain what you are trying to do a bit better?

The way I read it is that you start from a history like this (note
that when we draw an ascii art history we often write it sideways,
time flows from left to right):

    ---A-----B-----M---
        \         /
         C-------D

where a side branch to implement "feature X" that has C and D forked
at A, and it was merged at M after somebody else committed B on the
mainline.  When you filtered out some parts of the tree, it turns
out that C and D are totally unintereseting because their changes
touch parts outside of your interest, i.e. the history is:

    ---A-----B-----M---
        \         /
         o-------o

where 'o' are now no-op.

Is that what you are talking about?

I think "log --simplify-merges A..M -- path" may already has logic
that deals with this, so it may help if you study what it does and
how it does what it does.

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