{"thread":{"id":"38162","subject":"[PATCH 0/2] Fix a bug with update-ref \"verify\" and no oldvalue","startedAt":"2014-12-10T23:47:50Z","lastAt":"2014-12-11T16:19:46Z","messageCount":7,"participants":["Michael Haggerty","Stefan Beller","Brad King"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"253548","messageId":"1418255272-5875-1-git-send-email-mhagger@alum.mit.edu","threadId":"38162","inReplyTo":null,"subject":"[PATCH 0/2] Fix a bug with update-ref \"verify\" and no oldvalue","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2014-12-10T23:47:50Z","receivedAt":"2014-12-10T23:47:50Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"Ever since the --stdin option was added to \"git update-ref\" in\n\n    c750ba9519 update-ref: support multiple simultaneous updates (2013-09-09)\n\nthe \"verify\" command has been broken. If no <oldvalue> is specified,\nthe documentation says that the \"verify\" command will verify that the\nreference doesn't currently exist. But in fact, it unconditionally\n*deletes* the reference (!)\n\nHopefully this is not a common usage idiom, but this is nonetheless a\nserious bug.\n\nAdd some tests for this and related functionality, then fix the bug.\n\nThese patches are also available from my GitHub repository [1] as\nbranch \"update-ref-verify-fix-v1\".\n\nThis fix applies to \"maint\", for which I think it is appropriate. It\nalso merges through to \"master\" with no conflicts, though it conflicts\ntrivially with \"pu\".\n\n[1] https://github.com/mhagger/git\n\nMichael Haggerty (2):\n  t1400: add some more tests of \"update-ref --stdin\"'s verify command\n  update-ref: fix \"verify\" command with missing <oldvalue>\n\n builtin/update-ref.c  | 14 +++-----\n t/t1400-update-ref.sh | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 97 insertions(+), 9 deletions(-)\n\n-- \n2.1.3\n"},{"id":"253550","messageId":"1418255272-5875-2-git-send-email-mhagger@alum.mit.edu","threadId":"38162","inReplyTo":"1418255272-5875-1-git-send-email-mhagger@alum.mit.edu","subject":"[PATCH 1/2] t1400: add some more tests of \"update-ref --stdin\"'s verify command","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2014-12-10T23:47:51Z","receivedAt":"2014-12-10T23:47:51Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"Two of the tests fail because\n\n    verify refs/heads/foo\n\nwith no argument (not even zeros) actually *deletes* refs/heads/foo.\nThis problem will be fixed in the next commit.\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\nThe two failing tests have to restore the $m reference when they're\ndone because otherwise the bug deletes it, causing subsequent tests\nto fail.\n\n t/t1400-update-ref.sh | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 92 insertions(+)\n\ndiff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh\nindex 7b4707b..6a3cdd1 100755\n--- a/t/t1400-update-ref.sh\n+++ b/t/t1400-update-ref.sh\n@@ -619,6 +619,52 @@ test_expect_success 'stdin update/create/verify combination works' '\n \ttest_must_fail git rev-parse --verify -q $c\n '\n \n+test_expect_success 'stdin verify succeeds for correct value' '\n+\tgit rev-parse $m >expect &&\n+\techo \"verify $m $m\" >stdin &&\n+\tgit update-ref --stdin <stdin &&\n+\tgit rev-parse $m >actual &&\n+\ttest_cmp expect actual\n+'\n+\n+test_expect_success 'stdin verify succeeds for missing reference' '\n+\techo \"verify refs/heads/missing $Z\" >stdin &&\n+\tgit update-ref --stdin <stdin &&\n+\ttest_must_fail git rev-parse --verify -q refs/heads/missing\n+'\n+\n+test_expect_success 'stdin verify treats no value as missing' '\n+\techo \"verify refs/heads/missing\" >stdin &&\n+\tgit update-ref --stdin <stdin &&\n+\ttest_must_fail git rev-parse --verify -q refs/heads/missing\n+'\n+\n+test_expect_success 'stdin verify fails for wrong value' '\n+\tgit rev-parse $m >expect &&\n+\techo \"verify $m $m~1\" >stdin &&\n+\ttest_must_fail git update-ref --stdin <stdin &&\n+\tgit rev-parse $m >actual &&\n+\ttest_cmp expect actual\n+'\n+\n+test_expect_success 'stdin verify fails for mistaken null value' '\n+\tgit rev-parse $m >expect &&\n+\techo \"verify $m $Z\" >stdin &&\n+\ttest_must_fail git update-ref --stdin <stdin &&\n+\tgit rev-parse $m >actual &&\n+\ttest_cmp expect actual\n+'\n+\n+test_expect_failure 'stdin verify fails for mistaken empty value' '\n+\tM=$(git rev-parse $m) &&\n+\ttest_when_finished \"git update-ref $m $M\" &&\n+\tgit rev-parse $m >expect &&\n+\techo \"verify $m\" >stdin &&\n+\ttest_must_fail git update-ref --stdin <stdin &&\n+\tgit rev-parse $m >actual &&\n+\ttest_cmp expect actual\n+'\n+\n test_expect_success 'stdin update refs works with identity updates' '\n \tcat >stdin <<-EOF &&\n \tupdate $a $m $m\n@@ -938,6 +984,52 @@ test_expect_success 'stdin -z update/create/verify combination works' '\n \ttest_must_fail git rev-parse --verify -q $c\n '\n \n+test_expect_success 'stdin -z verify succeeds for correct value' '\n+\tgit rev-parse $m >expect &&\n+\tprintf $F \"verify $m\" \"$m\" >stdin &&\n+\tgit update-ref -z --stdin <stdin &&\n+\tgit rev-parse $m >actual &&\n+\ttest_cmp expect actual\n+'\n+\n+test_expect_success 'stdin -z verify succeeds for missing reference' '\n+\tprintf $F \"verify refs/heads/missing\" \"$Z\" >stdin &&\n+\tgit update-ref -z --stdin <stdin &&\n+\ttest_must_fail git rev-parse --verify -q refs/heads/missing\n+'\n+\n+test_expect_success 'stdin -z verify treats no value as missing' '\n+\tprintf $F \"verify refs/heads/missing\" \"\" >stdin &&\n+\tgit update-ref -z --stdin <stdin &&\n+\ttest_must_fail git rev-parse --verify -q refs/heads/missing\n+'\n+\n+test_expect_success 'stdin -z verify fails for wrong value' '\n+\tgit rev-parse $m >expect &&\n+\tprintf $F \"verify $m\" \"$m~1\" >stdin &&\n+\ttest_must_fail git update-ref -z --stdin <stdin &&\n+\tgit rev-parse $m >actual &&\n+\ttest_cmp expect actual\n+'\n+\n+test_expect_success 'stdin -z verify fails for mistaken null value' '\n+\tgit rev-parse $m >expect &&\n+\tprintf $F \"verify $m\" \"$Z\" >stdin &&\n+\ttest_must_fail git update-ref -z --stdin <stdin &&\n+\tgit rev-parse $m >actual &&\n+\ttest_cmp expect actual\n+'\n+\n+test_expect_failure 'stdin -z verify fails for mistaken empty value' '\n+\tM=$(git rev-parse $m) &&\n+\ttest_when_finished \"git update-ref $m $M\" &&\n+\tgit rev-parse $m >expect &&\n+\tprintf $F \"verify $m\" \"\" >stdin &&\n+\ttest_must_fail git update-ref -z --stdin <stdin &&\n+\tgit rev-parse $m >actual &&\n+\ttest_cmp expect actual\n+'\n+\n test_expect_success 'stdin -z update refs works with identity updates' '\n \tprintf $F \"update $a\" \"$m\" \"$m\" \"update $b\" \"$m\" \"$m\" \"update $c\" \"$Z\" \"\" >stdin &&\n \tgit update-ref -z --stdin <stdin &&\n-- \n2.1.3\n"},{"id":"253549","messageId":"1418255272-5875-3-git-send-email-mhagger@alum.mit.edu","threadId":"38162","inReplyTo":"1418255272-5875-1-git-send-email-mhagger@alum.mit.edu","subject":"[PATCH 2/2] update-ref: fix \"verify\" command with missing <oldvalue>","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2014-12-10T23:47:52Z","receivedAt":"2014-12-10T23:47:52Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"If \"git update-ref --stdin\" was given a \"verify\" command with no\n\"<newvalue>\" at all (not even zeros), the code was mistakenly setting\nhave_old=0 (and leaving old_sha1 uninitialized). But this is\nincorrect: this command is supposed to verify that the reference\ndoesn't exist. So in this case we really need old_sha1 to be set to\nnull_sha1 and have_old to be set to 1.\n\nMoreover, since have_old was being set to zero, *no* check of the old\nvalue was being done, so the new value of the reference was being set\nunconditionally to the value in new_sha1. new_sha1, in turn, was set\nto null_sha1 in the expectation that that was the old value and it\nshouldn't be changed. But because the precondition was not being\nchecked, the result was that the reference was being deleted\nunconditionally.\n\nSo, if <oldvalue> is missing, set have_old unconditionally and set\nold_sha1 to null_sha1.\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n builtin/update-ref.c  | 14 +++++---------\n t/t1400-update-ref.sh |  4 ++--\n 2 files changed, 7 insertions(+), 11 deletions(-)\n\ndiff --git a/builtin/update-ref.c b/builtin/update-ref.c\nindex 6c9be05..1993529 100644\n--- a/builtin/update-ref.c\n+++ b/builtin/update-ref.c\n@@ -282,26 +282,22 @@ static const char *parse_cmd_verify(struct ref_transaction *transaction,\n \tchar *refname;\n \tunsigned char new_sha1[20];\n \tunsigned char old_sha1[20];\n-\tint have_old;\n \n \trefname = parse_refname(input, &next);\n \tif (!refname)\n \t\tdie(\"verify: missing <ref>\");\n \n \tif (parse_next_sha1(input, &next, old_sha1, \"verify\", refname,\n-\t\t\t    PARSE_SHA1_OLD)) {\n-\t\thashclr(new_sha1);\n-\t\thave_old = 0;\n-\t} else {\n-\t\thashcpy(new_sha1, old_sha1);\n-\t\thave_old = 1;\n-\t}\n+\t\t\t    PARSE_SHA1_OLD))\n+\t\thashclr(old_sha1);\n+\n+\thashcpy(new_sha1, old_sha1);\n \n \tif (*next != line_termination)\n \t\tdie(\"verify %s: extra input: %s\", refname, next);\n \n \tif (ref_transaction_update(transaction, refname, new_sha1, old_sha1,\n-\t\t\t\t   update_flags, have_old, msg, &err))\n+\t\t\t\t   update_flags, 1, msg, &err))\n \t\tdie(\"%s\", err.buf);\n \n \tupdate_flags = 0;\ndiff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh\nindex 6a3cdd1..6805b9e 100755\n--- a/t/t1400-update-ref.sh\n+++ b/t/t1400-update-ref.sh\n@@ -655,7 +655,7 @@ test_expect_success 'stdin verify fails for mistaken null value' '\n \ttest_cmp expect actual\n '\n \n-test_expect_failure 'stdin verify fails for mistaken empty value' '\n+test_expect_success 'stdin verify fails for mistaken empty value' '\n \tM=$(git rev-parse $m) &&\n \ttest_when_finished \"git update-ref $m $M\" &&\n \tgit rev-parse $m >expect &&\n@@ -1020,7 +1020,7 @@ test_expect_success 'stdin -z verify fails for mistaken null value' '\n \ttest_cmp expect actual\n '\n \n-test_expect_failure 'stdin -z verify fails for mistaken empty value' '\n+test_expect_success 'stdin -z verify fails for mistaken empty value' '\n \tM=$(git rev-parse $m) &&\n \ttest_when_finished \"git update-ref $m $M\" &&\n \tgit rev-parse $m >expect &&\n-- \n2.1.3\n"},{"id":"253552","messageId":"20141211001054.GA14446@google.com","threadId":"38162","inReplyTo":"1418255272-5875-2-git-send-email-mhagger@alum.mit.edu","subject":"Re: [PATCH 1/2] t1400: add some more tests of \"update-ref --stdin\"'s verify command","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2014-12-11T00:10:54Z","receivedAt":"2014-12-11T00:10:54Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Thu, Dec 11, 2014 at 12:47:51AM +0100, Michael Haggerty wrote:\n> Two of the tests fail because\n> \n>     verify refs/heads/foo\n> \n> with no argument (not even zeros) actually *deletes* refs/heads/foo.\n> This problem will be fixed in the next commit.\n> \n> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n> ---\n\nReviewed-By: Stefan Beller <sbeller@google.com>\n\n> The two failing tests have to restore the $m reference when they're\n> done because otherwise the bug deletes it, causing subsequent tests\n> to fail.\n> \n>  t/t1400-update-ref.sh | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++\n>  1 file changed, 92 insertions(+)\n> \n> diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh\n> index 7b4707b..6a3cdd1 100755\n> --- a/t/t1400-update-ref.sh\n> +++ b/t/t1400-update-ref.sh\n> @@ -619,6 +619,52 @@ test_expect_success 'stdin update/create/verify combination works' '\n>  \ttest_must_fail git rev-parse --verify -q $c\n>  '\n>  \n> +test_expect_success 'stdin verify succeeds for correct value' '\n> +\tgit rev-parse $m >expect &&\n> +\techo \"verify $m $m\" >stdin &&\n> +\tgit update-ref --stdin <stdin &&\n> +\tgit rev-parse $m >actual &&\n> +\ttest_cmp expect actual\n> +'\n> +\n> +test_expect_success 'stdin verify succeeds for missing reference' '\n> +\techo \"verify refs/heads/missing $Z\" >stdin &&\n> +\tgit update-ref --stdin <stdin &&\n> +\ttest_must_fail git rev-parse --verify -q refs/heads/missing\n> +'\n> +\n> +test_expect_success 'stdin verify treats no value as missing' '\n> +\techo \"verify refs/heads/missing\" >stdin &&\n> +\tgit update-ref --stdin <stdin &&\n> +\ttest_must_fail git rev-parse --verify -q refs/heads/missing\n> +'\n> +\n> +test_expect_success 'stdin verify fails for wrong value' '\n> +\tgit rev-parse $m >expect &&\n> +\techo \"verify $m $m~1\" >stdin &&\n> +\ttest_must_fail git update-ref --stdin <stdin &&\n> +\tgit rev-parse $m >actual &&\n> +\ttest_cmp expect actual\n> +'\n> +\n> +test_expect_success 'stdin verify fails for mistaken null value' '\n> +\tgit rev-parse $m >expect &&\n> +\techo \"verify $m $Z\" >stdin &&\n> +\ttest_must_fail git update-ref --stdin <stdin &&\n> +\tgit rev-parse $m >actual &&\n> +\ttest_cmp expect actual\n> +'\n> +\n> +test_expect_failure 'stdin verify fails for mistaken empty value' '\n> +\tM=$(git rev-parse $m) &&\n> +\ttest_when_finished \"git update-ref $m $M\" &&\n> +\tgit rev-parse $m >expect &&\n> +\techo \"verify $m\" >stdin &&\n> +\ttest_must_fail git update-ref --stdin <stdin &&\n> +\tgit rev-parse $m >actual &&\n> +\ttest_cmp expect actual\n> +'\n> +\n>  test_expect_success 'stdin update refs works with identity updates' '\n>  \tcat >stdin <<-EOF &&\n>  \tupdate $a $m $m\n> @@ -938,6 +984,52 @@ test_expect_success 'stdin -z update/create/verify combination works' '\n>  \ttest_must_fail git rev-parse --verify -q $c\n>  '\n>  \n> +test_expect_success 'stdin -z verify succeeds for correct value' '\n> +\tgit rev-parse $m >expect &&\n> +\tprintf $F \"verify $m\" \"$m\" >stdin &&\n> +\tgit update-ref -z --stdin <stdin &&\n> +\tgit rev-parse $m >actual &&\n> +\ttest_cmp expect actual\n> +'\n> +\n> +test_expect_success 'stdin -z verify succeeds for missing reference' '\n> +\tprintf $F \"verify refs/heads/missing\" \"$Z\" >stdin &&\n> +\tgit update-ref -z --stdin <stdin &&\n> +\ttest_must_fail git rev-parse --verify -q refs/heads/missing\n> +'\n> +\n> +test_expect_success 'stdin -z verify treats no value as missing' '\n> +\tprintf $F \"verify refs/heads/missing\" \"\" >stdin &&\n> +\tgit update-ref -z --stdin <stdin &&\n> +\ttest_must_fail git rev-parse --verify -q refs/heads/missing\n> +'\n> +\n> +test_expect_success 'stdin -z verify fails for wrong value' '\n> +\tgit rev-parse $m >expect &&\n> +\tprintf $F \"verify $m\" \"$m~1\" >stdin &&\n> +\ttest_must_fail git update-ref -z --stdin <stdin &&\n> +\tgit rev-parse $m >actual &&\n> +\ttest_cmp expect actual\n> +'\n> +\n> +test_expect_success 'stdin -z verify fails for mistaken null value' '\n> +\tgit rev-parse $m >expect &&\n> +\tprintf $F \"verify $m\" \"$Z\" >stdin &&\n> +\ttest_must_fail git update-ref -z --stdin <stdin &&\n> +\tgit rev-parse $m >actual &&\n> +\ttest_cmp expect actual\n> +'\n> +\n> +test_expect_failure 'stdin -z verify fails for mistaken empty value' '\n> +\tM=$(git rev-parse $m) &&\n> +\ttest_when_finished \"git update-ref $m $M\" &&\n> +\tgit rev-parse $m >expect &&\n> +\tprintf $F \"verify $m\" \"\" >stdin &&\n> +\ttest_must_fail git update-ref -z --stdin <stdin &&\n> +\tgit rev-parse $m >actual &&\n> +\ttest_cmp expect actual\n> +'\n> +\n>  test_expect_success 'stdin -z update refs works with identity updates' '\n>  \tprintf $F \"update $a\" \"$m\" \"$m\" \"update $b\" \"$m\" \"$m\" \"update $c\" \"$Z\" \"\" >stdin &&\n>  \tgit update-ref -z --stdin <stdin &&\n> -- \n> 2.1.3\n> \n"},{"id":"253554","messageId":"20141211002153.GB14446@google.com","threadId":"38162","inReplyTo":"1418255272-5875-3-git-send-email-mhagger@alum.mit.edu","subject":"Re: [PATCH 2/2] update-ref: fix \"verify\" command with missing <oldvalue>","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2014-12-11T00:21:53Z","receivedAt":"2014-12-11T00:21:53Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Thu, Dec 11, 2014 at 12:47:52AM +0100, Michael Haggerty wrote:\n> If \"git update-ref --stdin\" was given a \"verify\" command with no\n> \"<newvalue>\" at all (not even zeros), the code was mistakenly setting\n> have_old=0 (and leaving old_sha1 uninitialized). But this is\n> incorrect: this command is supposed to verify that the reference\n> doesn't exist. So in this case we really need old_sha1 to be set to\n> null_sha1 and have_old to be set to 1.\n> \n> Moreover, since have_old was being set to zero, *no* check of the old\n> value was being done, so the new value of the reference was being set\n> unconditionally to the value in new_sha1. new_sha1, in turn, was set\n> to null_sha1 in the expectation that that was the old value and it\n> shouldn't be changed. But because the precondition was not being\n> checked, the result was that the reference was being deleted\n> unconditionally.\n> \n> So, if <oldvalue> is missing, set have_old unconditionally and set\n> old_sha1 to null_sha1.\n> \n> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n\nThis is reviewed by me as well.\nReviewed-by: Stefan Beller <sbeller@google.com>\n\n> ---\n>  builtin/update-ref.c  | 14 +++++---------\n>  t/t1400-update-ref.sh |  4 ++--\n>  2 files changed, 7 insertions(+), 11 deletions(-)\n> \n> diff --git a/builtin/update-ref.c b/builtin/update-ref.c\n> index 6c9be05..1993529 100644\n> --- a/builtin/update-ref.c\n> +++ b/builtin/update-ref.c\n> @@ -282,26 +282,22 @@ static const char *parse_cmd_verify(struct ref_transaction *transaction,\n>  \tchar *refname;\n>  \tunsigned char new_sha1[20];\n>  \tunsigned char old_sha1[20];\n> -\tint have_old;\n>  \n>  \trefname = parse_refname(input, &next);\n>  \tif (!refname)\n>  \t\tdie(\"verify: missing <ref>\");\n>  \n>  \tif (parse_next_sha1(input, &next, old_sha1, \"verify\", refname,\n> -\t\t\t    PARSE_SHA1_OLD)) {\n> -\t\thashclr(new_sha1);\n> -\t\thave_old = 0;\n> -\t} else {\n> -\t\thashcpy(new_sha1, old_sha1);\n> -\t\thave_old = 1;\n> -\t}\n> +\t\t\t    PARSE_SHA1_OLD))\n> +\t\thashclr(old_sha1);\n> +\n> +\thashcpy(new_sha1, old_sha1);\n>  \n>  \tif (*next != line_termination)\n>  \t\tdie(\"verify %s: extra input: %s\", refname, next);\n>  \n>  \tif (ref_transaction_update(transaction, refname, new_sha1, old_sha1,\n> -\t\t\t\t   update_flags, have_old, msg, &err))\n> +\t\t\t\t   update_flags, 1, msg, &err))\n>  \t\tdie(\"%s\", err.buf);\n>  \n>  \tupdate_flags = 0;\n> diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh\n> index 6a3cdd1..6805b9e 100755\n> --- a/t/t1400-update-ref.sh\n> +++ b/t/t1400-update-ref.sh\n> @@ -655,7 +655,7 @@ test_expect_success 'stdin verify fails for mistaken null value' '\n>  \ttest_cmp expect actual\n>  '\n>  \n> -test_expect_failure 'stdin verify fails for mistaken empty value' '\n> +test_expect_success 'stdin verify fails for mistaken empty value' '\n>  \tM=$(git rev-parse $m) &&\n>  \ttest_when_finished \"git update-ref $m $M\" &&\n>  \tgit rev-parse $m >expect &&\n> @@ -1020,7 +1020,7 @@ test_expect_success 'stdin -z verify fails for mistaken null value' '\n>  \ttest_cmp expect actual\n>  '\n>  \n> -test_expect_failure 'stdin -z verify fails for mistaken empty value' '\n> +test_expect_success 'stdin -z verify fails for mistaken empty value' '\n>  \tM=$(git rev-parse $m) &&\n>  \ttest_when_finished \"git update-ref $m $M\" &&\n>  \tgit rev-parse $m >expect &&\n> -- \n> 2.1.3\n> \n"},{"id":"253570","messageId":"5489C41D.103@kitware.com","threadId":"38162","inReplyTo":"1418255272-5875-2-git-send-email-mhagger@alum.mit.edu","subject":"Re: [PATCH 1/2] t1400: add some more tests of \"update-ref --stdin\"'s verify command","fromName":"Brad King","fromEmail":"brad.king@kitware.com","sentAt":"2014-12-11T16:19:41Z","receivedAt":"2014-12-11T16:19:41Z","isPatch":true,"sender":{"key":"brad.king@kitware.com","avatar":"https://avatars.githubusercontent.com/u/87268?v=4"},"body":"On 12/10/2014 6:47 PM, Michael Haggerty wrote:\n> Two of the tests fail because\n> \n>     verify refs/heads/foo\n> \n> with no argument (not even zeros) actually *deletes* refs/heads/foo.\n> This problem will be fixed in the next commit.\n\nReviewed-by: Brad King <brad.king@kitware.com>\n\n-Brad\n"},{"id":"253571","messageId":"5489C422.9000104@kitware.com","threadId":"38162","inReplyTo":"1418255272-5875-3-git-send-email-mhagger@alum.mit.edu","subject":"Re: [PATCH 2/2] update-ref: fix \"verify\" command with missing <oldvalue>","fromName":"Brad King","fromEmail":"brad.king@kitware.com","sentAt":"2014-12-11T16:19:46Z","receivedAt":"2014-12-11T16:19:46Z","isPatch":true,"sender":{"key":"brad.king@kitware.com","avatar":"https://avatars.githubusercontent.com/u/87268?v=4"},"body":"On 12/10/2014 6:47 PM, Michael Haggerty wrote:\n> set have_old unconditionally and set old_sha1 to null_sha1.\n\nReviewed-by: Brad King <brad.king@kitware.com>\n\n-Brad\n"}]}