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

Re: Possible BUG: git stash -m picks branch name from submodule

From
AAAlex Arques <alexander.arques@piabgroup.com>
Date
Apr 30, 2025, 14:05 UTC
Message-ID
<GVYP280MB02088CB5884078D16260E61D93832@GVYP280MB0208.SWEP280.PROD.OUTLOOK.COM>
I also encountered this today on “git version 2.49.0.windows.1” in a repository with two submodules, both which are set up to track “master”.

Whenever I do “git stash push” with a message on the main repository my stash message seems to be prepended with “On master: “. This only works correctly if I omit the “-m” or “—message” part of “git stash push”.

git stash with no arguments outputs this: Saved working directory and index state WIP on <current branch>

While git stash -m “[…]” outputs this: Saved working directory and index state On master: […]

Which is not what I want because “git stash list” now gives me confusing output. It seems like I have encountered the same bug? <current branch> on the main repository is NOT “master”.

Message 1 of 1 in “Re: Possible BUG: git stash -m picks branch name from submodule”
  1. Alex ArquesApr 30, 2025

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.