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

Re: [PATCH] stash: fix incorrect branch name in stash message

From
JAYATHEERTH K <jayatheerthkulkarni2005@gmail.com>
Date
May 12, 2025, 16:42 UTC
Message-ID
<CA+rGoLfv6E7=TCm99yt4SYsZ1P-QRxD+vMuaHtDWX=ufneiYUA@mail.gmail.com>
In-Reply-To
<20250512164001.62065-1-jayatheerthkulkarni2005@gmail.com>
Changing this I found results to be correct

I think you can use this patch if you want a solution on an immediate basis, testing and merging this into the master usually takes some time.

After testing with similar use case listed above

jayatheerth@fedora:~/Documents/code/test$ # Clean up previous test directories rm -rf ~/Documents/code/test/ui ~/Documents/code/test/sdk mkdir -p ~/Documents/code/test && cd ~/Documents/code/test

# Step 1: Create the submodule repo
mkdir sdk && cd sdk
git init
echo "SDK file" > sdk.txt
git add sdk.txt
git commit -m "Initial commit in SDK"
git stash listk stash messagextsh itbmodule add ../sdk
hint: Using 'master' as the name for the initial branch. This default
branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint:   git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint:   git branch -m <name>
hint:
hint: Disable this message with "git config set advice.defaultBranchName false"
Initialized empty Git repository in
/home/jayatheerth/Documents/code/test/sdk/.git/
[master (root-commit) 033e72f] Initial commit in SDK
 1 file changed, 1 insertion(+)
 create mode 100644 sdk.txt
hint: Using 'master' as the name for the initial branch. This default
branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint:   git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint:   git branch -m <name>
hint:
hint: Disable this message with "git config set advice.defaultBranchName false"
Initialized empty Git repository in
/home/jayatheerth/Documents/code/test/ui/.git/
Cloning into '/home/jayatheerth/Documents/code/test/ui/sdk'...
done.
[master (root-commit) 870c575] Add SDK as submodule
 2 files changed, 4 insertions(+)
 create mode 100644 .gitmodules
 create mode 160000 sdk
Switched to a new branch 'feature_foo'
Switched to a new branch 'feature_sdk_foo'
Switched to a new branch 'bugfix_bar'
Saved working directory and index state On bugfix_bar: debugging
stash@{0}: On bugfix_bar: debugging
I found it to be on the bugfix_bar correctly as intended.
-Jayatheerth
Previous: K JayatheerthNext: Stuart MacDonald
Message 5 of 17 in “[BUG] git stash incorrectly showing submodule branch instead of superproject branch”
  1. Stuart MacDonaldMay 12, 2025
  2. Re [BUG] git stash incorrectly showing submodule branch instead of superproject branchK Jayatheerth, May 12, 2025
  3. Stuart MacDonaldMay 12, 2025
  4. stash: fix incorrect branch name in stash messageK Jayatheerth, May 12, 2025
  5. JAYATHEERTH KMay 12, 2025
  6. Stuart MacDonaldMay 12, 2025
  7. Junio C HamanoMay 12, 2025
  8. Eric SunshineMay 12, 2025
  9. JAYATHEERTH KMay 13, 2025
  10. Junio C HamanoMay 14, 2025
  11. stash: fix incorrect branch name in stash messageK Jayatheerth, Jun 8, 2025
  12. René ScharfeJun 8, 2025
  13. stash: fix incorrect branch name in stash messageK Jayatheerth, Jun 8, 2025
  14. Junio C HamanoJun 8, 2025
  15. JAYATHEERTH KJun 11, 2025
  16. stash: fix incorrect branch name in stash messageK Jayatheerth, Jun 11, 2025
  17. Junio C HamanoJun 11, 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.