X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=git-checkout.sh;h=36308d22c6a72b9ad53ced60bd3c70a2e17520b6;hb=c97451ce0985e7fc6515cde84a9ad527727b69ea;hp=4cf30e2c0529e90886e6edfd485cec67a278e224;hpb=ae2b0f15180d4b044828c836bcab6a990efa5c8e;p=git.git diff --git a/git-checkout.sh b/git-checkout.sh index 4cf30e2c..36308d22 100755 --- a/git-checkout.sh +++ b/git-checkout.sh @@ -1,9 +1,7 @@ #!/bin/sh -. git-sh-setup -usage () { - die "usage: git checkout [-f] [-b ] [] [...]" -} +USAGE='[-f] [-b ] [] [...]' +. git-sh-setup old=$(git-rev-parse HEAD) new= @@ -118,7 +116,7 @@ else fi # -# Switch the HEAD pointer to the new branch if it we +# Switch the HEAD pointer to the new branch if we # checked out a branch head, and remove any potential # old MERGE_HEAD's (subsequent commits will clearly not # be based on them, since we re-set the index)