diff options
context:
space:
mode:
-rw-r--r--source/ui-patch.c2
-rw-r--r--source/ui-shared.c10
-rwxr-xr-xtests/t0109-patch.sh9
3 files changed, 7 insertions, 14 deletions
diff --git a/source/ui-patch.c b/source/ui-patch.c
index 1dcdfbe..2c595ca 100644
--- a/source/ui-patch.c
+++ b/source/ui-patch.c
@@ -131,6 +131,6 @@ void cgit_print_patch(const char *new_rev, const char *old_rev, const char *pref
// Two dashes and a space is the mail signature separator, so
// git am and mail readers drop the version note below rather
// than carrying it into the commit message.
- printf("-- \ncgit %s\n\n", cgit_version);
+ printf("-- \ncgit\n\n");
}
}
diff --git a/source/ui-shared.c b/source/ui-shared.c
index 2c4db2c..c23e2e1 100644
--- a/source/ui-shared.c
+++ b/source/ui-shared.c
@@ -1529,7 +1529,7 @@ void cgit_print_docstart(void)
html_attr(ctx.cfg.root_desc);
html("'>\n");
}
- htmlf("<meta name='generator' content='cgit %s'>\n", cgit_version);
+ html("<meta name='generator' content='cgit'>\n");
if (ctx.cfg.robots && *ctx.cfg.robots) {
html("<meta name='robots' content='");
html_attr(ctx.cfg.robots);
@@ -1589,12 +1589,8 @@ void cgit_print_docend(void)
}
if (ctx.cfg.footer)
html_include(ctx.cfg.footer);
- else {
- htmlf("<footer class='footer'>generated by "
- "<a href='https://github.com/brycekwon/cgit'>cgit %s</a> "
- "(<a href='https://git-scm.com/'>git %s</a>)</footer>\n",
- cgit_version, git_version_string);
- }
+ else
+ html("<footer class='footer'>generated by <a href='https://github.com/brycekwon/cgit'>cgit</a></footer>\n");
html("</div>\n");
html("</body>\n</html>\n");
}
diff --git a/tests/t0109-patch.sh b/tests/t0109-patch.sh
index f4168f4..3cb9d08 100755
--- a/tests/t0109-patch.sh
+++ b/tests/t0109-patch.sh
@@ -10,12 +10,9 @@ test_description='Check content on patch page'
# The signature sits on the second-to-last line, above the trailing blank.
check_cgit_signature() {
- tail -2 tmp | head -1 | grep "^cgit"
+ tail -2 tmp | head -1 | grep "^cgit$"
}
-# The version the built binary signs its patches with.
-CGIT_VERSION=$(sed -n "s/CGIT_VERSION = //p" "$TEST_OUTPUT_DIRECTORY/../build/VERSION")
-
test_expect_success 'generate foo/patch' '
cgit_query "url=foo/patch" >tmp
'
@@ -38,7 +35,7 @@ test_expect_success 'find `cgit` signature' '
test_expect_success 'compare with output of git-format-patch(1)' '
git --git-dir="$PWD/repos/foo/.git" format-patch --subject-prefix="" \
- --signature="cgit $CGIT_VERSION" --stdout HEAD^ >tmp2 &&
+ --signature="cgit" --stdout HEAD^ >tmp2 &&
strip_headers <tmp >tmp_ &&
test_cmp tmp_ tmp2
'
@@ -67,7 +64,7 @@ test_expect_success 'find `cgit` signature on the range' '
test_expect_success 'compare the range with git-format-patch(1)' '
git --git-dir="$PWD/repos/foo/.git" format-patch --subject-prefix="" \
- -N --signature="cgit $CGIT_VERSION" --stdout HEAD~3..HEAD >tmp2 &&
+ -N --signature="cgit" --stdout HEAD~3..HEAD >tmp2 &&
strip_headers <tmp >tmp_ &&
test_cmp tmp_ tmp2
'