Patch set 94272

Submitter
Xueming(Steven) Li
Applied on
dpdk (2ca92f54410400af76a1f0bc3bfecc8077e282aa)
Date submitted
June 16, 2021, 4:03 a.m.

Test Results Apply Error

Checking patch devtools/check-git-log.sh...
Checking patch devtools/git-log-fixes.sh...
error: while searching for:
done
shift $(($OPTIND - 1))
[ $# -ge 1 ] || usage_error 'range argument required'
range="$*"

# get major release version of a commit
commit_version () # <hash>
{
	local VER="v*.*"
	# use current branch as history reference
	local refbranch=$(git rev-parse --abbrev-ref HEAD)
	local tag=$( (git tag -l $VER --contains $1 --sort=creatordate --merged $refbranch 2>&- ||
		# tag --merged option has been introduced in git 2.7.0
		# below is a fallback in case of old git version

error: patch failed: devtools/git-log-fixes.sh:33
Hunk #4 succeeded at 49 (offset -10 lines).
Applied patch devtools/check-git-log.sh cleanly.
Applying patch devtools/git-log-fixes.sh with 1 reject...
Hunk #1 applied cleanly.
Hunk #2 applied cleanly.
Rejected hunk #3.
Hunk #4 applied cleanly.
diff a/devtools/git-log-fixes.sh b/devtools/git-log-fixes.sh	(rejected hunks)
@@ -33,14 +34,23 @@ while getopts h ARG ; do
 done
 shift $(($OPTIND - 1))
 [ $# -ge 1 ] || usage_error 'range argument required'
-range="$*"
+range="$1"
+branch="$2"
+
+if [ -z "$branch" ] ; then
+	# last commit in range
+	range_last=$(git log --oneline v21.05-rc3..v21.05 |head -n1|cut -d' ' -f1)
+	# use first branch contains the commit
+	refbranch=$(git branch --contains $range_last -r --sort=-authordate |head -n1)
+else
+	refbranch=$(git rev-parse --abbrev-ref $branch)
+fi
 
 # get major release version of a commit
 commit_version () # <hash>
 {
 	local VER="v*.*"
 	# use current branch as history reference
-	local refbranch=$(git rev-parse --abbrev-ref HEAD)
 	local tag=$( (git tag -l $VER --contains $1 --sort=creatordate --merged $refbranch 2>&- ||
 		# tag --merged option has been introduced in git 2.7.0
 		# below is a fallback in case of old git version