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

Re: [PATCH v1 1/2] Ignore dirty submodule states during stash

From
Vasily Titskiy <qehgt0@gmail.com>
Date
May 17, 2016, 03:40 UTC
Message-ID
<20160517034008.GB2782@gmail.com>
In-Reply-To
<20160517033632.GA2782@gmail.com>

As stash does not know how to deal with submodules, it should not try to save/restore their states as it leads to redundant merge conflicts.

Signed-off-by: Vasily Titskiy <qehgt0@gmail.com>
---
 git-stash.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-stash.sh b/git-stash.sh
index c7c65e2..b500c44 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -116,7 +116,7 @@ create_stash () {
 			git read-tree --index-output="$TMPindex" -m $i_tree &&
 			GIT_INDEX_FILE="$TMPindex" &&
 			export GIT_INDEX_FILE &&
-			git diff --name-only -z HEAD -- >"$TMP-stagenames" &&
+			git diff --name-only --ignore-submodules -z HEAD -- >"$TMP-stagenames" &&
 			git update-index -z --add --remove --stdin <"$TMP-stagenames" &&
 			git write-tree &&
 			rm -f "$TMPindex"
-- 
2.1.4
Previous: Vasily TitskiyNext: Vasily Titskiy
Message 2 of 4 in “Ignore dirty submodule states during stash”
  1. 0/2 Ignore dirty submodule states during stashVasily Titskiy, May 17, 2016
  2. Vasily TitskiyMay 17, 2016
  3. Vasily TitskiyMay 17, 2016
  4. Eric SunshineMay 17, 2016

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.