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

'git stash push -- {dir}' puts files in stash that are outside of {dir}

From
YYuri <yuri@tsoft.com>
Date
Jul 26, 2023, 17:05 UTC
Message-ID
<5fce9c4f-0ea7-9393-4a30-ddd66946661d@tsoft.com>
I am in the FreeBSD ports repository.
I run this command:
$ git stash push -m "gh-print-tuple" -- Mk
But then 'git show' shows that the top stash entry also has other files:
$ git stash show -p stash@{0} | grep diff
diff --git a/Mk/Scripts/print-submodule-gh_tuple.awk 
b/Mk/Scripts/print-submodule-gh_tuple.awk
diff --git a/Mk/Scripts/print-submodule-gh_tuple.sh 
b/Mk/Scripts/print-submodule-gh_tuple.sh
diff --git a/Mk/bsd.sites.mk b/Mk/bsd.sites.mk
diff --git a/audio/triceratops-lv2/files/patch-synth.cpp 
b/audio/triceratops-lv2/files/patch-synth.cpp
diff --git a/cad/scotch/distinfo b/cad/scotch/distinfo
diff --git 
a/cad/scotch/files/patch-Make.inc_Makefile.inc.i686__pc__freebsd 
b/cad/scotch/files/patch-Make.inc_Makefile.inc.i686__pc__freebsd
diff --git 
a/cad/scotch/files/patch-Make.inc_Makefile.inc.x86-64__pc__freebsd 
b/cad/scotch/files/patch-Make.inc_Makefile.inc.x86-64__pc__freebsd
diff --git a/x11/darktile/Makefile b/x11/darktile/Makefile
diff --git a/x11/darktile/distinfo b/x11/darktile/distinfo
diff --git 
a/x11/darktile/files/patch-vendor_github.com_kr_pty_ztypes__freebsd__arm64.go 
b/x11/darktile/files/patch-vendor_github.com_kr_pty_ztypes__freebsd__arm64.go
diff --git 
a/x11/darktile/files/patch-vendor_github.com_riywo_loginshell_loginshell.go 
b/x11/darktile/files/patch-vendor_github.com_riywo_loginshell_loginshell.go
diff --git a/x11/darktile/pkg-descr b/x11/darktile/pkg-descr


Why do files that are not under Mk get into stash?



Thanks,

Yuri
Next: Junio C Hamano
Message 1 of 4 in “'git stash push -- {dir}' puts files in stash that are outside of {dir}”
  1. YuriJul 26, 2023
  2. Junio C HamanoJul 26, 2023
  3. YuriJul 26, 2023
  4. Junio C HamanoJul 26, 2023

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.