summaryrefslogtreecommitdiff
path: root/t/unit-tests
diff options
context:
space:
mode:
authorD. Ben Knoble <ben.knoble+github@gmail.com>2025-09-21 21:39:06 -0400
committerJunio C Hamano <gitster@pobox.com>2025-09-21 20:23:23 -0700
commit9842c0c7492d2858d64ef81128f7b1f0b38e326b (patch)
treefee23eea8f05af177597ca9af2899faf3f3c6b20 /t/unit-tests
parent88b5b8d886b54f5020040a3b3a534f7c102a6293 (diff)
stash: honor stash.index in apply, pop modes
With stash.index=true, git-stash(1) command now tries to reinstate the index by default in the "apply" and "pop" modes. Not doing so creates a common trap [1], [2]: "git stash apply" is not the reverse of "git stash push" because carefully staged indices are lost and have to be manually recreated. OTOH, this mode is not always desirable and may create more conflicts when applying stashes. As usual, "--no-index" will disable this behavior if you set "stash.index". [1]: https://lore.kernel.org/git/CAPx1GvcxyDDQmCssMjEnt6JoV6qPc5ZUpgPLX3mpUC_4PNYA1w@mail.gmail.com/ [2]: https://lore.kernel.org/git/c5a811ac-8cd3-c389-ac6d-29020a648c87@gmail.com/ Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/unit-tests')
0 files changed, 0 insertions, 0 deletions