git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Finding all commits which modify a file

From
SBSanti Béjar <santi@agolina.net>
Date
Jan 24, 2012, 01:36 UTC
Message-ID
<CA+gHt1AYrCv_9MJwBntt_+-GRb4N81PxxO8HXP-XU0pCiFWAVw@mail.gmail.com>
In-Reply-To
<CA+55aFynLN7kBYh7i-kh+Xd1Qn-wKBePcokmJRNfe8RYA0cCZA@mail.gmail.com>

On Tue, Jan 24, 2012 at 2:15 AM, Linus Torvalds <torvalds@linux-foundation.org> wrote:

Show 17 quoted lines
> On Mon, Jan 23, 2012 at 4:58 PM, Santi Béjar <santi@agolina.net> 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(-)
Santi
Previous: Linus TorvaldsNext: Santi Béjar
Message 7 of 14 in “Finding all commits which modify a file”
  1. Neal GroothuisJan 20, 2012
  2. Neal KreitzingerJan 21, 2012
  3. Neal GroothuisJan 23, 2012
  4. Santi BéjarJan 24, 2012
  5. Santi BéjarJan 24, 2012
  6. Linus TorvaldsJan 24, 2012
  7. Santi BéjarJan 24, 2012
  8. Santi BéjarJan 24, 2012
  9. Junio C HamanoJan 24, 2012
  10. Neal GroothuisJan 24, 2012
  11. Santi BéjarJan 24, 2012
  12. Neal GroothuisJan 25, 2012
  13. Junio C HamanoJan 26, 2012
  14. Tay Ray ChuanJan 22, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.