1. Randy Stauner
  2. run_control

Commits

Randy Stauner  committed e3fd3a4

Only do git stash if status was successful

avoid stashing on non-git dirs

  • Participants
  • Parent commits 4b6ed14
  • Branches master

Comments (0)

Files changed (1)

File scripts/git_config.sh

View file
  • Ignore whitespace
 # run daemon (use !git to run from repo root) then try git ls-remote
 $gc alias.serve           $'!git daemon --reuseaddr --verbose  --base-path=. --export-all ./.git'
 
-$gc alias.st              $'!_() { if [ $# -gt 0 ]; then git status "$@"; else git status; git stash list | sed -re "s/^([^:]+):/\\\033[33m\\1\\\033[00m:/"; fi; }; _'
+$gc alias.st              $'!_() { if [ $# -gt 0 ]; then git status "$@"; else git status && git stash list | sed -re "s/^([^:]+):/\\\033[33m\\1\\\033[00m:/"; fi; }; _'
 $gc alias.s               $'status -s -b -u'
 $gc alias.tag-summary     $'!_() { git show --summary ${1:-`git last-tag`}; }; _'