X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-checkout.sh;h=36308d22c6a72b9ad53ced60bd3c70a2e17520b6;hb=e99fcf96deab45ca81b22948328deb2d8586aa8d;hp=9509ab4b9a53fd132ae74de241c3f60744b6162c;hpb=9c20a4706767e6003e62f6500ed94ccddcbe322f;p=git.git diff --git a/git-checkout.sh b/git-checkout.sh index 9509ab4b..36308d22 100755 --- a/git-checkout.sh +++ b/git-checkout.sh @@ -1,9 +1,7 @@ #!/bin/sh -. git-sh-setup || die "Not a git archive" -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)