git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Commit dates on conflict markers
@ 2023-09-11 21:02 Roger Light
  2023-09-11 23:31 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Roger Light @ 2023-09-11 21:02 UTC (permalink / raw)
  To: git

Hello,

When I carry out a merge with conflicts, it's not always clear when
resolving the conflicts which is the correct part of code to use. I
sometimes use git blame to guide me as to the age of the different
chunks of code and hence what to choose.

I was wondering if there might be a way to help include that sort of
information directly into the conflict.

If you had a single line conflict it would be straightforward to
display by including the date the line was last modified alongside the
conflict marker:

<<<<<<< HEAD date:yesterday
print("please")
======= date:10 years ago
print("help")
>>>>>>> main

With a more realistic change with multiple lines and context from
different commits, it's not immediately obvious to me that it's
possible to do in a way that isn't completely horrible.

I am in no way a git expert though, so I thought I'd ask and see what
you thought.

Regards,

Roger

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

end of thread, other threads:[~2023-09-12 14:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-11 21:02 Commit dates on conflict markers Roger Light
2023-09-11 23:31 ` Junio C Hamano
2023-09-12  8:57   ` Jeff King
2023-09-12 14:33   ` Elijah Newren

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 NNTP newsgroup(s).