Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions git-summary
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,15 @@ usage() {

- the repo path
- the currently checked out branch
- a short 2-column status string showing whether there are:
- a short 5-column status string showing whether there are:
* Local Changes:
- untracked files "?_"
- uncommitted new files "+_"
- uncommitted changes "M_"
- (nothing) " _"
- untracked files "? "
- uncommitted new files " + "
- uncommitted changes " M "
- unpushed commits for the current branch " ^ "
- no remote or no upstream branch " --"
* Remote Changes:
- unpulled commits for the current branch "_v"
- unpushed commits for the current branch "_^"
- (nothing) "_ "
- unpulled commits for the current branch " v"

Arguments:

Expand Down Expand Up @@ -259,20 +258,19 @@ summarize_one_git_repo () {
local unpulled=`gitC $f log --pretty=format:'%h' ..@{u} | wc -c`
local unpushed=`gitC $f log --pretty=format:'%h' @{u}.. | wc -c`

if [ $unpulled -ne 0 ]; then
rstate="${rstate}v"
if [ $unpushed -ne 0 ]; then
rstate="${rstate}^"
numState=1
else
rstate="${rstate} "
fi

if [ $unpushed -ne 0 ]; then
rstate="${rstate}^"
if [ $unpulled -ne 0 ]; then
rstate="${rstate}v"
numState=1
else
rstate="${rstate} "
fi

else
rstate="--"
fi
Expand Down