about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2008-11-29 14:27:35 +0100
committerLars Hjemli <hjemli@gmail.com>2008-11-29 14:27:35 +0100
commit54272e60965ec6a98b49cbf67d72a4b1f5adc55b (patch)
tree183bc1876d0c53b879627bb9fd66f2978d41929e
parentui-repolist: add support for sorting any column (diff)
downloadcgit-pink-54272e60965ec6a98b49cbf67d72a4b1f5adc55b.tar.gz
cgit-pink-54272e60965ec6a98b49cbf67d72a4b1f5adc55b.zip
ui-repolist: sort null values last
When sorting on e.g. owner, it's not interesting to get all repos
without owner at the top of the list.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to '')
-rw-r--r--ui-repolist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui-repolist.c b/ui-repolist.c
index 0de328b..cf27cb3 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -116,9 +116,9 @@ static int cmp(const char *s1, const char *s2)
 	if (s1 && s2)
 		return strcmp(s1, s2);
 	if (s1 && !s2)
-		return 1;
-	if (s2 && !s1)
 		return -1;
+	if (s2 && !s1)
+		return 1;
 	return 0;
 }
 
mp;id=596eb8fcb09697dd1b880123074d2ce6fdea03c0&follow=1'>ui-blob: return 'application/octet-stream' for binary blobsLars Hjemli 2009-07-25ui-plain: Return 'application/octet-stream' for binary files.Remko Tronçon 2009-06-11use cgit_httpscheme() for atom feedDiego Ongaro 2009-06-11add cgit_httpscheme() -> http:// or https://Diego Ongaro 2009-06-07Return http statuscode 404 on unknown branchLars Hjemli 2009-06-07Add head-include configuration option.Mark Lodato 2009-03-15CGIT 0.8.2.1Lars Hjemli 2009-03-15Fix doc-related glitches in Makefile and .gitignoreLars Hjemli 2009-03-15ui-snapshot: avoid segfault when no filename is specifiedLars Hjemli 2009-03-15fix segfault when displaying empty blobsEric Wong 2009-02-19Add support for HEAD requestsLars Hjemli 2009-02-19Add support for ETag in 'plain' viewLars Hjemli 2009-02-12ui-tree: escape ascii-text properly in hexdump viewLars Hjemli 2009-02-12Makefile: add doc-related targetsLars Hjemli