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: debuggingI found it to be on the bugfix_bar correctly as intended.
-Jayatheerth