All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts: hide double git reference check error
@ 2016-08-29  8:35 Thomas Monjalon
  2016-09-13 14:45 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Monjalon @ 2016-08-29  8:35 UTC (permalink / raw)
  To: dev

When checking a git reference which does not exist, a git error
with the long git-branch usage is printed:

% scripts/check-git-log.sh '-1 3780cbd'
error: malformed object name 2de9f8551ff9
usage: git branch ...
  [a lot of lines]
Wrong 'Fixes' reference:
  Fixes: 2de9f8551ff9 ("ethdev: fix documentation for queue start/stop")

The error from the script is sufficient so the git error can be hidden.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 scripts/check-git-log.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/check-git-log.sh b/scripts/check-git-log.sh
index e416aea..6137098 100755
--- a/scripts/check-git-log.sh
+++ b/scripts/check-git-log.sh
@@ -180,7 +180,7 @@ IFS='
 fixtags=$(echo "$tags" | grep '^Fixes: ')
 bad=$(for fixtag in $fixtags ; do
 	hash=$(echo "$fixtag" | sed 's,^Fixes: \([0-9a-f]*\).*,\1,')
-	if git branch --contains $hash | grep -q '^\*' ; then
+	if git branch --contains $hash 2>&- | grep -q '^\*' ; then
 		good="Fixes: $hash "$(git log --format='("%s")' -1 $hash 2>&-)
 	else
 		good="reference not in current branch"
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] scripts: hide double git reference check error
  2016-08-29  8:35 [PATCH] scripts: hide double git reference check error Thomas Monjalon
@ 2016-09-13 14:45 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2016-09-13 14:45 UTC (permalink / raw)
  To: dev

2016-08-29 10:35, Thomas Monjalon:
> When checking a git reference which does not exist, a git error
> with the long git-branch usage is printed:
> 
> % scripts/check-git-log.sh '-1 3780cbd'
> error: malformed object name 2de9f8551ff9
> usage: git branch ...
>   [a lot of lines]
> Wrong 'Fixes' reference:
>   Fixes: 2de9f8551ff9 ("ethdev: fix documentation for queue start/stop")
> 
> The error from the script is sufficient so the git error can be hidden.
> 
> 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-09-13 14:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-29  8:35 [PATCH] scripts: hide double git reference check error Thomas Monjalon
2016-09-13 14:45 ` Thomas Monjalon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.