diff mbox series

Ensure patches show moves rather than add/delete

Message ID 20241217161146.1943425-1-robh@kernel.org (mailing list archive)
State New
Headers show
Series Ensure patches show moves rather than add/delete | expand

Commit Message

Rob Herring Dec. 17, 2024, 4:11 p.m. UTC
Don't rely of users' gitconfig when generating patches with a move. The
default now for gitconfig is this is enabled, but I'm pretty sure it used
to be disabled by default. In any case, users mess with long time defaults
like threading for no good reason.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
Maybe we want -C and -B too? Those don't happen too often compared to moves.
---
 src/b4/__init__.py | 1 +
 1 file changed, 1 insertion(+)

Comments

Christian Heusel Dec. 18, 2024, 8:04 p.m. UTC | #1
On 24/12/17 10:11AM, Rob Herring (Arm) wrote:
> Don't rely of users' gitconfig when generating patches with a move. The
> default now for gitconfig is this is enabled, but I'm pretty sure it used
> to be disabled by default. In any case, users mess with long time defaults
> like threading for no good reason.
> 
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
> Maybe we want -C and -B too? Those don't happen too often compared to moves.
> ---
>  src/b4/__init__.py | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/b4/__init__.py b/src/b4/__init__.py
> index bb93656d8ad7..a63520792df5 100644
> --- a/src/b4/__init__.py
> +++ b/src/b4/__init__.py
> @@ -3464,6 +3464,7 @@ def git_range_to_patches(gitdir: Optional[str], start: str, end: str,
>              gitdir,
>              [
>                  'show',
> +                '-M',

I think for consistency with the other options it would be better to use
the long form "--find-renames" here.

>                  '--format=email',
>                  '--full-index',
>                  '--binary',
> -- 
> 2.45.2
diff mbox series

Patch

diff --git a/src/b4/__init__.py b/src/b4/__init__.py
index bb93656d8ad7..a63520792df5 100644
--- a/src/b4/__init__.py
+++ b/src/b4/__init__.py
@@ -3464,6 +3464,7 @@  def git_range_to_patches(gitdir: Optional[str], start: str, end: str,
             gitdir,
             [
                 'show',
+                '-M',
                 '--format=email',
                 '--full-index',
                 '--binary',