Re: Finding all commits which modify a file

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

 



On Tue, Jan 24, 2012 at 2:36 AM, Santi Béjar <santi@xxxxxxxxxxx> wrote:
> On Tue, Jan 24, 2012 at 2:15 AM, Linus Torvalds
> <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>> On Mon, Jan 23, 2012 at 4:58 PM, Santi Béjar <santi@xxxxxxxxxxx> wrote:
>>>
>>> If you add parent rewriting (--parent, --graph or see it in gitk, with
>>> --full-history) you'll get your B2 commit as it adds commits to have a
>>> meaningful history. But I don't think this is what you are asking for.
>>>
>>>  You could try the following patch (sorry for the whitespace damage,
>>> also attatched):
>>>
>>> Subject: [PATCH/RFC] revision: merging branches with different content
>>> is interesting in --full-history
>>
>> The concept seems sane.
>>
>> But please check the interaction with "--simplify-merges" too, just in
>> case. The merge simplification looks at TREESAME too, so I suspect
>> your change may break merge simplification.
>
> Indeed, there is a bad interaction with --simplify-merges. If you add
> --simplify-merges it not only increase the number of commit but
> changes them :-(
>
> $ ./git rev-list --full-history --simplify-merges HEAD Makefile >
> rev-list.simp-merges
> $ ./git rev-list --full-history HEAD Makefile > rev-list.new
> $ diff rev-list.new rev-list.simp-merges -u | diffstat
>  rev-list.simp-merges | 1841 ++++++++++++++++++++++++++-------------------------
>  1 file changed, 944 insertions(+), 897 deletions(-)

Ops, it even happens without my patch...

I think it is OK, it just redefines what is TREESAME, and use the new
meaning in:

* If after this parent rewriting, `C'` is a root or merge commit (has
  zero or >1 parents), a boundary commit, or !TREESAME, it remains.
  Otherwise, it is replaced with its only parent.

We could keep the old meaning if --simplify-merges or we could have a
flag to just change the meaning of TREESAME for merges
(--with-all-interesting-merges? I'm not good at naming flags...)

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