DanielleSucher/dotfiles — pull request #1 by eapache (2014-12-12 22:46:34+00:00)
Title: shamend: pass -a to git and default to HEAD

Two changes I made to git-shamend that I found useful:
- recognize and pass on '-a' flag to git so you don't (necessarily) have to
stage your changes if you just want to shamend everything
- if no rev is passed, default to HEAD and just use git's --amend --no-edit
flags rather than doing the stash/commit/rebase/unstash dance

Motivation: I have 'cm' aliased to shamend and I found it silly that I was now
doing more typing to amend HEAD than I was to amend some further-back commit.

Recognized short-comings:
- I suck at shell and was lazy, so the option parsing is horribly hard-coded
- I didn't add an -h flag (see: lazy) so there's no longer any help output

The short-comings are fixable with a little work, but the current version works
well enough for me and I figured I'd check for interest/acceptability before I
did the work of cleaning it up.