* [dpdk-dev] [PATCH] scripts: check fixed commit branch
@ 2016-06-29 14:47 Thomas Monjalon
2016-07-01 14:06 ` Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Monjalon @ 2016-06-29 14:47 UTC (permalink / raw)
To: dev
The commit id of a fixed commit must be in the current branch.
It avoids referencing a local branch or a next-* branch when
pushing in the master.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
scripts/check-git-log.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/check-git-log.sh b/scripts/check-git-log.sh
index 9a0d068..7d2c7ee 100755
--- a/scripts/check-git-log.sh
+++ b/scripts/check-git-log.sh
@@ -140,7 +140,11 @@ IFS='
fixtags=$(echo "$tags" | grep '^Fixes: ')
bad=$(for fixtag in $fixtags ; do
hash=$(echo "$fixtag" | sed 's,^Fixes: \([0-9a-f]*\).*,\1,')
- good="Fixes: $hash "$(git log --format='("%s")' -1 $hash 2>&-)
+ if git branch --contains $hash | grep -q '^\*' ; then
+ good="Fixes: $hash "$(git log --format='("%s")' -1 $hash 2>&-)
+ else
+ good="reference not in current branch"
+ fi
printf "$fixtag" | grep -v "^$good$"
done | sed 's,^,\t,')
[ -z "$bad" ] || printf "Wrong 'Fixes' reference:\n$bad\n"
--
2.7.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] scripts: check fixed commit branch
2016-06-29 14:47 [dpdk-dev] [PATCH] scripts: check fixed commit branch Thomas Monjalon
@ 2016-07-01 14:06 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2016-07-01 14:06 UTC (permalink / raw)
To: dev
2016-06-29 16:47, Thomas Monjalon:
> The commit id of a fixed commit must be in the current branch.
> It avoids referencing a local branch or a next-* branch when
> pushing in the master.
>
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-01 14:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-29 14:47 [dpdk-dev] [PATCH] scripts: check fixed commit branch Thomas Monjalon
2016-07-01 14:06 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).