From: Roger Light <roger@atchoo.org>
To: git@vger.kernel.org
Subject: Commit dates on conflict markers
Date: Mon, 11 Sep 2023 22:02:47 +0100 [thread overview]
Message-ID: <CAH7zdydYgSf+21GB70=gRhEcupv4e1ix==7LWCeQYgpD-1Rcmw@mail.gmail.com> (raw)
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
next reply other threads:[~2023-09-11 21:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-11 21:02 Roger Light [this message]
2023-09-11 23:31 ` Commit dates on conflict markers Junio C Hamano
2023-09-12 8:57 ` Jeff King
2023-09-12 14:33 ` Elijah Newren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAH7zdydYgSf+21GB70=gRhEcupv4e1ix==7LWCeQYgpD-1Rcmw@mail.gmail.com' \
--to=roger@atchoo.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).