diff options
| author | typebrook <typebrook@gmail.com> | 2019-04-18 10:48:30 +0800 |
|---|---|---|
| committer | typebrook <typebrook@gmail.com> | 2019-04-18 10:48:30 +0800 |
| commit | 8b2aa66c644e7bf1e2bc129b84da4603f52cae1f (patch) | |
| tree | 022974192c4785dd24a20ca9f0b1097088546930 | |
| parent | 1b5b5344a615c7779a2833fb062dac8f33cee397 (diff) | |
update
| -rw-r--r-- | script/sync.sh | 20 | ||||
| -rw-r--r-- | tigrc | 3 |
2 files changed, 23 insertions, 0 deletions
diff --git a/script/sync.sh b/script/sync.sh index 64f6a65..a555869 100644 --- a/script/sync.sh +++ b/script/sync.sh | |||
| @@ -1,2 +1,22 @@ | |||
| 1 | check_upstream() { | ||
| 2 | |||
| 3 | head='dev' | ||
| 4 | if [ $# -eq 2 ] | ||
| 5 | then | ||
| 6 | head=$2 | ||
| 7 | fi | ||
| 8 | |||
| 9 | cd ~/$1 | ||
| 10 | git fetch origin && \ | ||
| 11 | git rev-list $head | grep $(git rev-parse origin/master) > /dev/null | ||
| 12 | |||
| 13 | if [ $? -ne 0 ] | ||
| 14 | then | ||
| 15 | echo "New commit at" $1 | ||
| 16 | fi | ||
| 17 | } | ||
| 18 | |||
| 1 | cd ~/git/settings && git pull --quiet & | 19 | cd ~/git/settings && git pull --quiet & |
| 2 | cd ~/vimwiki && git pull --quiet & | 20 | cd ~/vimwiki && git pull --quiet & |
| 21 | check_upstream git/tig & | ||
| 22 | check_upstream .vim_runtime & | ||
| @@ -208,6 +208,9 @@ bind tree d ?rm %(file) | |||
| 208 | bind tree m >tig %(file) | 208 | bind tree m >tig %(file) |
| 209 | 209 | ||
| 210 | bind tree xt +sh -c "git rev-parse %(commit)^{tree} | xclip -sel c -o | awk '{print \"Tree Clipped\", $1}'" | 210 | bind tree xt +sh -c "git rev-parse %(commit)^{tree} | xclip -sel c -o | awk '{print \"Tree Clipped\", $1}'" |
| 211 | |||
| 212 | bind tree . >sh -c "git diff %(ref) -- %(file) | tig" | ||
| 213 | bind tree > >sh -c "git diff %(ref) --no-prefix -U1000i -- %(file) | tig" | ||
| 211 | #==================== | 214 | #==================== |
| 212 | # refs view | 215 | # refs view |
| 213 | #==================== | 216 | #==================== |