Git Mailing List Archive mirror
 help / color / mirror / code / Atom feed
* Please explain avoiding history simplifications when diffing merges
@ 2023-09-08  9:09 Magnus Holmgren
  2023-09-15 15:10 ` Magnus Holmgren
  0 siblings, 1 reply; 3+ messages in thread
From: Magnus Holmgren @ 2023-09-08  9:09 UTC (permalink / raw)
  To: git

Hi (and thanks for a great free tool).

QGit was bitten by 
https://github.com/git/git/commit/0dec322d31db3920872f43bdd2a7ddd282a5be67

It looks like passing --simplify-merges to override the default solves the 
problem, but I still want to ask here because I'm not sure I fully understand 
the reasoning:

> the default history simplification would remove merge commits from 
> consideration if the file "path" matched the second parent.

I guess that means that even if there was a difference relative to the first 
parent, which you wanted to see, the merge commit would be omitted if there's 
no diff relative to the second parent? That's fine, and history simplification 
isn't trivial, but now every merge commit ever is included in the commit log 
of an individual file, even if that file was only added somewhere in the 
middle and never changed since. Is that really desirable? Shouldn't it be 
possible to include only merge commits that are not TREESAME to *all* parents?

Thanks,
-- 
Magnus Holmgren
./¯\_/¯\. Milient
(also holmgren@debian.org)



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Please explain avoiding history simplifications when diffing merges
  2023-09-08  9:09 Please explain avoiding history simplifications when diffing merges Magnus Holmgren
@ 2023-09-15 15:10 ` Magnus Holmgren
  2023-09-17  9:58   ` Bagas Sanjaya
  0 siblings, 1 reply; 3+ messages in thread
From: Magnus Holmgren @ 2023-09-15 15:10 UTC (permalink / raw)
  To: git

Friday, 8 September 2023 11:09:20 CEST, I wrote
> QGit was bitten by
> https://github.com/git/git/commit/0dec322d31db3920872f43bdd2a7ddd282a5be67

Maybe I should link to the QGit issue:
https://github.com/tibirna/qgit/issues/129

> It looks like passing --simplify-merges to override the default solves the
> problem, but I still want to ask here because I'm not sure I fully
> understand
> the reasoning:
> > the default history simplification would remove merge commits from
> > consideration if the file "path" matched the second parent.

As I wrote at the above URL, I realized that the old git log output without --
simplify-merges and the output with --simplify-merges aren't quite the same. 
The old output indeed omits some interesting merge commits, which may explain 
why the change was made, but git log --simplify-merges does include them, so 
it seems a reasonable default to me.

However, QGit has a problem: git log --diff-merges=separate includes a 
separate diff for each parent, but only for each parent with differences 
compared to the merge commit, *and* there's no custom format placeholder for 
the current parent, only for the list of parents (%P/%p). How should one go 
about adding that? I figure the format_commit_context struct in pretty.c needs 
another field.

-- 
Magnus Holmgren
./¯\_/¯\. Milient




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Please explain avoiding history simplifications when diffing merges
  2023-09-15 15:10 ` Magnus Holmgren
@ 2023-09-17  9:58   ` Bagas Sanjaya
  0 siblings, 0 replies; 3+ messages in thread
From: Bagas Sanjaya @ 2023-09-17  9:58 UTC (permalink / raw)
  To: Magnus Holmgren, git
  Cc: Santi Béjar, Junio C Hamano, Sergey Organov,
	Christian Couder, Jeff King, René Scharfe

[-- Attachment #1: Type: text/plain, Size: 1616 bytes --]

On Fri, Sep 15, 2023 at 05:10:28PM +0200, Magnus Holmgren wrote:
> Friday, 8 September 2023 11:09:20 CEST, I wrote
> > QGit was bitten by
> > https://github.com/git/git/commit/0dec322d31db3920872f43bdd2a7ddd282a5be67
> 
> Maybe I should link to the QGit issue:
> https://github.com/tibirna/qgit/issues/129
> 
> > It looks like passing --simplify-merges to override the default solves the
> > problem, but I still want to ask here because I'm not sure I fully
> > understand
> > the reasoning:
> > > the default history simplification would remove merge commits from
> > > consideration if the file "path" matched the second parent.
> 
> As I wrote at the above URL, I realized that the old git log output without --
> simplify-merges and the output with --simplify-merges aren't quite the same. 
> The old output indeed omits some interesting merge commits, which may explain 
> why the change was made, but git log --simplify-merges does include them, so 
> it seems a reasonable default to me.

Can you provide examples?

> 
> However, QGit has a problem: git log --diff-merges=separate includes a 
> separate diff for each parent, but only for each parent with differences 
> compared to the merge commit, *and* there's no custom format placeholder for 
> the current parent, only for the list of parents (%P/%p). How should one go 
> about adding that? I figure the format_commit_context struct in pretty.c needs 
> another field.

What are you trying to accomplish with your proposed formatting verbs?

Confused...

-- 
An old man doll... just what I always wanted! - Clara

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-17  9:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-08  9:09 Please explain avoiding history simplifications when diffing merges Magnus Holmgren
2023-09-15 15:10 ` Magnus Holmgren
2023-09-17  9:58   ` Bagas Sanjaya

Code repositories for project(s) associated with this public inbox

	https://80x24.org/pub/scm/git/git.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).