{"thread":{"id":"38012","subject":"[PATCH 0/2] Breaking the ref-transactions-reflog series in smaller parts","startedAt":"2014-11-19T21:40:22Z","lastAt":"2014-11-20T18:18:32Z","messageCount":14,"participants":["Stefan Beller","Jonathan Nieder","Michael Haggerty","Jeff King","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"252212","messageId":"1416433224-29763-1-git-send-email-sbeller@google.com","threadId":"38012","inReplyTo":null,"subject":"[PATCH 0/2] Breaking the ref-transactions-reflog series in smaller parts","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2014-11-19T21:40:22Z","receivedAt":"2014-11-19T21:40:22Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"Hi,\n\nso I think the patch series ref-transactions-reflog[1] sent previously to the list\nis still too large for easy review and I want to break it up more.\nSo in this series we'll digest only 2 small patches, which do not seem to be \ncontroversial (yet;) and seem to be useful no matter how the discussion on\nthe other series continues.\n\nref_transaction_create as well as ref_transaction_delete are just special cases\nof ref_transaction_update, so let's reduce some redundant code. While this doesn't\nchange code in pathes, which are supposed to be run, we do have slight changes \nin error messages starting with \"BUG: \". So in the best case, the user will never\nsee these messages at all.\n\nThanks,\nStefan\n\n[1] http://thread.gmane.org/gmane.comp.version-control.git/259712\n\nRonnie Sahlberg (2):\n  refs.c: make ref_transaction_create a wrapper for\n    ref_transaction_update\n  refs.c: make ref_transaction_delete a wrapper for\n    ref_transaction_update\n\n refs.c | 49 ++++---------------------------------------------\n refs.h |  2 +-\n 2 files changed, 5 insertions(+), 46 deletions(-)\n\n-- \n2.2.0.rc2.13.g0786cdb\n"},{"id":"252213","messageId":"1416433224-29763-2-git-send-email-sbeller@google.com","threadId":"38012","inReplyTo":"1416433224-29763-1-git-send-email-sbeller@google.com","subject":"[PATCH 1/2] refs.c: make ref_transaction_create a wrapper for ref_transaction_update","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2014-11-19T21:40:23Z","receivedAt":"2014-11-19T21:40:23Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"From: Ronnie Sahlberg <sahlberg@google.com>\n\nThe ref_transaction_update function can already be used to create refs by\npassing null_sha1 as the old_sha1 parameter. Simplify by replacing\ntransaction_create with a thin wrapper.\n\nSigned-off-by: Ronnie Sahlberg <sahlberg@google.com>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Stefan Beller <sbeller@google.com>\n---\n\n The same as sent 2 days before as part of the ref-transactions-reflog series\n http://thread.gmane.org/gmane.comp.version-control.git/259712\n \n no changes since then.\n \n refs.c | 27 ++-------------------------\n 1 file changed, 2 insertions(+), 25 deletions(-)\n\ndiff --git a/refs.c b/refs.c\nindex 5ff457e..005eb18 100644\n--- a/refs.c\n+++ b/refs.c\n@@ -3623,31 +3623,8 @@ int ref_transaction_create(struct ref_transaction *transaction,\n \t\t\t   int flags, const char *msg,\n \t\t\t   struct strbuf *err)\n {\n-\tstruct ref_update *update;\n-\n-\tassert(err);\n-\n-\tif (transaction->state != REF_TRANSACTION_OPEN)\n-\t\tdie(\"BUG: create called for transaction that is not open\");\n-\n-\tif (!new_sha1 || is_null_sha1(new_sha1))\n-\t\tdie(\"BUG: create ref with null new_sha1\");\n-\n-\tif (check_refname_format(refname, REFNAME_ALLOW_ONELEVEL)) {\n-\t\tstrbuf_addf(err, \"refusing to create ref with bad name %s\",\n-\t\t\t    refname);\n-\t\treturn -1;\n-\t}\n-\n-\tupdate = add_update(transaction, refname);\n-\n-\thashcpy(update->new_sha1, new_sha1);\n-\thashclr(update->old_sha1);\n-\tupdate->flags = flags;\n-\tupdate->have_old = 1;\n-\tif (msg)\n-\t\tupdate->msg = xstrdup(msg);\n-\treturn 0;\n+\treturn ref_transaction_update(transaction, refname, new_sha1,\n+\t\t\t\t      null_sha1, flags, 1, msg, err);\n }\n \n int ref_transaction_delete(struct ref_transaction *transaction,\n-- \n2.2.0.rc2.13.g0786cdb\n"},{"id":"252214","messageId":"1416433224-29763-3-git-send-email-sbeller@google.com","threadId":"38012","inReplyTo":"1416433224-29763-1-git-send-email-sbeller@google.com","subject":"[PATCH 2/2] refs.c: make ref_transaction_delete a wrapper for ref_transaction_update","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2014-11-19T21:40:24Z","receivedAt":"2014-11-19T21:40:24Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"From: Ronnie Sahlberg <sahlberg@google.com>\n\nSigned-off-by: Ronnie Sahlberg <sahlberg@google.com>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Stefan Beller <sbeller@google.com>\n---\n\n The same as sent 2 days before as part of the ref-transactions-reflog series\n http://thread.gmane.org/gmane.comp.version-control.git/259712\n \n no changes since then.\n\n refs.c | 22 ++--------------------\n refs.h |  2 +-\n 2 files changed, 3 insertions(+), 21 deletions(-)\n\ndiff --git a/refs.c b/refs.c\nindex 005eb18..05cb299 100644\n--- a/refs.c\n+++ b/refs.c\n@@ -3633,26 +3633,8 @@ int ref_transaction_delete(struct ref_transaction *transaction,\n \t\t\t   int flags, int have_old, const char *msg,\n \t\t\t   struct strbuf *err)\n {\n-\tstruct ref_update *update;\n-\n-\tassert(err);\n-\n-\tif (transaction->state != REF_TRANSACTION_OPEN)\n-\t\tdie(\"BUG: delete called for transaction that is not open\");\n-\n-\tif (have_old && !old_sha1)\n-\t\tdie(\"BUG: have_old is true but old_sha1 is NULL\");\n-\n-\tupdate = add_update(transaction, refname);\n-\tupdate->flags = flags;\n-\tupdate->have_old = have_old;\n-\tif (have_old) {\n-\t\tassert(!is_null_sha1(old_sha1));\n-\t\thashcpy(update->old_sha1, old_sha1);\n-\t}\n-\tif (msg)\n-\t\tupdate->msg = xstrdup(msg);\n-\treturn 0;\n+\treturn ref_transaction_update(transaction, refname, null_sha1,\n+\t\t\t\t      old_sha1, flags, have_old, msg, err);\n }\n \n int update_ref(const char *action, const char *refname,\ndiff --git a/refs.h b/refs.h\nindex 2bc3556..7d675b7 100644\n--- a/refs.h\n+++ b/refs.h\n@@ -283,7 +283,7 @@ struct ref_transaction *ref_transaction_begin(struct strbuf *err);\n \n /*\n  * Add a reference update to transaction.  new_sha1 is the value that\n- * the reference should have after the update, or zeros if it should\n+ * the reference should have after the update, or null_sha1 if it should\n  * be deleted.  If have_old is true, then old_sha1 holds the value\n  * that the reference should have had before the update, or zeros if\n  * it must not have existed beforehand.\n-- \n2.2.0.rc2.13.g0786cdb\n"},{"id":"252229","messageId":"20141120011038.GB6527@google.com","threadId":"38012","inReplyTo":"1416433224-29763-2-git-send-email-sbeller@google.com","subject":"Re: [PATCH 1/2] refs.c: make ref_transaction_create a wrapper for ref_transaction_update","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2014-11-20T01:10:39Z","receivedAt":"2014-11-20T01:10:39Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Stefan Beller wrote:\n\n> From: Ronnie Sahlberg <sahlberg@google.com>\n>\n> The ref_transaction_update function can already be used to create refs by\n> passing null_sha1 as the old_sha1 parameter. Simplify by replacing\n> transaction_create with a thin wrapper.\n>\n> Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>\n> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>\n> Signed-off-by: Stefan Beller <sbeller@google.com>\n> ---\n>  refs.c | 27 ++-------------------------\n>  1 file changed, 2 insertions(+), 25 deletions(-)\n\nI feel a bit ashamed to have my sign-off peppering all these patches\nthat I didn't have anything to do with except preparing to send them\nto the list once or twice.  I'd be happier if my sign-off weren't\nthere.\n\nExcept for that,\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n"},{"id":"252230","messageId":"20141120011136.GC6527@google.com","threadId":"38012","inReplyTo":"1416433224-29763-3-git-send-email-sbeller@google.com","subject":"Re: [PATCH 2/2] refs.c: make ref_transaction_delete a wrapper for ref_transaction_update","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2014-11-20T01:11:36Z","receivedAt":"2014-11-20T01:11:36Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Stefan Beller wrote:\n\n>  refs.c | 22 ++--------------------\n>  refs.h |  2 +-\n>  2 files changed, 3 insertions(+), 21 deletions(-)\n\nLikewise:\n\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n\nbut this shouldn't have had my sign-off.\n"},{"id":"252231","messageId":"CAGZ79kaW3xGjepcXFZYYUTuDqbEixVA4rH-FMcG0hyEoCVqizQ@mail.gmail.com","threadId":"38012","inReplyTo":"20141120011038.GB6527@google.com","subject":"Re: [PATCH 1/2] refs.c: make ref_transaction_create a wrapper for ref_transaction_update","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2014-11-20T01:12:17Z","receivedAt":"2014-11-20T01:12:17Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"I am sorry for not having asked before.\nAs I picked up the patches, you had sign offs pretty much at any patch.\nI'll remove them from future patches when sending to the list.\n\nOn Wed, Nov 19, 2014 at 5:10 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Stefan Beller wrote:\n>\n>> From: Ronnie Sahlberg <sahlberg@google.com>\n>>\n>> The ref_transaction_update function can already be used to create refs by\n>> passing null_sha1 as the old_sha1 parameter. Simplify by replacing\n>> transaction_create with a thin wrapper.\n>>\n>> Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>\n>> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>\n>> Signed-off-by: Stefan Beller <sbeller@google.com>\n>> ---\n>>  refs.c | 27 ++-------------------------\n>>  1 file changed, 2 insertions(+), 25 deletions(-)\n>\n> I feel a bit ashamed to have my sign-off peppering all these patches\n> that I didn't have anything to do with except preparing to send them\n> to the list once or twice.  I'd be happier if my sign-off weren't\n> there.\n>\n> Except for that,\n> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n"},{"id":"252235","messageId":"20141120013755.GD6527@google.com","threadId":"38012","inReplyTo":"CAGZ79kaW3xGjepcXFZYYUTuDqbEixVA4rH-FMcG0hyEoCVqizQ@mail.gmail.com","subject":"Re: [PATCH 1/2] refs.c: make ref_transaction_create a wrapper for ref_transaction_update","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2014-11-20T01:37:55Z","receivedAt":"2014-11-20T01:37:55Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"(administrivia: please don't top-post)\nStefan Beller wrote:\n> On Wed, Nov 19, 2014 at 5:10 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n\n>> I feel a bit ashamed to have my sign-off peppering all these patches\n>> that I didn't have anything to do with except preparing to send them\n>> to the list once or twice.  I'd be happier if my sign-off weren't\n>> there.\n>\n> I am sorry for not having asked before.\n\nDon't worry too much about it --- you were starting from commits that\nalready had my name there.\n\nI was just mentioning my preference for the future (since there are a\nlot of these patches).\n"},{"id":"252249","messageId":"546DCA85.8060806@alum.mit.edu","threadId":"38012","inReplyTo":"1416433224-29763-1-git-send-email-sbeller@google.com","subject":"Re: [PATCH 0/2] Breaking the ref-transactions-reflog series in smaller parts","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2014-11-20T11:03:33Z","receivedAt":"2014-11-20T11:03:33Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"On 11/19/2014 10:40 PM, Stefan Beller wrote:\n> so I think the patch series ref-transactions-reflog[1] sent previously to the list\n> is still too large for easy review and I want to break it up more.\n> So in this series we'll digest only 2 small patches, which do not seem to be \n> controversial (yet;) and seem to be useful no matter how the discussion on\n> the other series continues.\n> \n> ref_transaction_create as well as ref_transaction_delete are just special cases\n> of ref_transaction_update, so let's reduce some redundant code. While this doesn't\n> change code in pathes, which are supposed to be run, we do have slight changes \n> in error messages starting with \"BUG: \". So in the best case, the user will never\n> see these messages at all.\n\nUsers should *never* see error messages starting with \"BUG: \". These are\nbasically what the Git project uses instead of assert(). As long as we\nGit developers would understand a bug report submitted by a user who\nsees such an error message, their text can be changed without worries.\n\nBoth patches are\n\nReviewed-by: Michael Haggerty <mhagger@alum.mit.edu>\n\nAnd I love that you are proceeding in smaller pieces.\n\nMichael\n\n-- \nMichael Haggerty\nmhagger@alum.mit.edu\n"},{"id":"252262","messageId":"20141120160000.GA31738@peff.net","threadId":"38012","inReplyTo":"1416433224-29763-2-git-send-email-sbeller@google.com","subject":"Re: [PATCH 1/2] refs.c: make ref_transaction_create a wrapper for ref_transaction_update","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-11-20T16:00:01Z","receivedAt":"2014-11-20T16:00:01Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Nov 19, 2014 at 01:40:23PM -0800, Stefan Beller wrote:\n\n>  {\n> -\tstruct ref_update *update;\n> -\n> -\tassert(err);\n> -\n> -\tif (transaction->state != REF_TRANSACTION_OPEN)\n> -\t\tdie(\"BUG: create called for transaction that is not open\");\n> -\n> -\tif (!new_sha1 || is_null_sha1(new_sha1))\n> -\t\tdie(\"BUG: create ref with null new_sha1\");\n> -\n> -\tif (check_refname_format(refname, REFNAME_ALLOW_ONELEVEL)) {\n> -\t\tstrbuf_addf(err, \"refusing to create ref with bad name %s\",\n> -\t\t\t    refname);\n> -\t\treturn -1;\n> -\t}\n\nYou claimed in the cover letter that only BUG messages were changed. But\nI think this third one is a real user-visible message.\n\nThat being said, I think the sum total of the change to the message is\ns/create/update/, and it's probably fine.\n\n-Peff\n"},{"id":"252268","messageId":"1416505090-1839-1-git-send-email-sbeller@google.com","threadId":"38012","inReplyTo":"20141120160000.GA31738@peff.net","subject":"[PATCH v2 1/2] refs.c: make ref_transaction_create a wrapper for ref_transaction_update","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2014-11-20T17:38:10Z","receivedAt":"2014-11-20T17:38:10Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"From: Ronnie Sahlberg <sahlberg@google.com>\n\nThe ref_transaction_update function can already be used to create refs by\npassing null_sha1 as the old_sha1 parameter. Simplify by replacing\ntransaction_create with a thin wrapper.\n\nSigned-off-by: Ronnie Sahlberg <sahlberg@google.com>\nSigned-off-by: Stefan Beller <sbeller@google.com>\nReviewed-by: Michael Haggerty <mhagger@alum.mit.edu>\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n---\n\nno changes in code, just removing Jonathans sign off, adding reviewed-by \nby Michael and Jonathan\n\n refs.c | 27 ++-------------------------\n 1 file changed, 2 insertions(+), 25 deletions(-)\n\ndiff --git a/refs.c b/refs.c\nindex 5ff457e..005eb18 100644\n--- a/refs.c\n+++ b/refs.c\n@@ -3623,31 +3623,8 @@ int ref_transaction_create(struct ref_transaction *transaction,\n \t\t\t   int flags, const char *msg,\n \t\t\t   struct strbuf *err)\n {\n-\tstruct ref_update *update;\n-\n-\tassert(err);\n-\n-\tif (transaction->state != REF_TRANSACTION_OPEN)\n-\t\tdie(\"BUG: create called for transaction that is not open\");\n-\n-\tif (!new_sha1 || is_null_sha1(new_sha1))\n-\t\tdie(\"BUG: create ref with null new_sha1\");\n-\n-\tif (check_refname_format(refname, REFNAME_ALLOW_ONELEVEL)) {\n-\t\tstrbuf_addf(err, \"refusing to create ref with bad name %s\",\n-\t\t\t    refname);\n-\t\treturn -1;\n-\t}\n-\n-\tupdate = add_update(transaction, refname);\n-\n-\thashcpy(update->new_sha1, new_sha1);\n-\thashclr(update->old_sha1);\n-\tupdate->flags = flags;\n-\tupdate->have_old = 1;\n-\tif (msg)\n-\t\tupdate->msg = xstrdup(msg);\n-\treturn 0;\n+\treturn ref_transaction_update(transaction, refname, new_sha1,\n+\t\t\t\t      null_sha1, flags, 1, msg, err);\n }\n \n int ref_transaction_delete(struct ref_transaction *transaction,\n-- \n2.2.0.rc2.23.gca0107e\n"},{"id":"252269","messageId":"1416505150-1913-1-git-send-email-sbeller@google.com","threadId":"38012","inReplyTo":"20141120011136.GC6527@google.com","subject":"[PATCH v2 2/2] refs.c: make ref_transaction_delete a wrapper for ref_transaction_update","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2014-11-20T17:39:10Z","receivedAt":"2014-11-20T17:39:10Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"From: Ronnie Sahlberg <sahlberg@google.com>\n\nSigned-off-by: Ronnie Sahlberg <sahlberg@google.com>\nSigned-off-by: Stefan Beller <sbeller@google.com>\nReviewed-by: Michael Haggerty <mhagger@alum.mit.edu>\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n---\n\nno changes in code, just removing Jonathans sign off, adding reviewed-by \nby Michael and Jonathan\n\n refs.c | 22 ++--------------------\n refs.h |  2 +-\n 2 files changed, 3 insertions(+), 21 deletions(-)\n\ndiff --git a/refs.c b/refs.c\nindex 005eb18..05cb299 100644\n--- a/refs.c\n+++ b/refs.c\n@@ -3633,26 +3633,8 @@ int ref_transaction_delete(struct ref_transaction *transaction,\n \t\t\t   int flags, int have_old, const char *msg,\n \t\t\t   struct strbuf *err)\n {\n-\tstruct ref_update *update;\n-\n-\tassert(err);\n-\n-\tif (transaction->state != REF_TRANSACTION_OPEN)\n-\t\tdie(\"BUG: delete called for transaction that is not open\");\n-\n-\tif (have_old && !old_sha1)\n-\t\tdie(\"BUG: have_old is true but old_sha1 is NULL\");\n-\n-\tupdate = add_update(transaction, refname);\n-\tupdate->flags = flags;\n-\tupdate->have_old = have_old;\n-\tif (have_old) {\n-\t\tassert(!is_null_sha1(old_sha1));\n-\t\thashcpy(update->old_sha1, old_sha1);\n-\t}\n-\tif (msg)\n-\t\tupdate->msg = xstrdup(msg);\n-\treturn 0;\n+\treturn ref_transaction_update(transaction, refname, null_sha1,\n+\t\t\t\t      old_sha1, flags, have_old, msg, err);\n }\n \n int update_ref(const char *action, const char *refname,\ndiff --git a/refs.h b/refs.h\nindex 2bc3556..7d675b7 100644\n--- a/refs.h\n+++ b/refs.h\n@@ -283,7 +283,7 @@ struct ref_transaction *ref_transaction_begin(struct strbuf *err);\n \n /*\n  * Add a reference update to transaction.  new_sha1 is the value that\n- * the reference should have after the update, or zeros if it should\n+ * the reference should have after the update, or null_sha1 if it should\n  * be deleted.  If have_old is true, then old_sha1 holds the value\n  * that the reference should have had before the update, or zeros if\n  * it must not have existed beforehand.\n-- \n2.2.0.rc2.23.gca0107e\n"},{"id":"252271","messageId":"20141120180315.GA15945@google.com","threadId":"38012","inReplyTo":"20141120160000.GA31738@peff.net","subject":"Re: [PATCH 1/2] refs.c: make ref_transaction_create a wrapper for ref_transaction_update","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2014-11-20T18:03:15Z","receivedAt":"2014-11-20T18:03:15Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Jeff King wrote:\n> On Wed, Nov 19, 2014 at 01:40:23PM -0800, Stefan Beller wrote:\n\n>> -\tif (check_refname_format(refname, REFNAME_ALLOW_ONELEVEL)) {\n>> -\t\tstrbuf_addf(err, \"refusing to create ref with bad name %s\",\n>> -\t\t\t    refname);\n>> -\t\treturn -1;\n>> -\t}\n>\n> You claimed in the cover letter that only BUG messages were changed. But\n> I think this third one is a real user-visible message.\n>\n> That being said, I think the sum total of the change to the message is\n> s/create/update/, and it's probably fine.\n\nYeah, it we want to get the 'create' back, we could handle it by\nchecking if old_sha1 is null_sha1 in transaction_update (that would\ntake of other callers, too, like 'git update-ref <ref> <commit> \"\"').\nBut I haven't convinced myself that's worth the complication --- in\nany event it could be a separate patch to avoid blocking this one.\n\nThanks,\nJonathan\n"},{"id":"252273","messageId":"xmqq1tox4ujw.fsf@gitster.dls.corp.google.com","threadId":"38012","inReplyTo":"1416505150-1913-1-git-send-email-sbeller@google.com","subject":"Re: [PATCH v2 2/2] refs.c: make ref_transaction_delete a wrapper for ref_transaction_update","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-11-20T18:05:07Z","receivedAt":"2014-11-20T18:05:07Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks; I think these match what I locally amended just now ;-)\n"},{"id":"252277","messageId":"20141120181831.GC2559@peff.net","threadId":"38012","inReplyTo":"20141120180315.GA15945@google.com","subject":"Re: [PATCH 1/2] refs.c: make ref_transaction_create a wrapper for ref_transaction_update","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-11-20T18:18:32Z","receivedAt":"2014-11-20T18:18:32Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Nov 20, 2014 at 10:03:15AM -0800, Jonathan Nieder wrote:\n\n> Jeff King wrote:\n> > On Wed, Nov 19, 2014 at 01:40:23PM -0800, Stefan Beller wrote:\n> \n> >> -\tif (check_refname_format(refname, REFNAME_ALLOW_ONELEVEL)) {\n> >> -\t\tstrbuf_addf(err, \"refusing to create ref with bad name %s\",\n> >> -\t\t\t    refname);\n> >> -\t\treturn -1;\n> >> -\t}\n> >\n> > You claimed in the cover letter that only BUG messages were changed. But\n> > I think this third one is a real user-visible message.\n> >\n> > That being said, I think the sum total of the change to the message is\n> > s/create/update/, and it's probably fine.\n> \n> Yeah, it we want to get the 'create' back, we could handle it by\n> checking if old_sha1 is null_sha1 in transaction_update (that would\n> take of other callers, too, like 'git update-ref <ref> <commit> \"\"').\n> But I haven't convinced myself that's worth the complication --- in\n> any event it could be a separate patch to avoid blocking this one.\n\nAgreed on all of that.\n\n-Peff\n"}]}