This project is mirrored from https://github.com/git/git. Updated .
  1. 30 Apr, 2014 1 commit
  2. 01 Jan, 2012 1 commit
    • Jonathon Mah's avatar
      stash: Don't fail if work dir contains file named 'HEAD' · 44df2e29
      Jonathon Mah authored
      When performing a plain "git stash" (without --patch), git-diff would fail
      with "fatal: ambiguous argument 'HEAD': both revision and filename". The
      output was piped into git-update-index, masking the failed exit status.
      The output is now sent to a temporary file (which is cleaned up by
      existing code), and the exit status is checked. The "HEAD" arg to the
      git-diff invocation has been disambiguated too, of course.
      
      In patch mode, "git stash -p" would fail harmlessly, leaving the working
      dir untouched. Interactive adding is fine, but the resulting tree was
      diffed with an ambiguous 'HEAD' argument.
      
      Use >foo (no space) when redirecting output.
      
      In t3904, checks and operations on each file are in the order they'll
      appear when interactively staging.
      
      In t3905, fix a bug in "stash save --include-untracked -q is quiet": The
      redirected stdout file was considered untracked, and so was removed from
      the working directory. Use test path helper functions where appropriate.
      Signed-off-by: default avatarJonathon Mah <[email protected]>
      Acked-by: default avatarThomas Rast <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      44df2e29
  3. 27 Aug, 2011 3 commits
  4. 26 Jun, 2011 1 commit
    • David Caldwell's avatar
      stash: Add --include-untracked option to stash and remove all untracked files · 78751302
      David Caldwell authored
      The --include-untracked option acts like the normal "git stash save" but
      also adds all untracked files in the working directory to the stash and then
      calls "git clean --force --quiet" to restore the working directory to a
      pristine state.
      
      This is useful for projects that need to run release scripts. With this
      option, the release scripts can be from the main working directory so one
      does not have to maintain a "clean" directory in parallel just for
      releasing. Basically the work-flow becomes:
      
         $ git tag release-1.0
         $ git stash --include-untracked
         $ make release
         $ git clean -f
         $ git stash pop
      
      "git stash" alone is not enough in this case--it leaves untracked files
      lying around that might mess up a release process that expects everything to
      be very clean or might let a release succeed that should actually fail (due
      to a new source file being created that hasn't been committed yet).
      Signed-off-by: default avatarDavid Caldwell <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      78751302