git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stefan Beller <sbeller@google.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: git <git@vger.kernel.org>
Subject: Re: [PATCH/RFC] Color merge conflicts
Date: Mon, 30 Jul 2018 10:40:20 -0700	[thread overview]
Message-ID: <CAGZ79kYnfJXRiLnx8oq9mZYrzfBa-79URn+j4QtsFu3d07Jyog@mail.gmail.com> (raw)
In-Reply-To: <20180730155950.17329-1-pclouds@gmail.com>

On Mon, Jul 30, 2018 at 9:00 AM Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
>
> One of the things I notice when watching a normal git user face a
> merge conflicts is the output is very verbose (especially when there
> are multiple conflicts) and it's hard to spot the important parts to
> start resolving conflicts unless you know what to look for.

I usually go by git-status, but I am not the watched normal user,
hopefully. Maybe we want to run git-status after a failed merge
for the user, too, though?

> This is the start to hopefully help that a bit. One thing I'm not sure
> is what to color because that affects the config keys we use for
> this. If we have to color different things, it's best to go
> "color.merge.<slot>" but if this is the only place to color, that slot
> thing looks over-engineered.
>
> Perhaps another piece to color is the conflicted path? Maybe. But on
> the other hand, I don't think we want a chameleon output, just enough
> visual cues to go from one conflict to the next...

I would think we would want to highlight the type of conflict as well,
e.g.

  <RED> CONFLICT> <RESET> \
  <BOLD;RED> (rename/rename): <RESET> \
  Rename a -> b in branch foo \
  rename a ->c in bar

but then again, this patch is better than not doing any colors.

I wonder if we want to have certain colors associated with certain
types of merge conflicts, e.g. anything involving a rename would
be yellow, any conflict with deletion to be dark red, regular merge
conflicts blue (and at the same time we could introduce coloring
of conflict markers to also be blue)
(I am just making up colors, not seriously suggesting them)

I like the idea!

Thanks,
Stefan

  reply	other threads:[~2018-07-30 17:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-30 15:59 [PATCH/RFC] Color merge conflicts Nguyễn Thái Ngọc Duy
2018-07-30 17:40 ` Stefan Beller [this message]
2018-07-31 16:09   ` 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGZ79kYnfJXRiLnx8oq9mZYrzfBa-79URn+j4QtsFu3d07Jyog@mail.gmail.com \
    --to=sbeller@google.com \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/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).