X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-checkout.sh;h=36308d22c6a72b9ad53ced60bd3c70a2e17520b6;hb=d5a6aafc90a14382120727e4e81ee1a380e8b194;hp=4cf30e2c0529e90886e6edfd485cec67a278e224;hpb=5e80092f7e6db09a40a62e837ca3f74f0bc5ad73;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)