mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
request-pull: use the branch description
Now we have branch descriptions stored in the repository, we can use it when preparing the request-pull message. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
@@ -35,7 +35,18 @@ do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
base=$1 url=$2 head=${3-HEAD} status=0
|
base=$1 url=$2 head=${3-HEAD} status=0 branch_name=
|
||||||
|
|
||||||
|
headref=$(git symbolic-ref -q "$head")
|
||||||
|
if git show-ref -q --verify "$headref"
|
||||||
|
then
|
||||||
|
branch_name=${headref#refs/heads/}
|
||||||
|
if test "z$branch_name" = "z$headref" ||
|
||||||
|
! git config "branch.$branch_name.description" >/dev/null
|
||||||
|
then
|
||||||
|
branch_name=
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
test -n "$base" && test -n "$url" || usage
|
test -n "$base" && test -n "$url" || usage
|
||||||
baserev=$(git rev-parse --verify "$base"^0) &&
|
baserev=$(git rev-parse --verify "$base"^0) &&
|
||||||
@@ -66,6 +77,13 @@ for you to fetch changes up to %H:
|
|||||||
|
|
||||||
----------------------------------------------------------------' $headrev &&
|
----------------------------------------------------------------' $headrev &&
|
||||||
|
|
||||||
|
if test -n "$branch_name"
|
||||||
|
then
|
||||||
|
echo "(from the branch description for $branch local branch)"
|
||||||
|
echo
|
||||||
|
git config "branch.$branch_name.description"
|
||||||
|
echo "----------------------------------------------------------------"
|
||||||
|
fi &&
|
||||||
git shortlog ^$baserev $headrev &&
|
git shortlog ^$baserev $headrev &&
|
||||||
git diff -M --stat --summary $patch $merge_base..$headrev || status=1
|
git diff -M --stat --summary $patch $merge_base..$headrev || status=1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user