git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Chris Torek via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Chris Torek <chris.torek@gmail.com>
Subject: Re: [PATCH v2] git-mv: improve error message for conflicted file
Date: Mon, 20 Jul 2020 11:28:20 -0700	[thread overview]
Message-ID: <xmqqh7u29h2z.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <pull.678.v2.git.1595225873014.gitgitgadget@gmail.com> (Chris Torek via GitGitGadget's message of "Mon, 20 Jul 2020 06:17:52 +0000")

"Chris Torek via GitGitGadget" <gitgitgadget@gmail.com> writes:

>     I put in the shortened "conflicted" here but did not shorten the
>     existing "not under version control" message (to minimize the visible
>     and translations-required changes).

It does not matter all that much but the message in your original
for the new case looked better and worse at the same time ;-)

"not under version control" is a statement of fact that does not
hint what the user may want to do with that information.  Your
original for the new case gave that hint (i.e. "must resolve first")
but the new "the path is unmerged" (I think 'unmerged' is a more
proper term for this than 'conflicted'; see gitglossary[7]) stops at
stating fact without giving further hint,and in that sense the
messages are consistent with each other.

We could shoot for consistency in the opposite direction, by making
"not under version control" could instead say "must add first".  But
that leads to a fruitless comparison between "'git add' then 'git
mv'" and "plain 'mv' then 'git add'".  For "git mv", "must resolve
first" may be the only sane option right now, so it probably is OK.

So, after having thought the above through, I tend to (slightly)
prefer to stop at stating fact, perhaps "the path is unmerged" or
something to match "not under version control".

>     I like the idea of renaming all stages and keeping them at their current
>     stages, but that's too much for this patch.

I totally agree, and I am not 100% convinced that the "rename all at
their current stage" gives a better end-user experience.  For one
thing, I suspect that it would still have to fail depending on how
the destination path and paths that conflict with it are populated
in the index, and that may make even harder-to-explain error case.

>     I'll be traveling next week and not sure if I will get to any followups
>     for a while.

That is perfectly fine.  We are in pre-release freeze and this patch
won't go anywhere until the end of the month.

Thanks for contributing, and safe travels.

      reply	other threads:[~2020-07-20 18:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17 23:24 [PATCH] git-mv: improve error message for conflicted file Chris Torek via GitGitGadget
2020-07-17 23:47 ` Eric Sunshine
2020-07-18  1:35   ` Chris Torek
2020-07-18  6:55     ` Eric Sunshine
2020-07-18  0:07 ` Junio C Hamano
2020-07-18  2:00   ` Elijah Newren
2020-07-18 17:46     ` Junio C Hamano
2020-07-19  1:48       ` Elijah Newren
2020-07-19  6:16         ` Junio C Hamano
2020-07-20  6:17 ` [PATCH v2] " Chris Torek via GitGitGadget
2020-07-20 18:28   ` Junio C Hamano [this message]

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=xmqqh7u29h2z.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=chris.torek@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@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).