awips2/tools/scripts/upull
Steve Harris 927fd978b4 Issue #708 - execute permissions didn't survive the git push
Former-commit-id: 4d2baf48d9 [formerly aa46aa3713] [formerly a2c88aee12 [formerly 44388508c45f2c560301558c4fb297b806ba55a7]]
Former-commit-id: a2c88aee12
Former-commit-id: bc15e39e5e
2012-06-22 12:08:20 -05:00

36 lines
944 B
Bash
Executable file

#!/bin/bash
#
# Check for a merge tool
#
MERGE_TOOL=`git config --get merge.tool`
if [ "$MERGE_TOOL" != "" ]; then
echo "I have a merge tool!"
else
echo "I have no merge tool :("
fi
# Tool disclaimer / continue prompt
echo " "
echo "No merge tool has been set for git. A merge tool would make conflicts easier to resolve."
echo "To set a merge tool, see if you have one of the following merge tools installed:"
echo " meld opendiff kdiff3 tkdiff xxdiff tortoisemerge gvimdiff diffuse ecmerge p4merge araxis emerge vimdiff "
echo "And install thusly (kdiff3 used as example here): "
echo " git config --global merge.tool kdiff3"
echo " "
read -p "Press [Enter] key to continue (ctrl-c to quit).."
changes=`git status | grep "nothing to commit (working directory clean)"`
if [ -z "$changes" ]
then
git stash save "Saving for pull..."
fi
git pull --rebase
if [ -z "$changes" ]
then
git stash pop
git mergetool
fi