)]}'
{"functions.sh":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"71e62781ae84674708e008f5add462635a07faff","unresolved":false,"context_lines":[{"line_number":422,"context_line":"            elif [[ \"$base_branch\" \u003d\u003d stable/* ]]; then"},{"line_number":423,"context_line":"                # Look for an eol tag for the stable branch."},{"line_number":424,"context_line":"                eol_tag\u003d${base_branch#stable/}-eol"},{"line_number":425,"context_line":"                if git tag -l | grep \"$eol_tag\" \u003e /dev/null ; then"},{"line_number":426,"context_line":"                    git checkout $eol_tag"},{"line_number":427,"context_line":"                fi"},{"line_number":428,"context_line":"            else"}],"source_content_type":"text/x-sh","patch_set":1,"id":"1f485f77_edf69963","line":425,"range":{"start_line":425,"start_character":32,"end_line":425,"end_character":59},"updated":"2017-11-15 16:23:56.000000000","message":"grep -q suppresses output and just gives you the true/false exit code (no /dev/null needed):\n\n if git tag -l | grep -q \"$eol_tag\"; then\n\nAlternatively, git tag -l takes a pattern, so this could be:\n\n if [ $(git tag -l \"$eol_tag\") ]; then","commit_id":"402e0cd371876be366a502489c307f836e00ca80"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"787a65d330f5b96b99be0b11433b92dd27ae4305","unresolved":false,"context_lines":[{"line_number":422,"context_line":"            elif [[ \"$base_branch\" \u003d\u003d stable/* ]]; then"},{"line_number":423,"context_line":"                # Look for an eol tag for the stable branch."},{"line_number":424,"context_line":"                eol_tag\u003d${base_branch#stable/}-eol"},{"line_number":425,"context_line":"                if git tag -l | grep \"$eol_tag\" \u003e /dev/null ; then"},{"line_number":426,"context_line":"                    git checkout $eol_tag"},{"line_number":427,"context_line":"                fi"},{"line_number":428,"context_line":"            else"}],"source_content_type":"text/x-sh","patch_set":1,"id":"1f485f77_1f16b6a9","line":425,"range":{"start_line":425,"start_character":32,"end_line":425,"end_character":59},"in_reply_to":"1f485f77_0d65751e","updated":"2017-11-15 18:04:50.000000000","message":"\u003e Oh, if you do decide to use grep, fgrep would be a better choice -\n \u003e it won\u0027t interpret anything in the string as a regex like grep\n \u003e does.\n\nYou\u0027re worried about a tag with a \u0027.\u0027 in it, right? But we don\u0027t have eol tags with dots in them. I guess you\u0027re just future-proofing?","commit_id":"402e0cd371876be366a502489c307f836e00ca80"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5268bc09018d7eabbb1d60d6902c28779d01b66a","unresolved":false,"context_lines":[{"line_number":422,"context_line":"            elif [[ \"$base_branch\" \u003d\u003d stable/* ]]; then"},{"line_number":423,"context_line":"                # Look for an eol tag for the stable branch."},{"line_number":424,"context_line":"                eol_tag\u003d${base_branch#stable/}-eol"},{"line_number":425,"context_line":"                if git tag -l | grep \"$eol_tag\" \u003e /dev/null ; then"},{"line_number":426,"context_line":"                    git checkout $eol_tag"},{"line_number":427,"context_line":"                fi"},{"line_number":428,"context_line":"            else"}],"source_content_type":"text/x-sh","patch_set":1,"id":"1f485f77_a6755b66","line":425,"range":{"start_line":425,"start_character":32,"end_line":425,"end_character":59},"in_reply_to":"1f485f77_1f16b6a9","updated":"2017-11-15 20:38:07.000000000","message":"TBH I\u0027m mainly just being anal.  But yes, also future-proofing.  For instance, grep is gonna match substrings.  So if we named the \u0027s\u0027 release \u0027spike\u0027, grep pike-eol would match both pike-eol and spike-eol.\n\nAgree we don\u0027t (and likely won\u0027t) have -eol tags with periods, but we DO have version tags with periods.  E.g. 20.4.1 would also match 2014.1, which is a real tag in nova.  That seems like a good enough reason to be wary of regex matching.\n\nAnother super-anal reason is \"performance\": git tag | grep runs two processes, whereas the way you\u0027ve got it now only runs one.","commit_id":"402e0cd371876be366a502489c307f836e00ca80"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0c1e9dc9236d2d3ab01f2a41714cbd337e5bbf5e","unresolved":false,"context_lines":[{"line_number":422,"context_line":"            elif [[ \"$base_branch\" \u003d\u003d stable/* ]]; then"},{"line_number":423,"context_line":"                # Look for an eol tag for the stable branch."},{"line_number":424,"context_line":"                eol_tag\u003d${base_branch#stable/}-eol"},{"line_number":425,"context_line":"                if git tag -l | grep \"$eol_tag\" \u003e /dev/null ; then"},{"line_number":426,"context_line":"                    git checkout $eol_tag"},{"line_number":427,"context_line":"                fi"},{"line_number":428,"context_line":"            else"}],"source_content_type":"text/x-sh","patch_set":1,"id":"1f485f77_0d65751e","line":425,"range":{"start_line":425,"start_character":32,"end_line":425,"end_character":59},"in_reply_to":"1f485f77_edf69963","updated":"2017-11-15 16:25:57.000000000","message":"Oh, if you do decide to use grep, fgrep would be a better choice - it won\u0027t interpret anything in the string as a regex like grep does.","commit_id":"402e0cd371876be366a502489c307f836e00ca80"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"71e62781ae84674708e008f5add462635a07faff","unresolved":false,"context_lines":[{"line_number":423,"context_line":"                # Look for an eol tag for the stable branch."},{"line_number":424,"context_line":"                eol_tag\u003d${base_branch#stable/}-eol"},{"line_number":425,"context_line":"                if git tag -l | grep \"$eol_tag\" \u003e /dev/null ; then"},{"line_number":426,"context_line":"                    git checkout $eol_tag"},{"line_number":427,"context_line":"                fi"},{"line_number":428,"context_line":"            else"},{"line_number":429,"context_line":"                git checkout master"}],"source_content_type":"text/x-sh","patch_set":1,"id":"1f485f77_8d8a85bc","line":426,"range":{"start_line":426,"start_character":33,"end_line":426,"end_character":41},"updated":"2017-11-15 16:23:56.000000000","message":"Probably no reason to quote this on L425, but if you\u0027re gonna do it, it should also be done here and on the rhs of the assignment on L424.","commit_id":"402e0cd371876be366a502489c307f836e00ca80"}]}
