{"thread":{"id":"54213","subject":"[PATCH v2] blame.c: replace instance of !oidcmp for oideq","startedAt":"2020-09-08T21:11:37Z","lastAt":"2020-09-09T20:08:57Z","messageCount":6,"participants":["Edmundo Carmona Antoranz","Derrick Stolee","Junio C Hamano"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"405202","messageId":"20200908211053.807194-1-eantoranz@gmail.com","threadId":"54213","inReplyTo":null,"subject":"[PATCH v2] blame.c: replace instance of !oidcmp for oideq","fromName":"Edmundo Carmona Antoranz","fromEmail":"eantoranz@gmail.com","sentAt":"2020-09-08T21:10:53Z","receivedAt":"2020-09-08T21:11:37Z","isPatch":true,"sender":{"key":"eantoranz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1491018?v=4"},"body":"0906ac2b54b introduced a call to oidcmp() that should be\nreplaced by oideq() (the latter introduced in 14438c4).\n\nSigned-off-by: Edmundo Carmona Antoranz <eantoranz@gmail.com>\n---\n blame.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/blame.c b/blame.c\nindex da7e28800e..a8abe86ae4 100644\n--- a/blame.c\n+++ b/blame.c\n@@ -1352,8 +1352,8 @@ static struct blame_origin *find_origin(struct repository *r,\n \telse {\n \t\tint compute_diff = 1;\n \t\tif (origin->commit->parents &&\n-\t\t    !oidcmp(&parent->object.oid,\n-\t\t\t    &origin->commit->parents->item->object.oid))\n+\t\t    oideq(&parent->object.oid,\n+\t\t\t  &origin->commit->parents->item->object.oid))\n \t\t\tcompute_diff = maybe_changed_path(r, origin, bd);\n \n \t\tif (compute_diff)\n-- \n2.28.0\n\n"},{"id":"405241","messageId":"6b84f112-7e3f-3a78-3766-033fcf494464@gmail.com","threadId":"54213","inReplyTo":"20200908211053.807194-1-eantoranz@gmail.com","subject":"Re: [PATCH v2] blame.c: replace instance of !oidcmp for oideq","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2020-09-09T12:39:56Z","receivedAt":"2020-09-09T12:43:47Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 9/8/2020 5:10 PM, Edmundo Carmona Antoranz wrote:\n> 0906ac2b54b introduced a call to oidcmp() that should be\n> replaced by oideq() (the latter introduced in 14438c4).\n\nShort-OIDs on their own are not enough. Please use the\nformat \"abbreviated hash (subject, date)\" as mentioned\nin my earlier reply:\n\n0906ac2b (blame: use changed-path Bloom filters, 2020-04-16)\n\n14438c4 (introduce hasheq() and oideq(), 2018-08-28)\n\nSee Documentation/SubmittingPatches [1] for more information\non this.\n\n[1] https://github.com/git/git/blob/3a238e539bcdfe3f9eb5010fd218640c1b499f7a/Documentation/SubmittingPatches#L144-L165\n\nThanks,\n-Stolee\n"},{"id":"405245","messageId":"CAOc6etbvaWQA9WWofRNPP7Yh5iq80sj5n27AGhtsYvOGOKtWDw@mail.gmail.com","threadId":"54213","inReplyTo":"6b84f112-7e3f-3a78-3766-033fcf494464@gmail.com","subject":"Re: [PATCH v2] blame.c: replace instance of !oidcmp for oideq","fromName":"Edmundo Carmona Antoranz","fromEmail":"eantoranz@gmail.com","sentAt":"2020-09-09T13:10:44Z","receivedAt":"2020-09-09T14:10:23Z","isPatch":true,"sender":{"key":"eantoranz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1491018?v=4"},"body":"On Wed, Sep 9, 2020 at 6:39 AM Derrick Stolee <stolee@gmail.com> wrote:\n> Short-OIDs on their own are not enough. Please use the\n> format \"abbreviated hash (subject, date)\" as mentioned\n> in my earlier reply:\n>\n\nYou got it. Thanks!\n"},{"id":"405270","messageId":"xmqqmu1yvlv7.fsf@gitster.c.googlers.com","threadId":"54213","inReplyTo":"6b84f112-7e3f-3a78-3766-033fcf494464@gmail.com","subject":"Re: [PATCH v2] blame.c: replace instance of !oidcmp for oideq","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-09-09T18:35:56Z","receivedAt":"2020-09-09T18:36:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Derrick Stolee <stolee@gmail.com> writes:\n\n> On 9/8/2020 5:10 PM, Edmundo Carmona Antoranz wrote:\n>> 0906ac2b54b introduced a call to oidcmp() that should be\n>> replaced by oideq() (the latter introduced in 14438c4).\n>\n> Short-OIDs on their own are not enough. Please use the\n> format \"abbreviated hash (subject, date)\" as mentioned\n> in my earlier reply:\n>\n> 0906ac2b (blame: use changed-path Bloom filters, 2020-04-16)\n>\n> 14438c4 (introduce hasheq() and oideq(), 2018-08-28)\n>\n> See Documentation/SubmittingPatches [1] for more information\n> on this.\n>\n> [1] https://github.com/git/git/blob/3a238e539bcdfe3f9eb5010fd218640c1b499f7a/Documentation/SubmittingPatches#L144-L165\n\nThanks for saving me from having to say it ;-)\n\nI've reworded these while queuing.  See below.\n\nNote that I toned \"should be replaced\" down to \"should have been\".\n\nI'd consider this kind of change falls into the \"Yes, it would have\nbeen better if it were written like so from the beginning, but it is\ndubious that it is worth the engineering time and effort to go back\nand change it spending reviewers' bandwidth\" category.  I'll still\ntake this patch as it is a contribution from a new contributor,\nthough (it's like reviewing and queuing microproject---the cost in\nsuch cases is not attributed to code churning alone, but it also\nbenefits onboarding).\n\nThanks.\n\n-- >8 --\nFrom: Edmundo Carmona Antoranz <eantoranz@gmail.com>\nDate: Tue, 8 Sep 2020 15:10:53 -0600\nSubject: [PATCH] blame.c: replace instance of !oidcmp for oideq\n\n0906ac2b (blame: use changed-path Bloom filters, 2020-04-16)\nintroduced a call to oidcmp() that should have been oideq(), which\nwas introduced in 14438c44 (introduce hasheq() and oideq(),\n2018-08-28).\n\nSigned-off-by: Edmundo Carmona Antoranz <eantoranz@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n blame.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/blame.c b/blame.c\nindex da7e28800e..a8abe86ae4 100644\n--- a/blame.c\n+++ b/blame.c\n@@ -1352,8 +1352,8 @@ static struct blame_origin *find_origin(struct repository *r,\n \telse {\n \t\tint compute_diff = 1;\n \t\tif (origin->commit->parents &&\n-\t\t    !oidcmp(&parent->object.oid,\n-\t\t\t    &origin->commit->parents->item->object.oid))\n+\t\t    oideq(&parent->object.oid,\n+\t\t\t  &origin->commit->parents->item->object.oid))\n \t\t\tcompute_diff = maybe_changed_path(r, origin, bd);\n \n \t\tif (compute_diff)\n-- \n2.28.0-558-g7a0184fd7b\n\n"},{"id":"405273","messageId":"CAOc6etZOOZLQ4Vh_94d6cwPEAoAjuoqqvPWPHWWkw0rB73=hrQ@mail.gmail.com","threadId":"54213","inReplyTo":"xmqqmu1yvlv7.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v2] blame.c: replace instance of !oidcmp for oideq","fromName":"Edmundo Carmona Antoranz","fromEmail":"eantoranz@gmail.com","sentAt":"2020-09-09T19:13:53Z","receivedAt":"2020-09-09T19:14:09Z","isPatch":true,"sender":{"key":"eantoranz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1491018?v=4"},"body":"On Wed, Sep 9, 2020 at 12:36 PM Junio C Hamano <gitster@pobox.com> wrote:\n> I'll still\n> take this patch as it is a contribution from a new contributor,\n\nI don't know why you say I'm a new contributor. I would have sworn you\nhave my picture\non a wall with something written like: do not take patches from this guy. ;-)\nIt's good to at least know that I haven't messed up so badly that I'm\nin Junio's name's cache.\n\n>\n> Thanks.\n\nAnytime! And thanks for the help from Derrick. Very kind for helping me out with\nthe baby steps.\n"},{"id":"405284","messageId":"xmqq1rjavhkd.fsf@gitster.c.googlers.com","threadId":"54213","inReplyTo":"CAOc6etZOOZLQ4Vh_94d6cwPEAoAjuoqqvPWPHWWkw0rB73=hrQ@mail.gmail.com","subject":"Re: [PATCH v2] blame.c: replace instance of !oidcmp for oideq","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-09-09T20:08:50Z","receivedAt":"2020-09-09T20:08:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Edmundo Carmona Antoranz <eantoranz@gmail.com> writes:\n\n> On Wed, Sep 9, 2020 at 12:36 PM Junio C Hamano <gitster@pobox.com> wrote:\n>> I'll still\n>> take this patch as it is a contribution from a new contributor,\n>\n> I don't know why you say I'm a new contributor. I would have sworn you\n> have my picture\n> on a wall with something written like: do not take patches from this guy. ;-)\n> It's good to at least know that I haven't messed up so badly that I'm\n> in Junio's name's cache.\n\nSorry, it appears that two patches from late 2015 weren't enough to\nretain your name kept in cache X-<.\n\n"}]}