{"thread":{"id":"27313","subject":"[PATCH] lock_any_ref_for_update(): clarify switch case statement","startedAt":"2011-05-10T11:48:01Z","lastAt":"2011-05-10T20:07:49Z","messageCount":2,"participants":["Michael Schubert","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"167594","messageId":"4DC925F1.4060307@elegosoft.com","threadId":"27313","inReplyTo":null,"subject":"[PATCH] lock_any_ref_for_update(): clarify switch case statement","fromName":"Michael Schubert","fromEmail":"mschub@elegosoft.com","sentAt":"2011-05-10T11:48:01Z","receivedAt":"2011-05-10T11:48:01Z","isPatch":true,"sender":{"key":"mschub@elegosoft.com","avatar":null},"body":"\nWrite CHECK_REF_FORMAT_OK instead of '0' to be more verbose.\n\nSigned-off-by: Michael Schubert <mschub@elegosoft.com>\n---\n refs.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/refs.c b/refs.c\nindex e3c0511..67d6bbd 100644\n--- a/refs.c\n+++ b/refs.c\n@@ -1092,7 +1092,7 @@ struct ref_lock *lock_any_ref_for_update(const char *ref, const unsigned char *o\n \tswitch (check_ref_format(ref)) {\n \tdefault:\n \t\treturn NULL;\n-\tcase 0:\n+\tcase CHECK_REF_FORMAT_OK:\n \tcase CHECK_REF_FORMAT_ONELEVEL:\n \t\treturn lock_ref_sha1_basic(ref, old_sha1, flags, NULL);\n \t}\n-- \n1.7.5.1\n"},{"id":"167619","messageId":"7vliyeiaju.fsf@alter.siamese.dyndns.org","threadId":"27313","inReplyTo":"4DC925F1.4060307@elegosoft.com","subject":"Re: [PATCH] lock_any_ref_for_update(): clarify switch case statement","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-05-10T20:07:49Z","receivedAt":"2011-05-10T20:07:49Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael Schubert <mschub@elegosoft.com> writes:\n\n> Write CHECK_REF_FORMAT_OK instead of '0' to be more verbose.\n\nIt is not wrong per-se to spell it out to be more descriptive, but I would\nthink 0 is clear enough that there is no error.\n\nIn any case, being verbose is never a goal ;-).\n"}]}