all repos — cgit @ d483e8f5692117d6f3ea0801c0ca2ec7aa8f6f3b

a hyperfast web frontend for git written in c

t0001: ignore ".dirty" suffix on Git version

When testing modifications in Git that affect CGit, it is annoying to
have t0001 failing simply because the Git version has a ".dirty" suffix
when the version of Git there does indeed match that specified in the
CGit makefile.  Stop this by stripping the ".dirty" suffix from the
GIT_VERSION variable.

Note that this brings the "Git version" behaviour in line with the
"submodule version" case which does not check if the working tree in
git/ is modified.

Signed-off-by: John Keeping <john@keeping.me.uk>
John Keeping john@keeping.me.uk
Sun, 14 Apr 2013 19:15:43 +0100
commit

d483e8f5692117d6f3ea0801c0ca2ec7aa8f6f3b

parent

31f56fc1ecfe7e5131cf31a30a74dcc0803d32d0

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M tests/t0001-validate-git-versions.shtests/t0001-validate-git-versions.sh

@@ -13,7 +13,7 @@ '

test_expect_success 'test Git version matches Makefile' ' ( cat ../../git/GIT-VERSION-FILE || echo "No GIT-VERSION-FILE" ) | - sed -e "s/GIT_VERSION[ ]*=[ ]*//" >git_version && + sed -e "s/GIT_VERSION[ ]*=[ ]*//" -e "s/\\.dirty$//" >git_version && test_cmp git_version makefile_version '