Add git-pending script
This commit is contained in:
parent
1d590a91ee
commit
940ab2e845
1 changed files with 18 additions and 0 deletions
18
bin/git-pending
Executable file
18
bin/git-pending
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
for line in $@
|
||||
do
|
||||
dir=$(pwd)
|
||||
cd "$line"
|
||||
if git log -0 2>/dev/null
|
||||
then
|
||||
stat=$(git branch -vv | grep -P '^\*' | grep -Po '\[.*\]')
|
||||
if echo $stat | grep -P 'behind' > /dev/null
|
||||
then echo behind $line
|
||||
fi
|
||||
if echo $stat | grep -P 'ahead' > /dev/null
|
||||
then echo ahead $line
|
||||
fi
|
||||
fi
|
||||
cd $dir
|
||||
done
|
Loading…
Reference in a new issue