Re: [PATCH/RFC v4 3/5] sha1_name: support @{-N} syntax in get_sha1()
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 17, 2009, 17:55 UTC
- Message-ID
- <alpine.DEB.1.00.0901171854060.3586@pacific.mpi-cbg.de>
- In-Reply-To
- <1232208597-29249-4-git-send-email-trast@student.ethz.ch>
Hi,
On Sat, 17 Jan 2009, Thomas Rast wrote:
Show 42 quoted lines
> diff --git a/t/t1505-rev-parse-last.sh b/t/t1505-rev-parse-last.sh
> new file mode 100755
> index 0000000..1e49dd2
> --- /dev/null
> +++ b/t/t1505-rev-parse-last.sh
> @@ -0,0 +1,71 @@
> +#!/bin/sh
> +
> +test_description='test @{-N} syntax'
> +
> +. ./test-lib.sh
> +
> +
> +make_commit () {
> + echo "$1" > "$1" &&
> + git add "$1" &&
> + git commit -m "$1"
> +}
> +
> +
> +test_expect_success 'setup' '
> +
> + make_commit 1 &&
> + git branch side &&
> + make_commit 2 &&
> + make_commit 3 &&
> + git checkout side &&
> + make_commit 4 &&
> + git merge master &&
> + git checkout master
> +
> +'
> +
> +# 1 -- 2 -- 3 master
> +# \ \
> +# \ \
> +# --- 4 --- 5 side
> +#
> +# and 'side' should be the last branch
> +
> +git log --graph --all --pretty=oneline --decorate
> +Maybe you want to squash this in, so that the output of "make test" is not cluttered by the graph?
-- snipsnap --
diff --git a/t/t1505-rev-parse-last.sh b/t/t1505-rev-parse-last.sh index 1e49dd2..72e8322 100755 --- a/t/t1505-rev-parse-last.sh +++ b/t/t1505-rev-parse-last.sh @@ -32,7 +32,11 @@ test_expect_success 'setup' ' # # and 'side' should be the last branch -git log --graph --all --pretty=oneline --decorate +test_expect_success 'show a log (for debugging)' ' + + git log --graph --all --pretty=oneline --decorate + +' test_rev_equivalent () {
-- 1.6.1.332.g9a59d