Re: [PATCH v8 5/6] diff-lib: refactor out diff_change logic
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Feb 9, 2023, 01:48 UTC
- Message-ID
- <230209.86357fzjt5.gmgdl@evledraar.gmail.com>
- In-Reply-To
- <20230209000212.1892457-6-calvinwan@google.com>
On Thu, Feb 09 2023, Calvin Wan wrote:
Show 5 quoted lines
> + diff_change(options, oldmode, newmode, > + old_oid, new_oid, > + !is_null_oid(old_oid), > + !is_null_oid(new_oid), > + ce->name, 0, dirty_submodule);
Nit: This has odd not-our-usual-style indentation (to align with the
"("). I didn't spot it before, but I vaguely recall seeing something
like this in another one of your patches, but maybe I misrecall. In case
not maybe some editor settings need tweaking?I haven't looked carefully at the rest to see if the same issue occurs in other code here.
Show 14 quoted lines
> - if (!changed && !dirty_submodule) {
> - ce_mark_uptodate(ce);
> - mark_fsmonitor_valid(istate, ce);
> - if (!revs->diffopt.flags.find_copies_harder)
> - continue;
> - }
> - oldmode = ce->ce_mode;
> - old_oid = &ce->oid;
> - new_oid = changed ? null_oid() : &ce->oid;
> - diff_change(&revs->diffopt, oldmode, newmode,
> - old_oid, new_oid,
> - !is_null_oid(old_oid),
> - !is_null_oid(new_oid),
> - ce->name, 0, dirty_submodule);So in this case it's not new code, but code moving, note the four spaces after the sequence of tabs that aren't in your version.
So perhaps your editor on re-indentation is configured not to just strip off the leading \t to re-indent (which is all that's needed here) but strips all whitespace, then re-indents after its own mind?