)]}'
{"tools/check-cherry-picks.sh":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"08d336663a1936fd173c1ed5cad882573957d9c6","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"# Check if the patch is a merge patch by counting the number of parents."},{"line_number":10,"context_line":"# If the patch has 2 parents, then the 2nd parent is the patch we want"},{"line_number":11,"context_line":"# to validate."},{"line_number":12,"context_line":"parent_number\u003d$(git show --format\u003d\u0027%P\u0027 --quiet | awk \u0027{print NF}\u0027)"},{"line_number":13,"context_line":"if [ $parent_number -eq 2 ]; then"},{"line_number":14,"context_line":"    commit_hash\u003d$(git show --format\u003d\u0027%P\u0027 --quiet | awk \u0027{print $NF}\u0027)"}],"source_content_type":"text/x-sh","patch_set":1,"id":"bf51134e_33e343a6","line":11,"updated":"2020-06-26 20:24:42.000000000","message":"The second ascii diagram in the git-merge man page [1] seems to show why it\u0027s always the 2nd parent that we want (A is the first parent, C is the second parent):\n\n      A---B---C topic\n     /         \\\nD---E---F---G---H master\n\n[1] https://linux.die.net/man/1/git-merge","commit_id":"c7c48c6f52c9159767b60a4576ba37726156a5f7"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"51ce1a804cc73b4aa692604af332011c3b1c4f79","unresolved":false,"context_lines":[{"line_number":9,"context_line":"# Check if the patch is a merge patch by counting the number of parents."},{"line_number":10,"context_line":"# If the patch has 2 parents, then the 2nd parent is the patch we want"},{"line_number":11,"context_line":"# to validate."},{"line_number":12,"context_line":"parent_number\u003d$(git show --format\u003d\u0027%P\u0027 --quiet | awk \u0027{print NF}\u0027)"},{"line_number":13,"context_line":"if [ $parent_number -eq 2 ]; then"},{"line_number":14,"context_line":"    commit_hash\u003d$(git show --format\u003d\u0027%P\u0027 --quiet | awk \u0027{print $NF}\u0027)"},{"line_number":15,"context_line":"fi"}],"source_content_type":"text/x-sh","patch_set":1,"id":"bf51134e_33f2239b","line":12,"updated":"2020-06-26 20:08:23.000000000","message":"Note to self: NF (without the $) is the number of fields in the current record.\n\nExample with two parents:\n\n$ git show --format\u003d\u0027%P\u0027 --quiet\nf644da10b28336496fe8f59d43fcdb3a77d7ea13 a45daafd3111a6804eb5adafe4860db122cb09b8\n\nthen\n\n$ git show --format\u003d\u0027%P\u0027 --quiet | awk \u0027{print NF}\u0027\n2","commit_id":"c7c48c6f52c9159767b60a4576ba37726156a5f7"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"51ce1a804cc73b4aa692604af332011c3b1c4f79","unresolved":false,"context_lines":[{"line_number":11,"context_line":"# to validate."},{"line_number":12,"context_line":"parent_number\u003d$(git show --format\u003d\u0027%P\u0027 --quiet | awk \u0027{print NF}\u0027)"},{"line_number":13,"context_line":"if [ $parent_number -eq 2 ]; then"},{"line_number":14,"context_line":"    commit_hash\u003d$(git show --format\u003d\u0027%P\u0027 --quiet | awk \u0027{print $NF}\u0027)"},{"line_number":15,"context_line":"fi"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"hashes\u003d$(git show --format\u003d\u0027%b\u0027 --quiet $commit_hash | sed -nr \u0027s/^.cherry picked from commit (.*).$/\\1/p\u0027)"}],"source_content_type":"text/x-sh","patch_set":1,"id":"bf51134e_b333d361","line":14,"updated":"2020-06-26 20:08:23.000000000","message":"Note to self: $NF (with the $) is the last field in the current record.\n\nExample with two parents:\n\n$ git show --format\u003d\u0027%P\u0027 --quiet\nf644da10b28336496fe8f59d43fcdb3a77d7ea13 a45daafd3111a6804eb5adafe4860db122cb09b8\n\nthen\n\n$ git show --format\u003d\u0027%P\u0027 --quiet | awk \u0027{print $NF}\u0027\na45daafd3111a6804eb5adafe4860db122cb09b8","commit_id":"c7c48c6f52c9159767b60a4576ba37726156a5f7"}]}
