blob: 0debea8b40f742f6426a8d321189b101f6565b4a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/bash
SINCE=$1
UNTIL=$2
if [ "$SINCE" = "" ] || [ "$UNTIL" = "" ]
then
echo "Usage: $0 <since> <until>"
exit 3
fi
command="git --no-pager log --no-color $SINCE..$UNTIL"
# TODO Why do I get whitespace in the beginning of the wc output?
change_count=`$command --oneline|wc -l|tr -d ' '`
if [ "$change_count" = "0" ]
then
echo "No unmerged commits"
exit 0
fi
echo "There are $change_count commits that have not been merged from $UNTIL to $SINCE: "
echo ""
$command
exit 1
|