[1/2] devtools: fix check of multiple commits fixed at once

Message ID 20230418140726.1472209-2-thomas@monjalon.net (mailing list archive)
State New
Delegated to: Thomas Monjalon
Headers
Series minor changes in script used for backports |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Thomas Monjalon April 18, 2023, 2:07 p.m. UTC
  When looking for fixes to backport,
only the first origin commit hash (from "Fixes:") was checked.
There is very little chance that the next commits being fixed
have a wrong hash in the commit log of the fix,
but it is fixed by checking them all before proceeding further.

Fixes: 752d8e097ec1 ("scripts: show fixes with release version of bug")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 devtools/git-log-fixes.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Luca Boccassi Nov. 28, 2023, 2:15 p.m. UTC | #1
On Tue, 18 Apr 2023 at 15:08, Thomas Monjalon <thomas@monjalon.net> wrote:
>
> When looking for fixes to backport,
> only the first origin commit hash (from "Fixes:") was checked.
> There is very little chance that the next commits being fixed
> have a wrong hash in the commit log of the fix,
> but it is fixed by checking them all before proceeding further.
>
> Fixes: 752d8e097ec1 ("scripts: show fixes with release version of bug")
> Cc: stable@dpdk.org
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>  devtools/git-log-fixes.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Luca Boccassi <bluca@debian.org>
  

Patch

diff --git a/devtools/git-log-fixes.sh b/devtools/git-log-fixes.sh
index 8a4a8470c2..4690dd4545 100755
--- a/devtools/git-log-fixes.sh
+++ b/devtools/git-log-fixes.sh
@@ -68,7 +68,7 @@  origin_version () # <origin_hash> ...
 {
 	for origin in $* ; do
 		# check hash is valid
-		git rev-parse -q --verify $1 >&- || continue
+		git rev-parse -q --verify $origin >&- || continue
 		# get version of this bug origin
 		local origver=$(commit_version $origin)
 		local roothashes="$(origin_filter $origin)"