Re: [PATCH v3 07/11] dir: add new_untracked_cache()
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Dec 24, 2015, 07:35 UTC
- Message-ID
- <CAP8UFD0phWoR3qf7wZ6vE0BmrPLQYRgqgRBn14jGPemgey7Nsg@mail.gmail.com>
- In-Reply-To
- <CAPig+cQoho_EAjvS2z5Wa3jV2zd_bMzdZRP5PFyruqB=cXGigw@mail.gmail.com>
On Wed, Dec 23, 2015 at 11:53 PM, Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 6 quoted lines
> On Wed, Dec 23, 2015 at 4:03 PM, Christian Couder > <christian.couder@gmail.com> wrote: >> Factor out code into new_untracked_cache(), which will be used >> multiple times in a later commit. > > Odd indentation: s/^\s+//
Yeah, will fix.
Show 20 quoted lines
>> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
>> ---
>> diff --git a/dir.c b/dir.c
>> @@ -1938,16 +1938,20 @@ void add_untracked_ident(struct untracked_cache *uc)
>> strbuf_addch(&uc->ident, 0);
>> }
>>
>> +static void new_untracked_cache(void)
>> +{
>> + struct untracked_cache *uc = xcalloc(1, sizeof(*uc));
>> + strbuf_init(&uc->ident, 100);
>> + uc->exclude_per_dir = ".gitignore";
>> + /* should be the same flags used by git-status */
>> + uc->dir_flags = DIR_SHOW_OTHER_DIRECTORIES | DIR_HIDE_EMPTY_DIRECTORIES;
>> + the_index.untracked = uc;
>> +}
>
> This and the previous patch both move the same code around. As a
> reviewer, I could easily see the two patches combined, and would not
> find the unified patch onerous to review.Ok, I will squash them.
By the way it looks like I have overlooked some reviews by David and Tosten from the previous round. Sorry about that. I will take them into account in the next version.