{"thread":{"id":"40231","subject":"[PATCH] read-cache: fix indentation in read_index_from","startedAt":"2015-08-31T18:43:29Z","lastAt":"2015-08-31T20:12:03Z","messageCount":4,"participants":["Stefan Beller","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"269018","messageId":"1441046609-24181-1-git-send-email-sbeller@google.com","threadId":"40231","inReplyTo":null,"subject":"[PATCH] read-cache: fix indentation in read_index_from","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2015-08-31T18:43:29Z","receivedAt":"2015-08-31T18:43:29Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"Signed-off-by: Stefan Beller <sbeller@google.com>\n---\n read-cache.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/read-cache.c b/read-cache.c\nindex 89dbc08..a3df665 100644\n--- a/read-cache.c\n+++ b/read-cache.c\n@@ -1653,7 +1653,7 @@ int read_index_from(struct index_state *istate, const char *path)\n \t\tdie(\"broken index, expect %s in %s, got %s\",\n \t\t    sha1_to_hex(split_index->base_sha1),\n \t\t    git_path(\"sharedindex.%s\",\n-\t\t\t\t     sha1_to_hex(split_index->base_sha1)),\n+\t\t\t     sha1_to_hex(split_index->base_sha1)),\n \t\t    sha1_to_hex(split_index->base->sha1));\n \tmerge_base_index(istate);\n \tcheck_ce_order(istate);\n-- \n2.5.0.264.geed6e44.dirty\n"},{"id":"269035","messageId":"xmqqpp23uuhk.fsf@gitster.mtv.corp.google.com","threadId":"40231","inReplyTo":"1441046609-24181-1-git-send-email-sbeller@google.com","subject":"Re: [PATCH] read-cache: fix indentation in read_index_from","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-08-31T19:29:43Z","receivedAt":"2015-08-31T19:29:43Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stefan Beller <sbeller@google.com> writes:\n\n> Signed-off-by: Stefan Beller <sbeller@google.com>\n> ---\n>  read-cache.c | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/read-cache.c b/read-cache.c\n> index 89dbc08..a3df665 100644\n> --- a/read-cache.c\n> +++ b/read-cache.c\n> @@ -1653,7 +1653,7 @@ int read_index_from(struct index_state *istate, const char *path)\n>  \t\tdie(\"broken index, expect %s in %s, got %s\",\n>  \t\t    sha1_to_hex(split_index->base_sha1),\n>  \t\t    git_path(\"sharedindex.%s\",\n> -\t\t\t\t     sha1_to_hex(split_index->base_sha1)),\n> +\t\t\t     sha1_to_hex(split_index->base_sha1)),\n\nWe allow two styles in our codebase, (1) indent to align with\nopening parenthesis, or (2) indent sufficiently deeper than the\nfirst line with HT.  The original is neither, so in that sense\nit is a good thing to do in the long run.\n\nI'll queue it for this time, but in general, I'd prefer if people\nrefrained from touching code only for style fixes in an area that is\ntouched actively in topics, unless it is done inside a topic that\nhas to touch that area of the code in order to do something more\nthan style fixes.\n\nThanks.\n\n>  \t\t    sha1_to_hex(split_index->base->sha1));\n>  \tmerge_base_index(istate);\n>  \tcheck_ce_order(istate);\n"},{"id":"269036","messageId":"CAGZ79kbQmmcJMW=07A1pyHdbViJTfseG4L-kspKEvyugTO7R4g@mail.gmail.com","threadId":"40231","inReplyTo":"xmqqpp23uuhk.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] read-cache: fix indentation in read_index_from","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2015-08-31T19:34:57Z","receivedAt":"2015-08-31T19:34:57Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Mon, Aug 31, 2015 at 12:29 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Stefan Beller <sbeller@google.com> writes:\n>\n>> Signed-off-by: Stefan Beller <sbeller@google.com>\n>> ---\n>>  read-cache.c | 2 +-\n>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>>\n>> diff --git a/read-cache.c b/read-cache.c\n>> index 89dbc08..a3df665 100644\n>> --- a/read-cache.c\n>> +++ b/read-cache.c\n>> @@ -1653,7 +1653,7 @@ int read_index_from(struct index_state *istate, const char *path)\n>>               die(\"broken index, expect %s in %s, got %s\",\n>>                   sha1_to_hex(split_index->base_sha1),\n>>                   git_path(\"sharedindex.%s\",\n>> -                                  sha1_to_hex(split_index->base_sha1)),\n>> +                          sha1_to_hex(split_index->base_sha1)),\n>\n> We allow two styles in our codebase, (1) indent to align with\n> opening parenthesis, or (2) indent sufficiently deeper than the\n> first line with HT.  The original is neither, so in that sense\n> it is a good thing to do in the long run.\n>\n> I'll queue it for this time, but in general, I'd prefer if people\n> refrained from touching code only for style fixes in an area that is\n> touched actively in topics, unless it is done inside a topic that\n> has to touch that area of the code in order to do something more\n> than style fixes.\n\nRight. :(\n\nThe problem here is that I was looking to use read_index_from\nin the submodule code to implement recursive actions, but as I\ncould not find documentation on how to use it, I read the code.\nAnd whenever I see obvious things to fix (such as style),\nI cannot stop myself from shooting from the hip, sending a patch.\nI'll stop doing that.\n\n>\n> Thanks.\n>\n>>                   sha1_to_hex(split_index->base->sha1));\n>>       merge_base_index(istate);\n>>       check_ce_order(istate);\n"},{"id":"269045","messageId":"xmqq613vusj0.fsf@gitster.mtv.corp.google.com","threadId":"40231","inReplyTo":"CAGZ79kbQmmcJMW=07A1pyHdbViJTfseG4L-kspKEvyugTO7R4g@mail.gmail.com","subject":"Re: [PATCH] read-cache: fix indentation in read_index_from","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-08-31T20:12:03Z","receivedAt":"2015-08-31T20:12:03Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stefan Beller <sbeller@google.com> writes:\n\n>> I'll queue it for this time, but in general, I'd prefer if people\n>> refrained from touching code only for style fixes in an area that is\n>> touched actively in topics, unless it is done inside a topic that\n>> has to touch that area of the code in order to do something more\n>> than style fixes.\n>\n> Right. :(\n>\n> The problem here is that I was looking to use read_index_from\n> in the submodule code to implement recursive actions, but as I\n> could not find documentation on how to use it, I read the code.\n> And whenever I see obvious things to fix (such as style),\n> I cannot stop myself from shooting from the hip, sending a patch.\n> I'll stop doing that.\n\nDon't stop; instead queue and keep them on your own queue, so that\nyou can find a good time to send them out.\n\nA good rule-of-thumb for \"good time\" is when \"git diff maint pu\"\ndoes not show any overlap to the context and preimage of your\npatches.\n\nThanks.\n"}]}