From: Jeff King <peff@peff.net>
To: git@vger.kernel.org
Subject: [PATCH] error_resolve_conflict: rewrap advice message
Date: Tue, 3 Jun 2014 03:17:17 -0400 [thread overview]
Message-ID: <20140603071717.GA32038@sigill.intra.peff.net> (raw)
If you try to commit with unresolved conflicts in the index,
you get this message:
$ git commit
U foo
error: 'commit' is not possible because you have unmerged files.
hint: Fix them up in the work tree,
hint: and then use 'git add/rm <file>' as
hint: appropriate to mark resolution and make a commit,
hint: or use 'git commit -a'.
fatal: Exiting because of an unresolved conflict.
The irregular line-wrapping makes this awkward to read, and
it takes up more lines than necessary. Instead, let's rewrap
it to about 60 characters per line:
$ git commit
U foo
error: 'commit' is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit, or use
hint: 'git commit -a'.
fatal: Exiting because of an unresolved conflict.
Signed-off-by: Jeff King <peff@peff.net>
---
This always bugs me when I see it, so I thought I'd finally do something
about it. I left the wording alone, though I'd also be happy to see it
shortened to just advise "git add/rm" and not mention "git commit -a" at
all.
advice.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/advice.c b/advice.c
index 486f823..ef24733 100644
--- a/advice.c
+++ b/advice.c
@@ -82,10 +82,9 @@ int error_resolve_conflict(const char *me)
* Message used both when 'git commit' fails and when
* other commands doing a merge do.
*/
- advise(_("Fix them up in the work tree,\n"
- "and then use 'git add/rm <file>' as\n"
- "appropriate to mark resolution and make a commit,\n"
- "or use 'git commit -a'."));
+ advise(_("Fix them up in the work tree, and then use 'git add/rm <file>'\n"
+ "as appropriate to mark resolution and make a commit, or use\n"
+ "'git commit -a'."));
return -1;
}
--
2.0.0.rc1.436.g03cb729
next reply other threads:[~2014-06-03 7:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-03 7:17 Jeff King [this message]
2014-06-03 7:23 ` [PATCH] error_resolve_conflict: drop quotations around operation Jeff King
2014-06-03 17:02 ` Junio C Hamano
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=20140603071717.GA32038@sigill.intra.peff.net \
--to=peff@peff.net \
--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).