@@ -30,32 +30,41 @@ function rename() {
3030 mv " $2 " " $1 "
3131}
3232
33- # Add Airbnb git remote
34- if [[ -z $( git remote -v | grep -e " $AIRBNB_REMOTE \s\+$AIRBNB_GIT \s\+(fetch)" ) ]]; then
35- git remote add " $AIRBNB_REMOTE " " $AIRBNB_GIT "
36- fi
33+ function difftool() {
34+ git difftool --prompt " $COMPARATE_BRANCH "
35+ }
3736
38- # Stash any existing changes before diffing
39- git stash save " $STASH_MESSAGE "
37+ if [[ " $1 " != " --continue" ]]; then
38+ # Add Airbnb git remote
39+ if [[ -z $( git remote -v | grep -e " $AIRBNB_REMOTE \s\+$AIRBNB_GIT \s\+(fetch)" ) ]]; then
40+ git remote add " $AIRBNB_REMOTE " " $AIRBNB_GIT "
41+ fi
4042
41- # Checkout working branch
42- checkout " $WORKING_BRANCH "
43+ # Stash any existing changes before diffing
44+ git stash save " $STASH_MESSAGE "
4345
44- # Fetch Airbnb changes
45- git fetch " $AIRBNB_REMOTE " " $REMOTE_BRANCH "
46+ # Checkout working branch
47+ checkout " $WORKING_BRANCH "
4648
47- # Checkout Airbnb remote branch
48- checkout " $COMPARATE_BRANCH " " $AIRBNB_REMOTE / $REMOTE_BRANCH "
49+ # Fetch Airbnb changes
50+ git fetch " $AIRBNB_REMOTE " " $REMOTE_BRANCH "
4951
50- # Rename eslint-config-airbnb to eslint-config-hubspot for diffing
51- rename " $ESLINT_HUBSPOT " " $ESLINT_AIRBNB "
52+ # Checkout Airbnb remote branch
53+ checkout " $COMPARATE_BRANCH " " $AIRBNB_REMOTE / $REMOTE_BRANCH "
5254
53- # Commit rename for diffing
54- git add " $ESLINT_AIRBNB " " $ESLINT_HUBSPOT "
55- git commit -m " $COMMIT_MESSAGE "
55+ # Rename eslint-config-airbnb to eslint-config-hubspot for diffing
56+ rename " $ESLINT_HUBSPOT " " $ESLINT_AIRBNB "
5657
57- # Checkout last branch to begin diffing
58- git checkout " $WORKING_BRANCH "
58+ # Commit rename for diffing
59+ git add " $ESLINT_AIRBNB " " $ESLINT_HUBSPOT "
60+ git commit -m " $COMMIT_MESSAGE "
5961
60- # Begin diffing
61- git difftool --prompt " $COMPARATE_BRANCH "
62+ # Checkout last branch to begin diffing
63+ git checkout " $WORKING_BRANCH "
64+
65+ # Begin diffing
66+ difftool
67+ else
68+ # Continue difftool
69+ difftool
70+ fi
0 commit comments