Fix bug-id extraction in compare-bug-version-and-git-branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The bug-id extraction method in the compare-bug-version-and-git-branch
was buggy. Which lead to some valid changes being marked as invalid.
[1],[2]

The following snippet was used
```
BUG=$(git show --name-only --format=email | grep -i '^BUG: ' | cut -f2
-d ' ' | tail -1)
```

The problem is with the usage of `cut`, which as used here cannot
handle multiple whitespace between 'BUG: ' and the ID.

I'll replac `cut` with `awk` which should work better. The snippet now
looks like
```
BUG=$(git show --name-only --format=email | awk '{IGNORECASE=1}
/^BUG:/{print $2}' | tail -1)
```
This should work much better.

~kaushal

[1]: https://review.gluster.org/10797
[2]: https://review.gluster.org/10849
_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://www.gluster.org/mailman/listinfo/gluster-devel




[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux