This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new 3cfbf56192 doc/developer: allow whitespace changes mixed with 
functional changes
3cfbf56192 is described below

commit 3cfbf56192fb3dcabc0951dad2664b84479b3de1
Author:     Zhao Zhili <[email protected]>
AuthorDate: Mon Mar 2 10:42:05 2026 +0800
Commit:     Gyan Doshi <[email protected]>
CommitDate: Wed Mar 25 04:14:23 2026 +0000

    doc/developer: allow whitespace changes mixed with functional changes
    
    The cosmetic-changes policy in developer.texi was written during the SVN
    era, when reviewing indentation changes mixed with functional changes
    was genuinely difficult.
    
    Since FFmpeg has moved to Git, reviewers now have simple built-in tools
    to ignore whitespace changes:
    
      git diff -w
      git log -p --ignore-all-space
    
    Forgejo's pull request UI also offers a 'Hide whitespace changes'
    toggle, making it trivial to focus on the functional diff.
    
    For those who prefer reviewing patches in their mail client, the same
    result can be achieved by saving the patch and running:
    
      git apply --ignore-whitespace <patch> && git diff -w
    
    Relax the policy so that indentation changes which are invisible to
    git diff --ignore-all-space may accompany functional changes, while
    still requiring non-whitespace cosmetic changes to be in separate
    commits.
    
    Signed-off-by: Zhao Zhili <[email protected]>
---
 doc/developer.texi | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/doc/developer.texi b/doc/developer.texi
index f41ba924c0..3772dad698 100644
--- a/doc/developer.texi
+++ b/doc/developer.texi
@@ -471,13 +471,18 @@ ask/discuss it on the developer mailing list.
 
 @subheading Cosmetic changes should be kept in separate patches.
 We refuse source indentation and other cosmetic changes if they are mixed
-with functional changes, such commits will be rejected and removed. Every
+with functional changes, such commits will be rejected and removed. However,
+indentation changes that can be ignored by @code{git diff --ignore-all-space}
+(e.g. changes in whitespace amount, leading/trailing spaces) may be mixed with
+functional changes, since reviewers can use @code{git diff -w} or
+@code{git log -p --ignore-all-space} to review only the functional parts of
+the change. Forgejo's pull request interface also provides a
+``Hide whitespace changes'' option for this purpose. Every
 developer has his own indentation style, you should not change it. Of course
 if you (re)write something, you can use your own style, even though we would
 prefer if the indentation throughout FFmpeg was consistent (Many projects
 force a given indentation style - we do not.). If you really need to make
-indentation changes (try to avoid this), separate them strictly from real
-changes.
+non-whitespace cosmetic changes, separate them strictly from real changes.
 
 NOTE: If you had to put if()@{ .. @} over a large (> 5 lines) chunk of code,
 then either do NOT change the indentation of the inner part within (do not

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to