[PATCH v2] Allow format-patch to create patches for merges

Subsystems: the rest

DORMANTno replies

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

[PATCH v2] Allow format-patch to create patches for merges

From: Nathan W. Panike <hidden>
Date: 2016-06-15 22:46:02

The behavior for git format-patch is to ignore merge commits, producing an
empty patch.  The code does not allow the user to change this behavior. This
patch changes that behavior by allowing the user to specify -c or -m at the
command line to produce a patch for a merge commit.

Signed-off-by: Nathan W. Panike <redacted>
---
Add Sign off.

This seems to solve my problem, but maybe my workflow is sufficiently different
that it is a problem no one else has. Maybe someone can point me in a direction
that solves problems more users have.

Thanks,

Nathan Panike
 builtin-log.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/builtin-log.c b/builtin-log.c
index 2ae39af..ea4729d 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -994,10 +994,6 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
 			continue;
 		}
 
-		/* ignore merges */
-		if (commit->parents && commit->parents->next)
-			continue;
-
 		if (ignore_if_in_upstream &&
 				has_commit_patch_id(commit, &ids))
 			continue;
-- 
1.6.1.1.GIT

Re: [PATCH v2] Allow format-patch to create patches for merges

From: Sverre Rabbelier <hidden>
Date: 2016-06-15 22:46:02

On Mon, Jan 26, 2009 at 17:43, Nathan W. Panike [off-list ref] wrote:
This seems to solve my problem, but maybe my workflow is sufficiently different
that it is a problem no one else has. Maybe someone can point me in a direction
that solves problems more users have.
It seems like you want to use bundles instead of patches? Since you're
using it just to propagate your changes...?

-- 
Cheers,

Sverre Rabbelier
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help