git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stefan Beller <sbeller@google.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PATCH] read-cache: fix indentation in read_index_from
Date: Mon, 31 Aug 2015 12:34:57 -0700	[thread overview]
Message-ID: <CAGZ79kbQmmcJMW=07A1pyHdbViJTfseG4L-kspKEvyugTO7R4g@mail.gmail.com> (raw)
In-Reply-To: <xmqqpp23uuhk.fsf@gitster.mtv.corp.google.com>

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);

  reply	other threads:[~2015-08-31 19:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2015-08-31 20:12     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGZ79kbQmmcJMW=07A1pyHdbViJTfseG4L-kspKEvyugTO7R4g@mail.gmail.com' \
    --to=sbeller@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).