Skip to content

Commit

Permalink
fix rv
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier Refalo committed Jan 24, 2014
1 parent bf0bccb commit 90014e2
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions fish/g2.fish
Expand Up @@ -820,14 +820,7 @@ function __g2_sync --argument-names flag
end end


set -l branch (command git rev-parse --symbolic-full-name --abbrev-ref HEAD) set -l branch (command git rev-parse --symbolic-full-name --abbrev-ref HEAD)

# count the number of changes in/out
#set -l tmpfile "/tmp/delta$RANDOM"

set -l count (command git rev-list --left-right --count "$branch...$remote" -- ^/dev/null |tr \t \n) set -l count (command git rev-list --left-right --count "$branch...$remote" -- ^/dev/null |tr \t \n)


# command git rev-list --left-right "$branch...$remote" -- ^ /dev/null > "$tmpfile"
set -l lchg $count[1] set -l lchg $count[1]
set -l rchg $count[2] set -l rchg $count[2]


Expand All @@ -854,6 +847,16 @@ function __g2_sync --argument-names flag
return 0; return 0;
end end


function __g2_rv

command git rev-parse; or return 1
__g2_iswip; or return 1
__g2_isdirty; or return 1

command git revert $argv

end

function __g2_mg function __g2_mg


command git rev-parse; or return 1 command git rev-parse; or return 1
Expand Down Expand Up @@ -1164,4 +1167,4 @@ end


set GIT_EXE (which git) set GIT_EXE (which git)
test ! "$GIT_EXE"; and __g2_fatal "Sorry, git is a required G2 dependency and must be in the PATH" test ! "$GIT_EXE"; and __g2_fatal "Sorry, git is a required G2 dependency and must be in the PATH"
set -x GIT_EXE set -x GIT_EXE

0 comments on commit 90014e2

Please sign in to comment.