{"thread":{"id":"1310","subject":"[PATCH] Audit rev-parse users.","startedAt":"2005-07-23T02:09:05Z","lastAt":"2005-07-23T02:09:05Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"6362","messageId":"7vsly66zpa.fsf@assigned-by-dhcp.cox.net","threadId":"1310","inReplyTo":null,"subject":"[PATCH] Audit rev-parse users.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-07-23T02:09:05Z","receivedAt":"2005-07-23T02:09:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This patch changes rev-parse users that pass a single argument\nthat is supposed to be a rev parameter to use \"--verify\".\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n\n git-checkout-script |    2 +-\n git-cherry          |    8 ++++----\n git-commit-script   |    2 +-\n git-rebase-script   |    8 ++++----\n git-resolve-script  |    4 ++--\n 5 files changed, 12 insertions(+), 12 deletions(-)\n\nf3818c97f985fe20d24fe3d12cca5ce1cfbf8d74\ndiff --git a/git-checkout-script b/git-checkout-script\n--- a/git-checkout-script\n+++ b/git-checkout-script\n@@ -22,7 +22,7 @@ while [ \"$#\" != \"0\" ]; do\n \t\tforce=1\n \t\t;;\n \t*)\n-\t\trev=$(git-rev-parse --verify --revs-only \"$arg^0\") || exit\n+\t\trev=$(git-rev-parse --verify \"$arg^0\") || exit\n \t\tif [ -z \"$rev\" ]; then\n \t\t\techo \"unknown flag $arg\"\n \t\t\texit 1\ndiff --git a/git-cherry b/git-cherry\n--- a/git-cherry\n+++ b/git-cherry\n@@ -28,11 +28,11 @@ The output is intended to be used as:\n '\n \n case \"$#\" in\n-1) linus=`git-rev-parse \"$1\"` &&\n-   junio=`git-rev-parse HEAD` || exit\n+1) linus=`git-rev-parse --verify \"$1\"` &&\n+   junio=`git-rev-parse --verify HEAD` || exit\n    ;;\n-2) linus=`git-rev-parse \"$1\"` &&\n-   junio=`git-rev-parse \"$2\"` || exit\n+2) linus=`git-rev-parse --verify \"$1\"` &&\n+   junio=`git-rev-parse --verify \"$2\"` || exit\n    ;;\n *) echo >&2 \"$usage\"; exit 1 ;;\n esac\ndiff --git a/git-commit-script b/git-commit-script\n--- a/git-commit-script\n+++ b/git-commit-script\n@@ -16,7 +16,7 @@ do\n     -m) shift\n         case \"$#\" in\n \t0) usage ;;\n-\t*) use_commit=`git-rev-parse \"$1\"` ||\n+\t*) use_commit=`git-rev-parse --verify \"$1\"` ||\n \t   exit ;;\n \tesac\n \t;;\ndiff --git a/git-rebase-script b/git-rebase-script\n--- a/git-rebase-script\n+++ b/git-rebase-script\n@@ -11,11 +11,11 @@ upstream tree.'\n : ${GIT_DIR=.git}\n \n case \"$#\" in\n-1) linus=`git-rev-parse \"$1\"` &&\n-   junio=`git-rev-parse HEAD` || exit\n+1) linus=`git-rev-parse --verify \"$1\"` &&\n+   junio=`git-rev-parse --verify HEAD` || exit\n    ;;\n-2) linus=`git-rev-parse \"$1\"` &&\n-   junio=`git-rev-parse \"$2\"` || exit\n+2) linus=`git-rev-parse --verify \"$1\"` &&\n+   junio=`git-rev-parse --verify \"$2\"` || exit\n    ;;\n *) echo >&2 \"$usage\"; exit 1 ;;\n esac\ndiff --git a/git-resolve-script b/git-resolve-script\n--- a/git-resolve-script\n+++ b/git-resolve-script\n@@ -6,8 +6,8 @@\n #\n . git-sh-setup-script || die \"Not a git archive\"\n \n-head=$(git-rev-parse --revs-only \"$1\")\n-merge=$(git-rev-parse --revs-only \"$2\")\n+head=$(git-rev-parse --verify \"$1\")\n+merge=$(git-rev-parse --verify \"$2\")\n merge_msg=\"$3\"\n \n dropheads() {\n"}]}