From: Clemens Buchacher <drizzd@aon.at>
To: git@vger.kernel.org
Cc: Miklos Vajna <vmiklos@frugalware.org>,
Michael Johnson <redbeard@mdjohnson.us>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Clemens Buchacher <drizzd@aon.at>
Subject: [PATCH 3/3] simplify output of conflicting merge
Date: Sun, 5 Apr 2009 02:47:00 +0200 [thread overview]
Message-ID: <1238892420-721-4-git-send-email-drizzd@aon.at> (raw)
In-Reply-To: <1238892420-721-3-git-send-email-drizzd@aon.at>
This simplifies the code without changing the semantics and removes
the unhelpful "needs $sha1" part of the conflicting submodule message.
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
---
merge-recursive.c | 17 ++++-------------
1 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/merge-recursive.c b/merge-recursive.c
index f1b120b..d6f0582 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -1116,22 +1116,13 @@ static int process_entry(struct merge_options *o,
o->branch1, o->branch2);
clean_merge = mfi.clean;
- if (mfi.clean)
- update_file(o, 1, mfi.sha, mfi.mode, path);
- else if (S_ISGITLINK(mfi.mode)) {
- output(o, 1, "CONFLICT (submodule): Merge conflict in %s "
- "- needs %s", path, sha1_to_hex(b.sha1));
- update_file(o, 0, mfi.sha, mfi.mode, path);
- } else {
+ if (!mfi.clean) {
+ if (S_ISGITLINK(mfi.mode))
+ reason = "submodule";
output(o, 1, "CONFLICT (%s): Merge conflict in %s",
reason, path);
-
- if (o->call_depth)
- update_file(o, 0, mfi.sha, mfi.mode, path);
- else
- update_file_flags(o, mfi.sha, mfi.mode, path,
- 0 /* update_cache */, 1 /* update_working_directory */);
}
+ update_file(o, mfi.clean, mfi.sha, mfi.mode, path);
} else if (!o_sha && !a_sha && !b_sha) {
/*
* this entry was deleted altogether. a_mode == 0 means
--
1.6.2.1
next prev parent reply other threads:[~2009-04-05 0:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-28 16:19 Segfault on merge with 1.6.2.1 Michael Johnson
2009-03-29 12:17 ` Miklos Vajna
2009-03-30 2:39 ` Michael Johnson
2009-03-30 7:48 ` Johannes Schindelin
2009-03-30 11:03 ` Miklos Vajna
2009-03-31 7:14 ` Michael Johnson
2009-04-01 5:43 ` Michael Johnson
2009-04-01 9:50 ` Miklos Vajna
2009-04-01 18:06 ` Clemens Buchacher
2009-04-02 0:33 ` Michael Johnson
2009-04-05 0:46 ` Clemens Buchacher
2009-04-05 0:46 ` [PATCH 1/3] add tests for merging with submodules Clemens Buchacher
2009-04-05 0:46 ` [PATCH 2/3] update cache for conflicting submodule entries Clemens Buchacher
2009-04-05 0:47 ` Clemens Buchacher [this message]
2009-04-05 9:47 ` [PATCH 3/3] simplify output of conflicting merge Junio C Hamano
2009-04-05 11:50 ` Segfault on merge with 1.6.2.1 Johannes Schindelin
2009-04-06 2:29 ` Michael Johnson
2009-04-06 6:41 ` Clemens Buchacher
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=1238892420-721-4-git-send-email-drizzd@aon.at \
--to=drizzd@aon.at \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=redbeard@mdjohnson.us \
--cc=vmiklos@frugalware.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).