)]}'
{"scripts/pull-tools":[{"author":{"_account_id":9453,"name":"James Polley","email":"jp@jamezpolley.com","username":"tchaypo"},"change_message_id":"4f5f0cc711b73c5920414163f93b0e78b1f88505","unresolved":false,"context_lines":[{"line_number":61,"context_line":"            echo \"***************************************\""},{"line_number":62,"context_line":"        fi"},{"line_number":63,"context_line":"        # For the manifest, LOCATION is now what we have checked out"},{"line_number":64,"context_line":"        LOCATION\u003d$(git config remote.origin.url)"},{"line_number":65,"context_line":"    fi"},{"line_number":66,"context_line":"    echo -n $TRIPLEO_ROOT/$TOOL_BASE:"},{"line_number":67,"context_line":"    cd $TRIPLEO_ROOT/$TOOL_BASE"}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"AAAAXH%2F%2F%2FRA%3D","line":64,"updated":"2014-04-16 02:31:55.000000000","message":"I\u0027m not clear on why the assumption that we remote in use is \"origin\" at this point.\n\nFor instance, if I\u0027m understanding the goal of this change, if I\u0027ve run git review -d, knowing the particular commit that\u0027s checked out is probably more useful than knowing what remote.origin is pointing at.","commit_id":"548f926dd6f315793a92a38b064d312a913696f5"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"73af9bd7319ed9f03d8b1b23c948fc2928344ead","unresolved":false,"context_lines":[{"line_number":61,"context_line":"            echo \"***************************************\""},{"line_number":62,"context_line":"        fi"},{"line_number":63,"context_line":"        # For the manifest, LOCATION is now what we have checked out"},{"line_number":64,"context_line":"        LOCATION\u003d$(git config remote.origin.url)"},{"line_number":65,"context_line":"    fi"},{"line_number":66,"context_line":"    echo -n $TRIPLEO_ROOT/$TOOL_BASE:"},{"line_number":67,"context_line":"    cd $TRIPLEO_ROOT/$TOOL_BASE"}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"AAAAXX%2F%2F%2F0E%3D","line":64,"in_reply_to":"AAAAXH%2F%2F%2FRA%3D","updated":"2014-04-24 18:50:41.000000000","message":"+1, good point. The entirety of what you need to know ought to be contained within the commit sha which is being captured below. A branch name might be useful too i suppose, if you have run git review -d.\n\nbut, remote.origin.url might just be completely unrelated, so we should probably avoid that","commit_id":"548f926dd6f315793a92a38b064d312a913696f5"},{"author":{"_account_id":215,"name":"Jon-Paul Sullivan","email":"j3p0uk@hotmail.com","username":"jonpaul-sullivan"},"change_message_id":"a1f6ca0cc69b46c2ffc545748107e4c2e02af83e","unresolved":false,"context_lines":[{"line_number":61,"context_line":"            echo \"***************************************\""},{"line_number":62,"context_line":"        fi"},{"line_number":63,"context_line":"        # For the manifest, LOCATION is now what we have checked out"},{"line_number":64,"context_line":"        LOCATION\u003d$(git config remote.origin.url)"},{"line_number":65,"context_line":"    fi"},{"line_number":66,"context_line":"    echo -n $TRIPLEO_ROOT/$TOOL_BASE:"},{"line_number":67,"context_line":"    cd $TRIPLEO_ROOT/$TOOL_BASE"}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"9ad9bd40_ed6670ba","line":64,"in_reply_to":"AAAAXX%2F%2F%2F0E%3D","updated":"2014-05-06 20:46:34.000000000","message":"Good points.  My code was based on the CI use-case where things are clean, not the developer use-case where any old code under development could exist in the tools repository.\n\nSo - to get back to the intention of this patch.  It is solely to attempt to accurately record the code that we are building with in the manifest.\n\nI should be able to figure out what branch we are on, and pull the remote for that branch.  I\u0027ll update to do so...","commit_id":"548f926dd6f315793a92a38b064d312a913696f5"},{"author":{"_account_id":9453,"name":"James Polley","email":"jp@jamezpolley.com","username":"tchaypo"},"change_message_id":"4f5f0cc711b73c5920414163f93b0e78b1f88505","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    git --no-pager log -1 --pretty\u003doneline"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    # Write the manifest entry"},{"line_number":71,"context_line":"    echo \"$TOOL_BASE git $TRIPLEO_ROOT/$TOOL_BASE $LOCATION $(git rev-parse HEAD)\" \u003e\u003e $GIT_MANIFEST"},{"line_number":72,"context_line":"done"}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"AAAAXH%2F%2F%2FT8%3D","line":71,"updated":"2014-04-16 02:31:55.000000000","message":"I would prefer to avoid duplicating TOOL_BASE here\n\nRather than trampling on $LOCATION up on line 64 for reasons that aren\u0027t clear on that line, would it be possible to use $(git config remote.origin.url) in-line here? I\u0027m still not sureif we need to record that, but if we do, I\u0027d prefer to do it close to where it\u0027s used.","commit_id":"548f926dd6f315793a92a38b064d312a913696f5"},{"author":{"_account_id":215,"name":"Jon-Paul Sullivan","email":"j3p0uk@hotmail.com","username":"jonpaul-sullivan"},"change_message_id":"a1f6ca0cc69b46c2ffc545748107e4c2e02af83e","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    git --no-pager log -1 --pretty\u003doneline"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    # Write the manifest entry"},{"line_number":71,"context_line":"    echo \"$TOOL_BASE git $TRIPLEO_ROOT/$TOOL_BASE $LOCATION $(git rev-parse HEAD)\" \u003e\u003e $GIT_MANIFEST"},{"line_number":72,"context_line":"done"}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"9ad9bd40_2d33f8ab","line":71,"in_reply_to":"AAAAXH%2F%2F%2FT8%3D","updated":"2014-05-06 20:46:34.000000000","message":"The reason I include $TOOL_BASE is to align the format of the file to that produced from the source-repositories element.\n\nAlso - I think I\u0027ll use code to more accurately deterime the remot in use and use that here, which should resolve your issue here, I hope :)","commit_id":"548f926dd6f315793a92a38b064d312a913696f5"},{"author":{"_account_id":9369,"name":"Steve Kowalik","email":"steven@wedontsleep.org","username":"stevenk"},"change_message_id":"6001e54c9c3f0b667f0764271530acbde81aed1a","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    # Write the manifest entry"},{"line_number":69,"context_line":"    # Make a best guess at the branch to get the remote in use"},{"line_number":70,"context_line":"    branch\u003d$(git symbolic-ref -q HEAD)"},{"line_number":71,"context_line":"    if [[ $? \u003d\u003d 1 ]] ; then"},{"line_number":72,"context_line":"        # We are on a non-symbolic reference - try the first branch containing this ref"},{"line_number":73,"context_line":"        branch\u003d$(git branch --contains HEAD | grep -v \u0027(no branch)\u0027 | head -1 | tr -d \u0027 \u0027)"},{"line_number":74,"context_line":"    else"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"7adec928_ead8851f","line":71,"updated":"2014-05-09 06:59:09.000000000","message":"if [ $? \u003d 1 ]; then\n\n[[ ]] is a pointless bashism, and \u003d\u003d is actually a substring match.","commit_id":"1f3479e48927195c9d64adeaf253e51086338086"},{"author":{"_account_id":215,"name":"Jon-Paul Sullivan","email":"j3p0uk@hotmail.com","username":"jonpaul-sullivan"},"change_message_id":"e615c6ca9014c60cc5ac557eb535929ba173380e","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    # Write the manifest entry"},{"line_number":69,"context_line":"    # Make a best guess at the branch to get the remote in use"},{"line_number":70,"context_line":"    branch\u003d$(git symbolic-ref -q HEAD)"},{"line_number":71,"context_line":"    if [[ $? \u003d\u003d 1 ]] ; then"},{"line_number":72,"context_line":"        # We are on a non-symbolic reference - try the first branch containing this ref"},{"line_number":73,"context_line":"        branch\u003d$(git branch --contains HEAD | grep -v \u0027(no branch)\u0027 | head -1 | tr -d \u0027 \u0027)"},{"line_number":74,"context_line":"    else"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"7adec928_575e81e7","line":71,"in_reply_to":"7adec928_ead8851f","updated":"2014-05-09 09:05:18.000000000","message":"[[ is different to [.\n\nSee http://stackoverflow.com/questions/669452/is-preferable-over-in-bash-scripts which also has a couple of good links in the answer as to the variances between [ and [[, which gives some good reasons to use [[ instead of [ imho.\n\nThe substring match should change though, you are right - thanks.","commit_id":"1f3479e48927195c9d64adeaf253e51086338086"},{"author":{"_account_id":9369,"name":"Steve Kowalik","email":"steven@wedontsleep.org","username":"stevenk"},"change_message_id":"6001e54c9c3f0b667f0764271530acbde81aed1a","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        branch\u003d${branch##refs/heads/}"},{"line_number":77,"context_line":"    fi"},{"line_number":78,"context_line":"    branch_remote\u003d$(git config remote.$(git config branch.${branch}.remote).url)"},{"line_number":79,"context_line":"    branch_remote\u003d${branch_remote:-\"unknown\"}"},{"line_number":80,"context_line":"    echo \"$TOOL_BASE git $TRIPLEO_ROOT/$TOOL_BASE $branch_remote $(git rev-parse HEAD)\" \u003e\u003e $GIT_MANIFEST"},{"line_number":81,"context_line":"done"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"7adec928_6a04757b","line":79,"updated":"2014-05-09 06:59:09.000000000","message":"These could be combined onto one line, but it may not be pretty.","commit_id":"1f3479e48927195c9d64adeaf253e51086338086"},{"author":{"_account_id":215,"name":"Jon-Paul Sullivan","email":"j3p0uk@hotmail.com","username":"jonpaul-sullivan"},"change_message_id":"e615c6ca9014c60cc5ac557eb535929ba173380e","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        branch\u003d${branch##refs/heads/}"},{"line_number":77,"context_line":"    fi"},{"line_number":78,"context_line":"    branch_remote\u003d$(git config remote.$(git config branch.${branch}.remote).url)"},{"line_number":79,"context_line":"    branch_remote\u003d${branch_remote:-\"unknown\"}"},{"line_number":80,"context_line":"    echo \"$TOOL_BASE git $TRIPLEO_ROOT/$TOOL_BASE $branch_remote $(git rev-parse HEAD)\" \u003e\u003e $GIT_MANIFEST"},{"line_number":81,"context_line":"done"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"7adec928_d7ee11ec","line":79,"in_reply_to":"7adec928_6a04757b","updated":"2014-05-09 09:05:18.000000000","message":"That would likely make the line too long for style, and I\u0027m not even sure that it\u0027s possible, so let\u0027s agree not to try shall we :D","commit_id":"1f3479e48927195c9d64adeaf253e51086338086"},{"author":{"_account_id":9369,"name":"Steve Kowalik","email":"steven@wedontsleep.org","username":"stevenk"},"change_message_id":"383aa07cae4b8c8785a58d8bd4751a55ab8f036c","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    # Write the manifest entry"},{"line_number":69,"context_line":"    # Make a best guess at the branch to get the remote in use"},{"line_number":70,"context_line":"    branch\u003d$(git symbolic-ref -q HEAD)"},{"line_number":71,"context_line":"    if [[ $? -eq 1 ]] ; then"},{"line_number":72,"context_line":"        # We are on a non-symbolic reference - try the first branch containing this ref"},{"line_number":73,"context_line":"        branch\u003d$(git branch --contains HEAD | grep -v \u0027(no branch)\u0027 | head -1 | tr -d \u0027 \u0027)"},{"line_number":74,"context_line":"    else"}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"7adec928_816d0307","line":71,"updated":"2014-05-23 05:24:37.000000000","message":"This can be collapsed into\n\nif branch\u003d$(git symbolic-ref -q HEAD); then\n\nBut if you do so, it flips the test, so the if and then else blocks also need to be flipped.","commit_id":"975a935d59cfe90bbef1b50d9125f9ea8a2ead9b"},{"author":{"_account_id":1926,"name":"Derek Higgins","email":"derekh@redhat.com","username":"derekh"},"change_message_id":"2eca157274c9b65bdf6d293af573caf6877bafeb","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        # Strip the leading refs/heads"},{"line_number":76,"context_line":"        branch\u003d${branch##refs/heads/}"},{"line_number":77,"context_line":"    fi"},{"line_number":78,"context_line":"    branch_remote\u003d$(git config remote.$(git config branch.${branch}.remote).url)"},{"line_number":79,"context_line":"    branch_remote\u003d${branch_remote:-\"unknown\"}"},{"line_number":80,"context_line":"    echo \"$TOOL_BASE git $TRIPLEO_ROOT/$TOOL_BASE $branch_remote $(git rev-parse HEAD)\" \u003e\u003e $GIT_MANIFEST"},{"line_number":81,"context_line":"done"}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"1ae5cdf2_a1e7a8e3","line":78,"updated":"2014-05-30 10:59:20.000000000","message":"I cherry-picked this patch into a branch to test it, the script is erring out at this line.\n\n    + branch\u003dpp\n    +++ git config branch.pp.remote\n    ++ git config remote..url\n    + branch_remote\u003d\n\nI think this is a valid use case that should work.","commit_id":"975a935d59cfe90bbef1b50d9125f9ea8a2ead9b"},{"author":{"_account_id":215,"name":"Jon-Paul Sullivan","email":"j3p0uk@hotmail.com","username":"jonpaul-sullivan"},"change_message_id":"ebbafe4383e8625bfc742f6f91b2674aba4bc026","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        # Strip the leading refs/heads"},{"line_number":76,"context_line":"        branch\u003d${branch##refs/heads/}"},{"line_number":77,"context_line":"    fi"},{"line_number":78,"context_line":"    branch_remote\u003d$(git config remote.$(git config branch.${branch}.remote).url)"},{"line_number":79,"context_line":"    branch_remote\u003d${branch_remote:-\"unknown\"}"},{"line_number":80,"context_line":"    echo \"$TOOL_BASE git $TRIPLEO_ROOT/$TOOL_BASE $branch_remote $(git rev-parse HEAD)\" \u003e\u003e $GIT_MANIFEST"},{"line_number":81,"context_line":"done"}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"1ae5cdf2_0a40d032","line":78,"in_reply_to":"1ae5cdf2_611504e4","updated":"2014-06-04 17:13:34.000000000","message":"Done","commit_id":"975a935d59cfe90bbef1b50d9125f9ea8a2ead9b"},{"author":{"_account_id":215,"name":"Jon-Paul Sullivan","email":"j3p0uk@hotmail.com","username":"jonpaul-sullivan"},"change_message_id":"4186bc716f8346d250ff7d87d396c3415c6caa5b","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        # Strip the leading refs/heads"},{"line_number":76,"context_line":"        branch\u003d${branch##refs/heads/}"},{"line_number":77,"context_line":"    fi"},{"line_number":78,"context_line":"    branch_remote\u003d$(git config remote.$(git config branch.${branch}.remote).url)"},{"line_number":79,"context_line":"    branch_remote\u003d${branch_remote:-\"unknown\"}"},{"line_number":80,"context_line":"    echo \"$TOOL_BASE git $TRIPLEO_ROOT/$TOOL_BASE $branch_remote $(git rev-parse HEAD)\" \u003e\u003e $GIT_MANIFEST"},{"line_number":81,"context_line":"done"}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"1ae5cdf2_611504e4","line":78,"in_reply_to":"1ae5cdf2_a1e7a8e3","updated":"2014-06-04 14:20:57.000000000","message":"I can\u0027t see from that what your use case is?","commit_id":"975a935d59cfe90bbef1b50d9125f9ea8a2ead9b"},{"author":{"_account_id":4330,"name":"Tomas Sedovic","email":"tsedovic@redhat.com","username":"tomas-8c8"},"change_message_id":"22ba36cbefa108dc4b0556603c68ed40f8f292ec","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    # Write the manifest entry"},{"line_number":75,"context_line":"    # Make a best guess at the branch to get the remote in use"},{"line_number":76,"context_line":"    branch\u003d$(git symbolic-ref -q HEAD)"},{"line_number":77,"context_line":"    if [[ $? -eq 1 ]] ; then"},{"line_number":78,"context_line":"        # We are on a non-symbolic reference - try the first branch containing this ref"},{"line_number":79,"context_line":"        branch\u003d$(git branch --contains HEAD | grep -v \u0027(no branch)\u0027 | head -1 | tr -d \u0027 \u0027)"},{"line_number":80,"context_line":"    else"}],"source_content_type":"application/x-shellscript","patch_set":5,"id":"1ae5cdf2_99be26ad","line":77,"updated":"2014-06-11 12:38:16.000000000","message":"I\u0027m not against `[[ ... ]]`, but a quick look at the repo shows that `[ ... ]` vastly outnumbers it.\n\nThen again, this script is `!/bin/bash` and we\u0027ve previously agreed that it\u0027s not worth the effort making these work outside of bash. I\u0027m fine with this as is.","commit_id":"7ef17222cea75caa46e85ed4cc6a795b4060b6af"},{"author":{"_account_id":9453,"name":"James Polley","email":"jp@jamezpolley.com","username":"tchaypo"},"change_message_id":"b6fedc0e878a4a1a3af907c3d77fadfa9eea865a","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        # Strip the leading refs/heads"},{"line_number":82,"context_line":"        branch\u003d${branch##refs/heads/}"},{"line_number":83,"context_line":"    fi"},{"line_number":84,"context_line":"    [[ -z \"$(git config branch.${branch}.remote)\" ]] ||\\"},{"line_number":85,"context_line":"        branch_remote\u003d$(git config remote.$(git config branch.${branch}.remote).url)"},{"line_number":86,"context_line":"    branch_remote\u003d${branch_remote:-\"unknown\"}"},{"line_number":87,"context_line":"    echo \"$TOOL_BASE git $TRIPLEO_ROOT/$TOOL_BASE $branch_remote $(git rev-parse HEAD)\" \u003e\u003e $GIT_MANIFEST"}],"source_content_type":"application/x-shellscript","patch_set":5,"id":"1ae5cdf2_44ca841b","line":84,"updated":"2014-06-16 01:55:28.000000000","message":"This (long, continued, nested punctuation-heavy) line makes my eyes glaze over.\n\nI\u0027d prefer to see it split into a series of simpler lines if that\u0027s possible, but my preference isn\u0027t strong enough for me to give it a -1.","commit_id":"7ef17222cea75caa46e85ed4cc6a795b4060b6af"}]}
