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

[PATCH] add -e: ignore dirty submodules

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 7, 2012, 04:05 UTC
Message-ID
<alpine.DEB.1.00.1202070504340.24259@s15462909.onlinehome-server.info>
We cannot add untracked/modified files in submodules anyway.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
	This patch is actually from Oct 23, 2010.
 builtin/add.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/builtin/add.c b/builtin/add.c
index 1c42900..b79336d 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -280,6 +280,7 @@ static int edit_patch(int argc, const char **argv, const char *prefix)
 
 	argc = setup_revisions(argc, argv, &rev, NULL);
 	rev.diffopt.output_format = DIFF_FORMAT_PATCH;
+	DIFF_OPT_SET(&rev.diffopt, IGNORE_DIRTY_SUBMODULES);
 	out = open(file, O_CREAT | O_WRONLY, 0644);
 	if (out < 0)
 		die (_("Could not open '%s' for writing."), file);
-- 
1.7.9.msysgit.0.27.ge92cd
Next: Junio C Hamano
Message 1 of 5 in “add -e: ignore dirty submodules”
  1. add -e: ignore dirty submodulesJohannes Schindelin, Feb 7, 2012
  2. Junio C HamanoFeb 7, 2012
  3. Johannes SchindelinFeb 7, 2012
  4. Junio C HamanoFeb 7, 2012
  5. Jens LehmannFeb 7, 2012

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.