From: Richard Hartmann Date: Sat, 25 Oct 2014 05:58:06 +0000 (+0200) Subject: Merge branch 'feature/repository_specific_configuration' X-Git-Url: https://git.madduck.net/code/vcsh.git/commitdiff_plain/77739e9453107e3f69fa809e940885f316fb9a15?hp=-c Merge branch 'feature/repository_specific_configuration' --- 77739e9453107e3f69fa809e940885f316fb9a15 diff --combined vcsh index 246a7da,2e96300..4464c85 --- a/vcsh +++ b/vcsh @@@ -379,12 -379,6 +379,12 @@@ status() status_helper() { GIT_DIR=$VCSH_REPO_D/$VCSH_REPO_NAME.git; export GIT_DIR use + remote_tracking_branch=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2> /dev/null) && { + commits_behind=$(git log ..${remote_tracking_branch} --oneline | wc -l) + commits_ahead=$(git log ${remote_tracking_branch}.. --oneline | wc -l) + [ ${commits_behind} -ne 0 ] && echo "Behind $remote_tracking_branch by $commits_behind commits" + [ ${commits_ahead} -ne 0 ] && echo "Ahead of $remote_tracking_branch by $commits_ahead commits" + } git status --short --untracked-files='no' VCSH_COMMAND_RETURN_CODE=$? } @@@ -579,6 -573,9 +579,9 @@@ check_dir "$VCSH_REPO_D verbose "$VCSH_COMMAND begin" VCSH_COMMAND=$(echo "$VCSH_COMMAND" | sed 's/-/_/g'); export VCSH_COMMAND + # Source repo-specific configuration file + [ -r "$XDG_CONFIG_HOME/vcsh/config.d/$VCSH_REPO_NAME" ] && . "$XDG_CONFIG_HOME/vcsh/config.d/$VCSH_REPO_NAME" + # source overlay functions for overlay in "$VCSH_OVERLAY_D/$VCSH_COMMAND"* "$VCSH_OVERLAY_D/$VCSH_REPO_NAME.$VCSH_COMMAND"*; do [ -r "$overlay" ] || continue