[openssl/openssl] 7821b7: fix: util/check-format-commit.sh to handle one-lin...

Richard Levitte noreply at github.com
Thu Jul 18 03:49:57 UTC 2024


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 7821b7b9774d481ae92610e2d132ea34d4aaf407
      https://github.com/openssl/openssl/commit/7821b7b9774d481ae92610e2d132ea34d4aaf407
  Author: Richard Levitte <levitte at openssl.org>
  Date:   2024-07-18 (Thu, 18 Jul 2024)

  Changed paths:
    M util/check-format-commit.sh

  Log Message:
  -----------
  fix: util/check-format-commit.sh to handle one-line diff hunks

For multi-line hunks, 'git diff -U0' outputs a pair of START,COUNT
indicators to show where the hunk starts and ends.  However, if the hunk is
just one line, only START is output, with the COUNT of 1 being implied.
Typically, this happens for copyright change hunks, like this:

    --- a/crypto/evp/evp_err.c
    +++ b/crypto/evp/evp_err.c
    @@ -3 +3 @@
    - * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
    + * Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved.

This is normal unified diff output, and our script must adapt.

Reviewed-by: Tom Cosgrove <tom.cosgrove at arm.com>
Reviewed-by: Neil Horman <nhorman at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24900)



To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications


More information about the openssl-commits mailing list