Skip to content
This repository has been archived by the owner on Dec 21, 2019. It is now read-only.

Commit

Permalink
simplified incoming and outgoing
Browse files Browse the repository at this point in the history
  • Loading branch information
ddollar committed Oct 22, 2008
1 parent 6031afe commit c51718b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 50 deletions.
29 changes: 6 additions & 23 deletions git-incoming
Expand Up @@ -3,39 +3,22 @@
CURRENT_BRANCH=$(git branch &>/dev/null; if [ $? -eq 0 ]; then echo "$(git branch | grep '^*' |sed s/\*\ //)"; fi)
if [ "${CURRENT_BRANCH}" != "" ]; then
REMOTE_REPOSITORY="$(echo ${1} | cut -d"/" -f1 -s)"
REMOTE_BRANCH="$(echo ${1} | cut -d"/" -f2 -s)"
if [ "${REMOTE_REPOSITORY}" == "" ]; then
REMOTE_REPOSITORY="${1}"
fi
TARGET="${1}"
# if no remote repository was specified, attempt to get it from the
# "tracked" branch of this branch
if [ "${REMOTE_REPOSITORY}" == "" ]; then
if [ "${TARGET}" == "" ]; then
TRACKING_REPOSITORY="$(git config branch.${CURRENT_BRANCH}.remote)"
# there is a tracking repository
if [ "${TRACKING_REPOSITORY}" != "" ]; then
REMOTE_REPOSITORY="${TRACKING_REPOSITORY}"
REMOTE_BRANCH="$(git config branch.${CURRENT_BRANCH}.merge | cut -d"/" -f3)"
TARGET="${REMOTE_REPOSITORY}/${REMOTE_BRANCH}"
fi
fi
# if there is no tracking repository, default to origin
if [ "${REMOTE_REPOSITORY}" == "" ]; then
REMOTE_REPOSITORY="origin"
fi
if [ "${REMOTE_BRANCH}" == "" ]; then
REMOTE_BRANCH="${CURRENT_BRANCH}"
fi
if [ "${SILENCE}" != "yes" ]; then
echo "From: ${REMOTE_REPOSITORY}/${REMOTE_BRANCH}"
echo ""
fi
echo "From: ${TARGET}"
echo ""
#git remote update &>/dev/null
git log ..${REMOTE_REPOSITORY}/${REMOTE_BRANCH} ${GIT_LOG_ARGUMENTS}
git log ..${TARGET}
fi
2 changes: 0 additions & 2 deletions git-incoming-short

This file was deleted.

29 changes: 6 additions & 23 deletions git-outgoing
Expand Up @@ -3,39 +3,22 @@
CURRENT_BRANCH=$(git branch &>/dev/null; if [ $? -eq 0 ]; then echo "$(git branch | grep '^*' |sed s/\*\ //)"; fi)
if [ "${CURRENT_BRANCH}" != "" ]; then
REMOTE_REPOSITORY="$(echo ${1} | cut -d"/" -f1 -s)"
REMOTE_BRANCH="$(echo ${1} | cut -d"/" -f2 -s)"
if [ "${REMOTE_REPOSITORY}" == "" ]; then
REMOTE_REPOSITORY="${1}"
fi
TARGET="${1}"
# if no remote repository was specified, attempt to get it from the
# "tracked" branch of this branch
if [ "${REMOTE_REPOSITORY}" == "" ]; then
if [ "${TARGET}" == "" ]; then
TRACKING_REPOSITORY="$(git config branch.${CURRENT_BRANCH}.remote)"
# there is a tracking repository
if [ "${TRACKING_REPOSITORY}" != "" ]; then
REMOTE_REPOSITORY="${TRACKING_REPOSITORY}"
REMOTE_BRANCH="$(git config branch.${CURRENT_BRANCH}.merge | cut -d"/" -f3)"
TARGET="${REMOTE_REPOSITORY}/${REMOTE_BRANCH}"
fi
fi
# if there is no tracking repository, default to origin
if [ "${REMOTE_REPOSITORY}" == "" ]; then
REMOTE_REPOSITORY="origin"
fi
if [ "${REMOTE_BRANCH}" == "" ]; then
REMOTE_BRANCH="${CURRENT_BRANCH}"
fi
if [ "${SILENCE}" != "yes" ]; then
echo "To: ${REMOTE_REPOSITORY}/${REMOTE_BRANCH}"
echo ""
fi
echo "To: ${TARGET}"
echo ""
#git remote update &>/dev/null
git log ${REMOTE_REPOSITORY}/${REMOTE_BRANCH}.. ${GIT_LOG_ARGUMENTS}
git log ${TARGET}..
fi
2 changes: 0 additions & 2 deletions git-outgoing-short

This file was deleted.

0 comments on commit c51718b

Please sign in to comment.