author | Junio C Hamano <gitster@pobox.com> | |
Mon, 30 Nov 2009 22:45:08 +0000 (14:45 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 30 Nov 2009 22:45:08 +0000 (14:45 -0800) |
Conflicts:
merge-recursive.c
merge-recursive.c
1 | 2 | |||
---|---|---|---|---|
builtin-merge.c | patch | | diff1 | | diff2 | | blob | history |
merge-recursive.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc builtin-merge.c
Simple merge
diff --cc merge-recursive.c
index a91208f295d00d73b8fc0f5cd6a92ac422d9eeb4,72bfbaf43a26a00aab901c5f30fe76b1a788e3ba..dd4fbd0e6bc22f2e5f5667205b47165f8aebbbd0
--- 1/merge-recursive.c
--- 2/merge-recursive.c
+++ b/merge-recursive.c
return clean_merge;
}
+ struct unpack_trees_error_msgs get_porcelain_error_msgs(void)
+ {
+ struct unpack_trees_error_msgs msgs = {
+ /* would_overwrite */
+ "Your local changes to '%s' would be overwritten by merge. Aborting.",
+ /* not_uptodate_file */
+ "Your local changes to '%s' would be overwritten by merge. Aborting.",
+ /* not_uptodate_dir */
+ "Updating '%s' would lose untracked files in it. Aborting.",
+ /* would_lose_untracked */
+ "Untracked working tree file '%s' would be %s by merge. Aborting",
+ /* bind_overlap -- will not happen here */
+ NULL,
+ };
++ if (advice_commit_before_merge) {
++ msgs.would_overwrite = msgs.not_uptodate_file =
++ "Your local changes to '%s' would be overwritten by merge. Aborting.\n"
++ "Please, commit your changes or stash them before you can merge.";
++ }
+ return msgs;
+ }
+
int merge_trees(struct merge_options *o,
struct tree *head,
struct tree *merge,