Describe gina#command#stash#show
  Before all
    let Path = vital#gina#import('System.Filepath')
    let slit1 = Slit(tempname(), 1)
    call slit1.write('A/foo.txt', [])
    call slit1.write('B/foo.txt', [])
    call slit1.write('C/foo.txt', [])

    call slit1.execute('add %s', slit1.path('A/foo.txt'))
    call slit1.execute('commit -m First')
    call slit1.execute('add %s', slit1.path('B/foo.txt'))
    call slit1.execute('stash')
    call slit1.execute('add %s', slit1.path('C/foo.txt'))
    call slit1.execute('stash')
  End

  After all
    %bwipeout!
  End

  Before
    %bwipeout!
    execute 'edit' fnameescape(Path.join(slit1.worktree, 'A', 'foo.txt'))
  End

  Describe Use cases
    It might be called without arguments
      GinaSync stash show
      Assert Equals(winnr('$'), 1)
      Assert Equals(bufname('%'), printf('gina://%s:stash:show/stash@{0}', slit1.refname))
      Assert Match(getline(1), '0	0	C/foo.txt')
      Assert Equals(line('$'), 1)
    End

    It might be called with stash rev
      GinaSync stash show stash@{1}
      Assert Equals(winnr('$'), 1)
      Assert Equals(bufname('%'), printf('gina://%s:stash:show/stash@{1}', slit1.refname))
      Assert Match(getline(1), '0	0	B/foo.txt')
      Assert Equals(line('$'), 1)
    End
  End
End
