Skip to content

Commit

Permalink
error_resolve_conflict: rewrap advice message
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
peff authored and gitster committed Jun 3, 2014
1 parent 7bbc4e8 commit c057b24
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions advice.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,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;
}

Expand Down

0 comments on commit c057b24

Please sign in to comment.