about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2008-10-11 19:05:50 +0200
committerLars Hjemli <hjemli@gmail.com>2008-10-11 19:05:50 +0200
commit5632ba35d133ee29d46c031cdd4b4a37097b8ca1 (patch)
tree6e95881e8ec6bb812a82668fd45e4ca28b8d0f97
parentui-shared: specify correct css class for summary tab (diff)
downloadcgit-pink-5632ba35d133ee29d46c031cdd4b4a37097b8ca1.tar.gz
cgit-pink-5632ba35d133ee29d46c031cdd4b4a37097b8ca1.zip
Add cgit_query.nohead flag
This flag is set when no HEAD is specified in the querystring. Currently
it has no users, but it will be used by ui-snapshot to invoke a DWIM-mode
where the revision is extracted from the snapshot name.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to '')
-rw-r--r--cgit.c1
-rw-r--r--cgit.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/cgit.c b/cgit.c
index 5a93fcd..c82587b 100644
--- a/cgit.c
+++ b/cgit.c
@@ -254,6 +254,7 @@ static int prepare_repo_cmd(struct cgit_context *ctx)
 	ctx->page.title = fmt("%s - %s", ctx->repo->name, ctx->repo->desc);
 
 	if (!ctx->qry.head) {
+		ctx->qry.nohead = 1;
 		ctx->qry.head = find_default_branch(ctx->repo);
 		ctx->repo->defbranch = ctx->qry.head;
 	}
diff --git a/cgit.h b/cgit.h
index d07185c..91db98a 100644
--- a/cgit.h
+++ b/cgit.h
@@ -120,6 +120,7 @@ struct cgit_query {
 	char *mimetype;
 	char *url;
 	int   ofs;
+	int nohead;
 };
 
 struct cgit_config {
ounce.h?id=a51cab7eed76c28888fef9c0ef1687dc0b295493&follow=1'>Avoid the reserved _A names with BIT macroJune McEnroe 2019-11-09Define macro for bit flag enumsJune McEnroe 2019-11-08Check that password is hashedJune McEnroe 2019-11-08Avoid calling getopt_long again after it returns -1June McEnroe 2019-11-08Only change AWAY status for registered clientsJune McEnroe 2019-11-07Just write the example normallyJune McEnroe 2019-11-07Include path in readlinkat errorJune McEnroe 2019-11-07Call clientConsume before clientRecvJune McEnroe 2019-11-06Use -l:filename in Linux.mkJune McEnroe 2019-11-06Fix compat.h for #defined strlcpyJune McEnroe 2019-11-06Allow unsetting LIBRESSL_PREFIXJune McEnroe 2019-11-06Document calico service configurationJune McEnroe 2019-11-06Document SASL EXTERNAL configuration in more detailJune McEnroe 2019-11-06Document pounce service configurationJune McEnroe 2019-11-06Mention Darwin and GNU/Linux in READMEJune McEnroe 2019-11-06Assume LibreSSL from brew on DarwinJune McEnroe 2019-11-06Remove -DNO_EXPLICIT_BZERO from Darwin.mkJune McEnroe 2019-11-06Don't install rc scripts or dirs on LinuxJune McEnroe