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

'git stash push -m "label" -- dir' saves into stash changes outside dir

From
YYuri <yuri@rawbw.com>
Date
Jun 18, 2022, 06:22 UTC
Message-ID
<a41e809c-4d91-cfc4-a512-77173f920d38@tsoft.com>
I am working in the FreeBSD ports repository.
The Mk directory has some changes and additions.
Other directories outside of Mk also have some additions.
The command I ran is:
 > git stash push -m "x" -- Mk/
It is supposed to create a stash entry with only changes under Mk.
However, 'git stash show -p stash@{0}' shows changes outside of Mk as well.

Changes under Mk went into stash and disappeared from the directory. Changes outside of Mk (wrongfully) also went into stash and remained in the directory.

IMO, this is a bug in git-2.35.1
FreeBSD 13.1
Yuri
Message 1 of 1 in “'git stash push -m "label" -- dir' saves into stash changes outside dir”
  1. YuriJun 18, 2022

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.