git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] read-cache: fix indentation in read_index_from
@ 2015-08-31 18:43 Stefan Beller
  2015-08-31 19:29 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Beller @ 2015-08-31 18:43 UTC (permalink / raw)
  To: gitster; +Cc: git, Stefan Beller

Signed-off-by: Stefan Beller <sbeller@google.com>
---
 read-cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/read-cache.c b/read-cache.c
index 89dbc08..a3df665 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -1653,7 +1653,7 @@ int read_index_from(struct index_state *istate, const char *path)
 		die("broken index, expect %s in %s, got %s",
 		    sha1_to_hex(split_index->base_sha1),
 		    git_path("sharedindex.%s",
-				     sha1_to_hex(split_index->base_sha1)),
+			     sha1_to_hex(split_index->base_sha1)),
 		    sha1_to_hex(split_index->base->sha1));
 	merge_base_index(istate);
 	check_ce_order(istate);
-- 
2.5.0.264.geed6e44.dirty

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] read-cache: fix indentation in read_index_from
  2015-08-31 18:43 [PATCH] read-cache: fix indentation in read_index_from Stefan Beller
@ 2015-08-31 19:29 ` Junio C Hamano
  2015-08-31 19:34   ` Stefan Beller
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2015-08-31 19:29 UTC (permalink / raw)
  To: Stefan Beller; +Cc: git

Stefan Beller <sbeller@google.com> writes:

> Signed-off-by: Stefan Beller <sbeller@google.com>
> ---
>  read-cache.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/read-cache.c b/read-cache.c
> index 89dbc08..a3df665 100644
> --- a/read-cache.c
> +++ b/read-cache.c
> @@ -1653,7 +1653,7 @@ int read_index_from(struct index_state *istate, const char *path)
>  		die("broken index, expect %s in %s, got %s",
>  		    sha1_to_hex(split_index->base_sha1),
>  		    git_path("sharedindex.%s",
> -				     sha1_to_hex(split_index->base_sha1)),
> +			     sha1_to_hex(split_index->base_sha1)),

We allow two styles in our codebase, (1) indent to align with
opening parenthesis, or (2) indent sufficiently deeper than the
first line with HT.  The original is neither, so in that sense
it is a good thing to do in the long run.

I'll queue it for this time, but in general, I'd prefer if people
refrained from touching code only for style fixes in an area that is
touched actively in topics, unless it is done inside a topic that
has to touch that area of the code in order to do something more
than style fixes.

Thanks.

>  		    sha1_to_hex(split_index->base->sha1));
>  	merge_base_index(istate);
>  	check_ce_order(istate);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] read-cache: fix indentation in read_index_from
  2015-08-31 19:29 ` Junio C Hamano
@ 2015-08-31 19:34   ` Stefan Beller
  2015-08-31 20:12     ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Beller @ 2015-08-31 19:34 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git@vger.kernel.org

On Mon, Aug 31, 2015 at 12:29 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Stefan Beller <sbeller@google.com> writes:
>
>> Signed-off-by: Stefan Beller <sbeller@google.com>
>> ---
>>  read-cache.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/read-cache.c b/read-cache.c
>> index 89dbc08..a3df665 100644
>> --- a/read-cache.c
>> +++ b/read-cache.c
>> @@ -1653,7 +1653,7 @@ int read_index_from(struct index_state *istate, const char *path)
>>               die("broken index, expect %s in %s, got %s",
>>                   sha1_to_hex(split_index->base_sha1),
>>                   git_path("sharedindex.%s",
>> -                                  sha1_to_hex(split_index->base_sha1)),
>> +                          sha1_to_hex(split_index->base_sha1)),
>
> We allow two styles in our codebase, (1) indent to align with
> opening parenthesis, or (2) indent sufficiently deeper than the
> first line with HT.  The original is neither, so in that sense
> it is a good thing to do in the long run.
>
> I'll queue it for this time, but in general, I'd prefer if people
> refrained from touching code only for style fixes in an area that is
> touched actively in topics, unless it is done inside a topic that
> has to touch that area of the code in order to do something more
> than style fixes.

Right. :(

The problem here is that I was looking to use read_index_from
in the submodule code to implement recursive actions, but as I
could not find documentation on how to use it, I read the code.
And whenever I see obvious things to fix (such as style),
I cannot stop myself from shooting from the hip, sending a patch.
I'll stop doing that.

>
> Thanks.
>
>>                   sha1_to_hex(split_index->base->sha1));
>>       merge_base_index(istate);
>>       check_ce_order(istate);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] read-cache: fix indentation in read_index_from
  2015-08-31 19:34   ` Stefan Beller
@ 2015-08-31 20:12     ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2015-08-31 20:12 UTC (permalink / raw)
  To: Stefan Beller; +Cc: git@vger.kernel.org

Stefan Beller <sbeller@google.com> writes:

>> I'll queue it for this time, but in general, I'd prefer if people
>> refrained from touching code only for style fixes in an area that is
>> touched actively in topics, unless it is done inside a topic that
>> has to touch that area of the code in order to do something more
>> than style fixes.
>
> Right. :(
>
> The problem here is that I was looking to use read_index_from
> in the submodule code to implement recursive actions, but as I
> could not find documentation on how to use it, I read the code.
> And whenever I see obvious things to fix (such as style),
> I cannot stop myself from shooting from the hip, sending a patch.
> I'll stop doing that.

Don't stop; instead queue and keep them on your own queue, so that
you can find a good time to send them out.

A good rule-of-thumb for "good time" is when "git diff maint pu"
does not show any overlap to the context and preimage of your
patches.

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-08-31 20:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-31 18:43 [PATCH] read-cache: fix indentation in read_index_from Stefan Beller
2015-08-31 19:29 ` Junio C Hamano
2015-08-31 19:34   ` Stefan Beller
2015-08-31 20:12     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).