author | Thomas Rast <trast@student.ethz.ch> | |
Thu, 13 Aug 2009 12:29:44 +0000 (14:29 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 15 Aug 2009 22:19:31 +0000 (15:19 -0700) | ||
commit | dda1f2a5c3aca5072aada32eef159067ba16f0e9 | |
tree | 02fc359424824fd005e183044e2bc2a9d14df930 | tree | snapshot |
parent | 4f353658b9c15e9188530fac5ae79d0aa1538e85 | commit | diff |
Implement 'git stash save --patch'
This adds a hunk-based mode to git-stash. You can select hunks from
the difference between HEAD and worktree, and git-stash will build a
stash that reflects these changes. The index state of the stash is
the same as your current index, and we also let --patch imply
--keep-index.
Note that because the selected hunks are rolled back from the worktree
but not the index, the resulting state may appear somewhat confusing
if you had also staged these changes. This is not entirely
satisfactory, but due to the way stashes are applied, other solutions
would require a change to the stash format.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This adds a hunk-based mode to git-stash. You can select hunks from
the difference between HEAD and worktree, and git-stash will build a
stash that reflects these changes. The index state of the stash is
the same as your current index, and we also let --patch imply
--keep-index.
Note that because the selected hunks are rolled back from the worktree
but not the index, the resulting state may appear somewhat confusing
if you had also staged these changes. This is not entirely
satisfactory, but due to the way stashes are applied, other solutions
would require a change to the stash format.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-stash.txt | diff | blob | history | |
git-add--interactive.perl | diff | blob | history | |
git-stash.sh | diff | blob | history | |
t/t3904-stash-patch.sh | [new file with mode: 0755] | blob |