Skip to content
  • Jon Seymour's avatar
    detached-stash: simplify stash_drop · 92e39e44
    Jon Seymour authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    Previously, git stash drop would fail noisily while executing git reflog
    delete if the specified revision was not a stash reference.
    
    Now, git stash drop fails with an error message which more precisely
    indicates the reason for failure.
    
    Furthermore, git stash drop will now fail with a non-zero status code
    if stash@{n} specifies a stash log entry that does not actually exist.
    
    This change in behaviour is achieved by delegating argument parsing
    to the common parse_flags_and_rev() function (via a call to
    assert_stash_ref).
    
    Signed-off-by: default avatarJon Seymour <jon.seymour@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    92e39e44