Skip to content
  • Aaron M Watson's avatar
    stash: allow stashes to be referenced by index only · a56c8f5a
    Aaron M Watson authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    Instead of referencing "stash@{n}" explicitly, make it possible to
    simply reference as "n".  Most users only reference stashes by their
    position in the stash stack (what I refer to as the "index" here).
    
    The syntax for the typical stash (stash@{n}) is slightly annoying and
    easy to forget, and sometimes difficult to escape properly in a
    script. Because of this the capability to do things with the stash by
    simply referencing the index is desirable.
    
    This patch includes the superior implementation provided by Øsse Walle
    (thanks for that), with a slight change to fix a broken test in the test
    suite. I also merged the test scripts as suggested by Jeff King, and
    un-wrapped the documentation as suggested by Junio Hamano.
    
    Signed-off-by: default avatarAaron M Watson <watsona4@gmail.com>
    Reviewed-by: default avatarJeff King <peff@peff.net>
    a56c8f5a