Skip to content

Commit

Permalink
Tweaks to the 'git state' alias.
Browse files Browse the repository at this point in the history
  • Loading branch information
trentpolack committed Apr 30, 2017
1 parent d148ebc commit 35b76e3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions git-template/gitconfig.template
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
[color]
ui = true

[alias]
state = "!f(){ \
deco_bold='\\x1b[1m'; \
deco_invert='\\x1b[7m'; \
deco_end='\\x1b[00m'; \
git_status=$(git -c color.status=always status -sb); \
git_lfs_valid=$(git lfs status --porcelain); \
git_lfs_status=$(git -c color.status=always lfs status); \
divider='\n------- git-lfs status -------\n'; \
echo \"$git_status\"; \
if [[ -n \"$git_lfs_valid\" ]]; then \
echo -e \"${deco_bold}${deco_invert}$divider${deco_end}\"; \
git_lfs_status=$(git -c color.status=always lfs status); \
divider='\n------- git-lfs status -------\\x1b[00m'; \
echo -e \"${deco_bold}${deco_invert}$divider\n\"; \
echo \"$git_lfs_status\"; \
fi; \
}; \
Expand Down

0 comments on commit 35b76e3

Please sign in to comment.