Skip to content

Instantly share code, notes, and snippets.

@ryanflorence
Created October 19, 2011 17:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanflorence/1299047 to your computer and use it in GitHub Desktop.
Save ryanflorence/1299047 to your computer and use it in GitHub Desktop.
Open gerrit commit
#!/bin/bash
open "https://gerrit.instructure.com/#q,$(git log --grep='^Change-Id: ' -1|\
grep 'Change-Id: '|head -n 1|sed 's/Change-Id://'|sed 's/ //g'),n,z"
@ryanflorence
Copy link
Author

I'm sure a neckbeard could do this in one line of bash. I welcome the code.

Anyway, I put this in my path as just gerrit. So in the terminal I simply type gerrit and it opens up in my browser.

@ryanflorence
Copy link
Author

Thanks to @jtolds for the neckbeard version.

@jtolio
Copy link

jtolio commented Oct 19, 2011

lol

@bracken
Copy link

bracken commented Feb 1, 2012

+1 neckbeards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment