git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Nathan W. Panike <nathan.panike@gmail.com>
Date
Jan 26, 2009, 16:43 UTC
Message-ID
<1232988212-8613-1-git-send-email-nathan.panike@gmail.com>

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 <nathan.panike@gmail.com>
---
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
Next: Sverre Rabbelier
Message 1 of 2 in “Allow format-patch to create patches for merges”
  1. Allow format-patch to create patches for mergesNathan W. Panike, Jan 26, 2009
  2. Sverre RabbelierJan 26, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.