Re: [PATCH 1/2] merge-recursive: point the user to commit when file would be overwritten.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthieu Moy <Matthieu.Moy@xxxxxxx> writes:

> The commit-before-pull is well accepted in the DVCS community, but is
> confusing some new users. This should get them back in the right way when
> the problem occurs.
>
> Signed-off-by: Matthieu Moy <Matthieu.Moy@xxxxxxx>

Don't these extra lines warrant "advice.*" option?

> ---
>  merge-recursive.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/merge-recursive.c b/merge-recursive.c
> index f55b7eb..d5e0819 100644
> --- a/merge-recursive.c
> +++ b/merge-recursive.c
> @@ -172,9 +172,11 @@ static int git_merge_trees(int index_only,
>  	struct unpack_trees_options opts;
>  	static const struct unpack_trees_error_msgs msgs = {
>  		/* would_overwrite */
> -		"Your local changes to '%s' would be overwritten by merge.  Aborting.",
> +		"Your local changes to '%s' would be overwritten by merge.  Aborting:\n"
> +		"Please, commit your changes or stash them before you can merge.",
>  		/* not_uptodate_file */
> -		"Your local changes to '%s' would be overwritten by merge.  Aborting.",
> +		"Your local changes to '%s' would be overwritten by merge.  Aborting:\n"
> +		"Please, commit your changes or stash them before you can merge.",
>  		/* not_uptodate_dir */
>  		"Updating '%s' would lose untracked files in it.  Aborting.",
>  		/* would_lose_untracked */
> -- 
> 1.6.5.3.435.g5f2e3.dirty
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]