Print ${remote}:${head} in link for code review
authorKevin Klues <klueska@cs.berkeley.edu>
Wed, 25 Nov 2015 15:12:12 +0000 (07:12 -0800)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 3 Dec 2015 17:38:20 +0000 (12:38 -0500)
Previously I was showing urls of the sort:
https://github.com/brho/akaros/compare/abe793d...0780d03

which was fine, except that if I ever did a 'push -f' to update a
branch, the link wouldn't reflect the state of the branch anymore. This
commit changes the link to e.g.:

https://github.com/brho/akaros/compare/abe793d...klueska:corealloc-packed

which will reflect the newest changes to the branch.

Signed-off-by: Kevin Klues <klueska@cs.berkeley.edu>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
scripts/ak-scripts/ak-code-review.sh

index ccff630..4a5325b 100644 (file)
@@ -32,9 +32,8 @@ function gen_request()
 {
        # Set some local variables
        local base_sha1=$(git rev-parse ${base})
-       local head_sha1=$(git rev-parse ${head})
+       local head_sha1=${remote}:${head}
        base_sha1=${base_sha1:0:7}
-       head_sha1=${head_sha1:0:7}
 
        # Get the text from a git request-pull
     request=$(git request-pull ${patch} ${base} ${remote} ${head});