Skip to content
  • Ramkumar Ramachandra's avatar
    stash: introduce 'git stash store' · bd514cad
    Ramkumar Ramachandra authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    save_stash() contains the logic for doing two potentially independent
    operations; the first is preparing the stash merge commit, and the
    second is updating the stash ref/ reflog accordingly.  While the first
    operation is abstracted out into a create_stash() for callers to access
    via 'git stash create', the second one is not.  Fix this by factoring
    out the logic for storing the stash into a store_stash() that callers
    can access via 'git stash store'.
    
    Like create, store is not intended for end user interactive use, but for
    callers in other scripts.  We can simplify the logic in the
    rebase.autostash feature using this new subcommand.
    
    Signed-off-by: default avatarRamkumar Ramachandra <artagnon@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    bd514cad