summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-10-11 13:44:03 -0700
committerJunio C Hamano <gitster@pobox.com>2023-10-11 16:27:30 -0700
commitd9b6634589d5c59b49fd2fc41953469173a40ff5 (patch)
tree969536ef180a7f91e32f6264836bdba6e075fd4c /builtin/commit.c
parent0d1bd1dfb37ef25e1911777c94129fc769ffec38 (diff)
stash: be careful what we store
"git stash store" is meant to store what "git stash create" produces, as these two are implementation details of the end-user facing "git stash save" command. Even though it is clearly documented as such, users would try silly things like "git stash store HEAD" to render their stash unusable. Worse yet, because "git stash drop" does not allow such a stash entry to be removed, "git stash clear" would be the only way to recover from such a mishap. Reuse the logic that allows "drop" to refrain from working on such a stash entry to teach "store" to avoid storing an object that is not a stash entry in the first place. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions