public inbox for [email protected]help / color / mirror / Atom feed
Indentation in a patch 3+ messages / 3 participants [nested] [flat]
* Indentation in a patch @ 2025-11-25 18:14 Bernice Southey <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: Bernice Southey @ 2025-11-25 18:14 UTC (permalink / raw) To: [email protected] Hi, I'm having a fight with git and indentation for my first ever patch attempt. I'm just adding an if statement around an existing 70-line code-block. It's a very simple few lines with --ignore-all-space. But the patch file is noisy because of 140 lines of +/- indentation diffs. I then realised the standard was tabs, and after fixing my spaces, things got even worse. The 140 lines now interleave in many unreadable chunks. I've tried different diff-algorithms, but they make no difference. I'm tempted to submit my patch without indenting the if-block, and an explanation. Any better suggestions? While I'm asking, I added a regression test and ran make check-world with the TAP tests. Anything else I should do before sending it to hackers? Thanks, Bernice ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Indentation in a patch @ 2025-11-25 18:58 Daniel Gustafsson <[email protected]> parent: Bernice Southey <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: Daniel Gustafsson @ 2025-11-25 18:58 UTC (permalink / raw) To: Bernice Southey <[email protected]>; +Cc: [email protected] > On 25 Nov 2025, at 19:14, Bernice Southey <[email protected]> wrote: > .. for my first ever patch attempt. Awesome, we love to see new contributors! > I'm tempted to submit my patch without indenting the > if-block, and an explanation. That's perfectly fine, an incorrectly indentend diff is fine to submit if it makes it more readable (especially when coupled with a note explaining why). > While I'm asking, I added a regression test and ran make check-world > with the TAP tests. Anything else I should do before sending it to > hackers? Sounds like you've completed all the required steps. -- Daniel Gustafsson ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Indentation in a patch @ 2025-11-26 11:05 Peter Eisentraut <[email protected]> parent: Daniel Gustafsson <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Peter Eisentraut @ 2025-11-26 11:05 UTC (permalink / raw) To: Daniel Gustafsson <[email protected]>; Bernice Southey <[email protected]>; +Cc: [email protected] On 25.11.25 19:58, Daniel Gustafsson wrote: >> On 25 Nov 2025, at 19:14, Bernice Southey <[email protected]> wrote: > >> .. for my first ever patch attempt. > > Awesome, we love to see new contributors! > >> I'm tempted to submit my patch without indenting the >> if-block, and an explanation. > > That's perfectly fine, an incorrectly indentend diff is fine to submit if it > makes it more readable (especially when coupled with a note explaining why). Alternatively or additionally, git diff -w/--ignore-all-space can be useful in situations like this. ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2025-11-26 11:05 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-11-25 18:14 Indentation in a patch Bernice Southey <[email protected]> 2025-11-25 18:58 ` Daniel Gustafsson <[email protected]> 2025-11-26 11:05 ` Peter Eisentraut <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox