Skip to content

Instantly share code, notes, and snippets.

@mpiette
Created September 2, 2016 16:09
Show Gist options
  • Select an option

  • Save mpiette/3157bde6a26373b66b8ffe8f719ba4be to your computer and use it in GitHub Desktop.

Select an option

Save mpiette/3157bde6a26373b66b8ffe8f719ba4be to your computer and use it in GitHub Desktop.
fast-diff
function reviewnow {
git checkout -b quickdiff-$(date "+%Y-%m-%dT%H-%M-%S")
git commit -a -m "$1"
arc diff --verbatim --allow-untracked --reviewers $2
}
Usage: Edit some files when on master, leaving them modified but not added; then run reviewnow msg reviewer. Here's an example:
$ git branch
* master
$ <edit some files>
$ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: settings.py
#
no changes added to commit (use "git add" and/or "git commit -a")
$ reviewnow 'Put previous-import detection variable in a better place' usmanm
...
Created:
http://phabricator.locu.com/D1195
$ git branch
master
* quickdiff-2013-03-29T23-44-54
$ arc land # as usual
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment