Skip to content
  • Thomas Rast's avatar
    Implement 'git stash save --patch' · dda1f2a5
    Thomas Rast authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    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: default avatarThomas Rast <trast@student.ethz.ch>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    dda1f2a5