avformat/utils: add missing brackets around arguments in av_realloc() call
[ffmpeg.git] / tools / libav-merge-next-commit
1 #!/bin/sh
2
3 if [ "$1" != "merge" -a "$1" != "noop" ]; then
4     printf "Usage: $0 <merge|noop [REF_HASH]>\n"
5     exit 0
6 fi
7
8 [ "$1" = "noop" ] && merge_opts="-s ours"
9
10 nextrev=$(git rev-list libav/master --not master --no-merges | tail -n1)
11 if [ -z "$nextrev" ]; then
12     printf "Nothing to merge..\n"
13     exit 0
14 fi
15 printf "Merging $(git log -n 1 --oneline $nextrev)\n"
16 git merge --no-commit $merge_opts --no-ff --log $nextrev
17
18 if [ "$1" = "noop" -a -n "$2" ]; then
19     printf "\nThis commit is a noop, see $2\n" >> .git/MERGE_MSG
20 fi
21
22 printf "\nMerged-by: $(git config --get user.name) <$(git config --get user.email)>\n" >> .git/MERGE_MSG