List for cgit developers and users
 help / color / mirror / Atom feed
* [PATCH 1/3] Added "sort-sections" flag for the repository listing
@ 2012-07-02 15:38 Tobias.Bieniek
  2012-07-02 15:38 ` [PATCH 2/3] Added "date-order" and "topo-order" flags Tobias.Bieniek
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Tobias.Bieniek @ 2012-07-02 15:38 UTC (permalink / raw)


Flag which, when set to "1", will make sort the sections on the
repository listing by name. Set this flag to "0" if the order in the
cgitrc file should be preserved. Default value: "1".
---
 cgit.c        |    3 +++
 cgit.h        |    1 +
 cgitrc.5.txt  |    5 +++++
 ui-repolist.c |    2 +-
 4 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/cgit.c b/cgit.c
index b9b3a66..4ec00f6 100644
--- a/cgit.c
+++ b/cgit.c
@@ -229,6 +229,8 @@ void config_cb(const char *name, const char *value)
 		ctx.cfg.scan_hidden_path = atoi(value);
 	else if (!strcmp(name, "section-from-path"))
 		ctx.cfg.section_from_path = atoi(value);
+	else if (!strcmp(name, "sort-sections"))
+		ctx.cfg.sort_sections = atoi(value);
 	else if (!strcmp(name, "source-filter"))
 		ctx.cfg.source_filter = new_filter(value, SOURCE);
 	else if (!strcmp(name, "summary-log"))
@@ -355,6 +357,7 @@ static void prepare_context(struct cgit_context *ctx)
 	ctx->cfg.scan_hidden_path = 0;
 	ctx->cfg.script_name = CGIT_SCRIPT_NAME;
 	ctx->cfg.section = "";
+	ctx->cfg.sort_sections = 1;
 	ctx->cfg.summary_branches = 10;
 	ctx->cfg.summary_log = 10;
 	ctx->cfg.summary_tags = 10;
diff --git a/cgit.h b/cgit.h
index 6ee6769..86afad1 100644
--- a/cgit.h
+++ b/cgit.h
@@ -224,6 +224,7 @@ struct cgit_config {
 	int scan_hidden_path;
 	int section_from_path;
 	int snapshots;
+	int sort_sections;
 	int summary_branches;
 	int summary_log;
 	int summary_tags;
diff --git a/cgitrc.5.txt b/cgitrc.5.txt
index a72241f..3e2d87f 100644
--- a/cgitrc.5.txt
+++ b/cgitrc.5.txt
@@ -336,6 +336,11 @@ snapshots::
 	values "tar", "tar.gz", "tar.bz2", "tar.xz" and "zip". Default value:
 	none.
 
+sort-sections::
+	Flag which, when set to "1", will make sort the sections on the
+	repository listing by name. Set this flag to "0" if the order in the
+	cgitrc file should be preserved. Default value: "1".
+
 source-filter::
 	Specifies a command which will be invoked to format plaintext blobs
 	in the tree view. The command will get the blob content on its STDIN
diff --git a/ui-repolist.c b/ui-repolist.c
index d946f32..4cf3ec1 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -237,7 +237,7 @@ void cgit_print_repolist()
 
 	if(ctx.qry.sort)
 		sorted = sort_repolist(ctx.qry.sort);
-	else
+	else if (ctx.cfg.sort_sections)
 		sort_repolist("section");
 
 	html("<table summary='repository list' class='list nowrap'>");
-- 
1.7.10





^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 2/3] Added "date-order" and "topo-order" flags
  2012-07-02 15:38 [PATCH 1/3] Added "sort-sections" flag for the repository listing Tobias.Bieniek
@ 2012-07-02 15:38 ` Tobias.Bieniek
  2012-07-02 15:38 ` [PATCH 3/3] Fixed parameter parsing in repo_config() function Tobias.Bieniek
       [not found] ` <CABEOeT=yfWaqRfanCcgVYLkTa3PD8JtkfvY2NfTGxNOAO2PEFQ@mail.gmail.com>
  2 siblings, 0 replies; 16+ messages in thread
From: Tobias.Bieniek @ 2012-07-02 15:38 UTC (permalink / raw)


This makes it possible to use strict commit date ordering even when
the commit graph flag is activated.
---
 cgit.c       |    8 ++++++++
 cgit.h       |    4 ++++
 cgitrc.5.txt |   22 ++++++++++++++++++++++
 cmd.c        |    3 ++-
 shared.c     |    2 ++
 ui-log.c     |   13 ++++++++++++-
 ui-log.h     |    2 +-
 ui-summary.c |    2 +-
 8 files changed, 52 insertions(+), 4 deletions(-)

diff --git a/cgit.c b/cgit.c
index 4ec00f6..f8c9a53 100644
--- a/cgit.c
+++ b/cgit.c
@@ -84,6 +84,10 @@ void repo_config(struct cgit_repo *repo, const char *name, const char *value)
 		repo->enable_remote_branches = atoi(value);
 	else if (!strcmp(name, "enable-subject-links"))
 		repo->enable_subject_links = atoi(value);
+	else if (!strcmp(name, "date-order"))
+		repo->date_order = atoi(value);
+	else if (!strcmp(name, "topo-order"))
+		repo->topo_order = atoi(value);
 	else if (!strcmp(name, "max-stats"))
 		repo->max_stats = cgit_find_stats_period(value, NULL);
 	else if (!strcmp(name, "module-link"))
@@ -257,6 +261,10 @@ void config_cb(const char *name, const char *value)
 		ctx.cfg.clone_url = xstrdup(value);
 	else if (!strcmp(name, "local-time"))
 		ctx.cfg.local_time = atoi(value);
+	else if (!strcmp(name, "date-order"))
+		ctx.cfg.date_order = atoi(value);
+	else if (!strcmp(name, "topo-order"))
+		ctx.cfg.topo_order = atoi(value);
 	else if (!prefixcmp(name, "mimetype."))
 		add_mimetype(name + 9, value);
 	else if (!strcmp(name, "include"))
diff --git a/cgit.h b/cgit.h
index 86afad1..a597b42 100644
--- a/cgit.h
+++ b/cgit.h
@@ -84,6 +84,8 @@ struct cgit_repo {
 	int enable_remote_branches;
 	int enable_subject_links;
 	int max_stats;
+	int date_order;
+	int topo_order;
 	time_t mtime;
 	struct cgit_filter *about_filter;
 	struct cgit_filter *commit_filter;
@@ -229,6 +231,8 @@ struct cgit_config {
 	int summary_log;
 	int summary_tags;
 	int ssdiff;
+	int date_order;
+	int topo_order;
 	struct string_list mimetypes;
 	struct cgit_filter *about_filter;
 	struct cgit_filter *commit_filter;
diff --git a/cgitrc.5.txt b/cgitrc.5.txt
index 3e2d87f..70db7d5 100644
--- a/cgitrc.5.txt
+++ b/cgitrc.5.txt
@@ -92,6 +92,12 @@ css::
 	Url which specifies the css document to include in all cgit pages.
 	Default value: "/cgit.css".
 
+date-order::
+	Flag which, when set to "1", will make add the "date-order" parameter
+	to all "git log" calls. This enables strict commit date ordering,
+	also for the commit graph, that can be enabled with the
+	"enable-commit-graph" flag. Default value: "0".
+
 embedded::
 	Flag which, when set to "1", will make cgit generate a html fragment
 	suitable for embedding in other html pages. Default value: none. See
@@ -368,6 +374,11 @@ strict-export::
 	repositories to match those exported by git-daemon. This option MUST come
 	before 'scan-path'.
 
+topo-order::
+	Flag which, when set to "1", will make add the "topo-order" parameter
+	to all "git log" calls. This order the commit in topological order.
+	Default value: "0".
+
 virtual-root::
 	Url which, if specified, will be used as root for all cgit links. It
 	will also cause cgit to generate 'virtual urls', i.e. urls like
@@ -390,6 +401,12 @@ repo.commit-filter::
 	Override the default commit-filter. Default value: none. See also:
 	"enable-filter-overrides". See also: "FILTER API".
 
+repo.date-order::
+	Flag which, when set to "1", will make add the "date-order" parameter
+	to all "git log" calls. This enables strict commit date ordering,
+	also for the commit graph, that can be enabled with the
+	"enable-commit-graph" flag. Default value: "0".
+
 repo.defbranch::
 	The name of the default branch for this repository. If no such branch
 	exists in the repository, the first branch name (when sorted) is used
@@ -474,6 +491,11 @@ repo.source-filter::
 	Override the default source-filter. Default value: none. See also:
 	"enable-filter-overrides". See also: "FILTER API".
 
+repo.topo-order::
+	Flag which, when set to "1", will make add the "topo-order" parameter
+	to all "git log" calls. This order the commit in topological order.
+	Default value: "0".
+
 repo.url::
 	The relative url used to access the repository. This must be the first
 	setting specified for each repo. Default value: none.
diff --git a/cmd.c b/cmd.c
index 5a3d157..04d25ed 100644
--- a/cmd.c
+++ b/cmd.c
@@ -68,7 +68,8 @@ static void log_fn(struct cgit_context *ctx)
 {
 	cgit_print_log(ctx->qry.sha1, ctx->qry.ofs, ctx->cfg.max_commit_count,
 		       ctx->qry.grep, ctx->qry.search, ctx->qry.path, 1,
-		       ctx->repo->enable_commit_graph);
+		       ctx->repo->enable_commit_graph,
+		       ctx->repo->date_order, ctx->repo->topo_order);
 }
 
 static void ls_cache_fn(struct cgit_context *ctx)
diff --git a/shared.c b/shared.c
index 0a0e22e..4e8a9e7 100644
--- a/shared.c
+++ b/shared.c
@@ -62,6 +62,8 @@ struct cgit_repo *cgit_add_repo(const char *url)
 	ret->enable_remote_branches = ctx.cfg.enable_remote_branches;
 	ret->enable_subject_links = ctx.cfg.enable_subject_links;
 	ret->max_stats = ctx.cfg.max_stats;
+	ret->date_order = ctx.cfg.date_order;
+	ret->topo_order = ctx.cfg.topo_order;
 	ret->module_link = ctx.cfg.module_link;
 	ret->readme = ctx.cfg.readme;
 	ret->mtime = -1;
diff --git a/ui-log.c b/ui-log.c
index 6b12ca2..4c1a10c 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -278,7 +278,8 @@ static char *next_token(char **src)
 }
 
 void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern,
-		    char *path, int pager, int commit_graph)
+		    char *path, int pager, int commit_graph,
+		    int date_order, int topo_order)
 {
 	struct rev_info rev;
 	struct commit *commit;
@@ -327,6 +328,16 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
 					COLUMN_COLORS_HTML_MAX);
 	}
 
+	if (date_order) {
+		static const char *date_order_arg = "--date-order";
+		vector_push(&vec, &date_order_arg, 0);
+	}
+
+	if (topo_order) {
+		static const char *topo_order_arg = "--topo-order";
+		vector_push(&vec, &topo_order_arg, 0);
+	}
+
 	if (path) {
 		arg = "--";
 		vector_push(&vec, &arg, 0);
diff --git a/ui-log.h b/ui-log.h
index d0cb779..68fff08 100644
--- a/ui-log.h
+++ b/ui-log.h
@@ -3,7 +3,7 @@
 
 extern void cgit_print_log(const char *tip, int ofs, int cnt, char *grep,
 			   char *pattern, char *path, int pager,
-			   int commit_graph);
+			   int commit_graph, int date_order, int topo_order);
 extern void show_commit_decorations(struct commit *commit);
 
 #endif /* UI_LOG_H */
diff --git a/ui-summary.c b/ui-summary.c
index 227ed27..f08e59e 100644
--- a/ui-summary.c
+++ b/ui-summary.c
@@ -59,7 +59,7 @@ void cgit_print_summary()
 	if (ctx.cfg.summary_log > 0) {
 		html("<tr class='nohover'><td colspan='4'>&nbsp;</td></tr>");
 		cgit_print_log(ctx.qry.head, 0, ctx.cfg.summary_log, NULL,
-			       NULL, NULL, 0, 0);
+			       NULL, NULL, 0, 0, 0, 0);
 	}
 	if (ctx.repo->clone_url)
 		print_urls(expand_macros(ctx.repo->clone_url), NULL);
-- 
1.7.10





^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 3/3] Fixed parameter parsing in repo_config() function
  2012-07-02 15:38 [PATCH 1/3] Added "sort-sections" flag for the repository listing Tobias.Bieniek
  2012-07-02 15:38 ` [PATCH 2/3] Added "date-order" and "topo-order" flags Tobias.Bieniek
@ 2012-07-02 15:38 ` Tobias.Bieniek
       [not found] ` <CABEOeT=yfWaqRfanCcgVYLkTa3PD8JtkfvY2NfTGxNOAO2PEFQ@mail.gmail.com>
  2 siblings, 0 replies; 16+ messages in thread
From: Tobias.Bieniek @ 2012-07-02 15:38 UTC (permalink / raw)


This makes it possible to activate the enable_commit_graph,
enable_log_filecount and enable_log_linecount for individual
repositories, even if the global setting is "0" (default).
---
 cgit.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cgit.c b/cgit.c
index f8c9a53..ca427cb 100644
--- a/cgit.c
+++ b/cgit.c
@@ -75,11 +75,11 @@ void repo_config(struct cgit_repo *repo, const char *name, const char *value)
 	else if (!strcmp(name, "snapshots"))
 		repo->snapshots = ctx.cfg.snapshots & cgit_parse_snapshots_mask(value);
 	else if (!strcmp(name, "enable-commit-graph"))
-		repo->enable_commit_graph = ctx.cfg.enable_commit_graph * atoi(value);
+		repo->enable_commit_graph = atoi(value);
 	else if (!strcmp(name, "enable-log-filecount"))
-		repo->enable_log_filecount = ctx.cfg.enable_log_filecount * atoi(value);
+		repo->enable_log_filecount = atoi(value);
 	else if (!strcmp(name, "enable-log-linecount"))
-		repo->enable_log_linecount = ctx.cfg.enable_log_linecount * atoi(value);
+		repo->enable_log_linecount = atoi(value);
 	else if (!strcmp(name, "enable-remote-branches"))
 		repo->enable_remote_branches = atoi(value);
 	else if (!strcmp(name, "enable-subject-links"))
-- 
1.7.10





^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/3] Added "sort-sections" flag for the repository listing
       [not found] ` <CABEOeT=yfWaqRfanCcgVYLkTa3PD8JtkfvY2NfTGxNOAO2PEFQ@mail.gmail.com>
@ 2012-10-08 21:11   ` Jason
  2012-10-09 18:59     ` Tobias.Bieniek
  0 siblings, 1 reply; 16+ messages in thread
From: Jason @ 2012-10-08 21:11 UTC (permalink / raw)


Hi Tobias,

This patch series doesn't merge cleanly over the present master. Would
you mind rebasing and then resubmitting?

Thanks,
Jason




^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/3] Added "sort-sections" flag for the repository listing
  2012-10-08 21:11   ` [PATCH 1/3] Added "sort-sections" flag for the repository listing Jason
@ 2012-10-09 18:59     ` Tobias.Bieniek
  2012-10-09 19:03       ` Jason
  2012-10-09 19:12       ` Jason
  0 siblings, 2 replies; 16+ messages in thread
From: Tobias.Bieniek @ 2012-10-09 18:59 UTC (permalink / raw)


Hi Jason,

I rebased and fixed the patches and pushed them again. Let me know if
you prefer patch files, otherwise you can just pull from
git://github.com/Turbo87/cgit.git

Turbo



2012/10/8 Jason A. Donenfeld <Jason at zx2c4.com>:
> Hi Tobias,
>
> This patch series doesn't merge cleanly over the present master. Would
> you mind rebasing and then resubmitting?
>
> Thanks,
> Jason




^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/3] Added "sort-sections" flag for the repository listing
  2012-10-09 18:59     ` Tobias.Bieniek
@ 2012-10-09 19:03       ` Jason
  2012-10-09 19:10         ` Jason
  2012-10-09 21:47         ` Tobias.Bieniek
  2012-10-09 19:12       ` Jason
  1 sibling, 2 replies; 16+ messages in thread
From: Jason @ 2012-10-09 19:03 UTC (permalink / raw)


> This makes it possible to activate the enable_commit_graph,
> enable_log_filecount and enable_log_linecount for individual
> repositories, even if the global setting is "0" (default).
>
>
> - repo->enable_commit_graph = ctx.cfg.enable_commit_graph * atoi(value);
> + repo->enable_commit_graph = atoi(value);

Was this the intended behavior before, or was this erroneously copy
and pasted from elsewhere, and is therefore a bug? What I'm wondering
is -- should I evaluate this as a behavior change or as a bug fix?




^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/3] Added "sort-sections" flag for the repository listing
  2012-10-09 19:03       ` Jason
@ 2012-10-09 19:10         ` Jason
  2012-10-09 19:11           ` Jason
                             ` (2 more replies)
  2012-10-09 21:47         ` Tobias.Bieniek
  1 sibling, 3 replies; 16+ messages in thread
From: Jason @ 2012-10-09 19:10 UTC (permalink / raw)


> + else if (!strcmp(name, "date-order"))
> + repo->date_order = atoi(value);
> + else if (!strcmp(name, "topo-order"))
> + repo->topo_order = atoi(value);
>
> + if (date_order) {
> + static const char *date_order_arg = "--date-order";
> + vector_push(&vec, &date_order_arg, 0);
> + }
> +
> + if (topo_order) {
> + static const char *topo_order_arg = "--topo-order";
> + vector_push(&vec, &topo_order_arg, 0);
> + }


Some quick testing of git log reveals that only date-order or
topo-order can be specified, and if both are specified, it just rolls
with the last one.

As such, consider reworking these two options into a single option,
similar to how the "section-sort" option does it.



> This makes it possible to use strict commit date ordering even when
> the commit graph flag is activated.

Does this destroy the consistency of the commit graph at all? What are
the side effects here?




^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/3] Added "sort-sections" flag for the repository listing
  2012-10-09 19:10         ` Jason
@ 2012-10-09 19:11           ` Jason
  2012-10-09 21:54             ` Tobias.Bieniek
  2012-10-09 21:49           ` Tobias.Bieniek
  2012-10-13 14:24           ` Tobias.Bieniek
  2 siblings, 1 reply; 16+ messages in thread
From: Jason @ 2012-10-09 19:11 UTC (permalink / raw)


> Subject: [PATCH] Added "sort-sections" flag for the repository listing
>
> Flag which, when set to "1", will sort the sections on the repository
> listing by name. Set this flag to "0" if the order in the cgitrc file
> should be preserved. Default value: "1".

This functionality already exists, via the section-sort option, merged
with master in July:
http://git.zx2c4.com/cgit/commit/?id=184c5655b2e350dbd0dd8be75d3f370f22aa6dee




^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/3] Added "sort-sections" flag for the repository listing
  2012-10-09 18:59     ` Tobias.Bieniek
  2012-10-09 19:03       ` Jason
@ 2012-10-09 19:12       ` Jason
  1 sibling, 0 replies; 16+ messages in thread
From: Jason @ 2012-10-09 19:12 UTC (permalink / raw)


On Tue, Oct 9, 2012 at 8:59 PM, Tobias Bieniek <Tobias.Bieniek at gmx.de> wrote:
> Let me know if
> you prefer patch files,

I usually prefer patch files, but I can deal with whatever.




^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/3] Added "sort-sections" flag for the repository listing
  2012-10-09 19:03       ` Jason
  2012-10-09 19:10         ` Jason
@ 2012-10-09 21:47         ` Tobias.Bieniek
  1 sibling, 0 replies; 16+ messages in thread
From: Tobias.Bieniek @ 2012-10-09 21:47 UTC (permalink / raw)


>> This makes it possible to activate the enable_commit_graph,
>> enable_log_filecount and enable_log_linecount for individual
>> repositories, even if the global setting is "0" (default).
>>
>>
>> - repo->enable_commit_graph = ctx.cfg.enable_commit_graph * atoi(value);
>> + repo->enable_commit_graph = atoi(value);
>
> Was this the intended behavior before, or was this erroneously copy
> and pasted from elsewhere, and is therefore a bug? What I'm wondering
> is -- should I evaluate this as a behavior change or as a bug fix?

IMHO this should be treated as a bug fix. The settings for the
individual repos should overwrite the global settings. If I remember
correctly this is the way most other settings are handled too only
these few settings were not doing it properly.




^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/3] Added "sort-sections" flag for the repository listing
  2012-10-09 19:10         ` Jason
  2012-10-09 19:11           ` Jason
@ 2012-10-09 21:49           ` Tobias.Bieniek
  2012-10-09 22:15             ` Jason
  2012-10-13 14:24           ` Tobias.Bieniek
  2 siblings, 1 reply; 16+ messages in thread
From: Tobias.Bieniek @ 2012-10-09 21:49 UTC (permalink / raw)


2012/10/9 Jason A. Donenfeld <Jason at zx2c4.com>:
>> + else if (!strcmp(name, "date-order"))
>> + repo->date_order = atoi(value);
>> + else if (!strcmp(name, "topo-order"))
>> + repo->topo_order = atoi(value);
>>
>> + if (date_order) {
>> + static const char *date_order_arg = "--date-order";
>> + vector_push(&vec, &date_order_arg, 0);
>> + }
>> +
>> + if (topo_order) {
>> + static const char *topo_order_arg = "--topo-order";
>> + vector_push(&vec, &topo_order_arg, 0);
>> + }
>
>
> Some quick testing of git log reveals that only date-order or
> topo-order can be specified, and if both are specified, it just rolls
> with the last one.
>
> As such, consider reworking these two options into a single option,
> similar to how the "section-sort" option does it.

Makes sense, I'll have a look at it.

>> This makes it possible to use strict commit date ordering even when
>> the commit graph flag is activated.
>
> Does this destroy the consistency of the commit graph at all? What are
> the side effects here?

We have used the strict date ordering at http://git.xcsoar.org/ for a
few months now and we did not experience any issues at all.




^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/3] Added "sort-sections" flag for the repository listing
  2012-10-09 19:11           ` Jason
@ 2012-10-09 21:54             ` Tobias.Bieniek
  2012-10-09 22:16               ` Jason
  0 siblings, 1 reply; 16+ messages in thread
From: Tobias.Bieniek @ 2012-10-09 21:54 UTC (permalink / raw)


2012/10/9 Jason A. Donenfeld <Jason at zx2c4.com>:
>> Subject: [PATCH] Added "sort-sections" flag for the repository listing
>>
>> Flag which, when set to "1", will sort the sections on the repository
>> listing by name. Set this flag to "0" if the order in the cgitrc file
>> should be preserved. Default value: "1".
>
> This functionality already exists, via the section-sort option, merged
> with master in July:
> http://git.zx2c4.com/cgit/commit/?id=184c5655b2e350dbd0dd8be75d3f370f22aa6dee

Not quite. This patch deals with the sorting of the sections, not the
content of the sections!

Example: http://git.xcsoar.org/

Normally cgit would order the existing sections like this:
Individual developer repositories, Mirrors of related projects,
Official repositories

but we wanted it like this:
Official repositories, Individual developer repositories, Mirrors of
related projects

so the solution is to set sort-sections to 0 and define the order
manually in the cgitrc file.




^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/3] Added "sort-sections" flag for the repository listing
  2012-10-09 21:49           ` Tobias.Bieniek
@ 2012-10-09 22:15             ` Jason
  2012-10-09 22:26               ` Tobias.Bieniek
  0 siblings, 1 reply; 16+ messages in thread
From: Jason @ 2012-10-09 22:15 UTC (permalink / raw)


On Tue, Oct 9, 2012 at 11:49 PM, Tobias Bieniek <Tobias.Bieniek at gmx.de> wrote:
>
> We have used the strict date ordering at http://git.xcsoar.org/ for a
> few months now and we did not experience any issues at all.

It doesn't look like commit graph is enabled there?

I'll need to spend some time looking through this to be sure commit
graph doesn't explode -- it's fairly sensitive.




^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/3] Added "sort-sections" flag for the repository listing
  2012-10-09 21:54             ` Tobias.Bieniek
@ 2012-10-09 22:16               ` Jason
  0 siblings, 0 replies; 16+ messages in thread
From: Jason @ 2012-10-09 22:16 UTC (permalink / raw)


On Tue, Oct 9, 2012 at 11:54 PM, Tobias Bieniek <Tobias.Bieniek at gmx.de> wrote:
> Not quite. This patch deals with the sorting of the sections, not the
> content of the sections!

Yes, you're right! I'll have another look at this.




^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/3] Added "sort-sections" flag for the repository listing
  2012-10-09 22:15             ` Jason
@ 2012-10-09 22:26               ` Tobias.Bieniek
  0 siblings, 0 replies; 16+ messages in thread
From: Tobias.Bieniek @ 2012-10-09 22:26 UTC (permalink / raw)


2012/10/10 Jason A. Donenfeld <Jason at zx2c4.com>:
> On Tue, Oct 9, 2012 at 11:49 PM, Tobias Bieniek <Tobias.Bieniek at gmx.de> wrote:
>>
>> We have used the strict date ordering at http://git.xcsoar.org/ for a
>> few months now and we did not experience any issues at all.
>
> It doesn't look like commit graph is enabled there?
>
> I'll need to spend some time looking through this to be sure commit
> graph doesn't explode -- it's fairly sensitive.

it is enabled. see http://git.xcsoar.org/cgit/master/xcsoar.git/log/
for example.

whether it is exploding or not depends on the repo, I guess. but I
would let the users decide whether they want the date-ordering or not.
the default should obviously be similar to the default of the git log
command.




^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/3] Added "sort-sections" flag for the repository listing
  2012-10-09 19:10         ` Jason
  2012-10-09 19:11           ` Jason
  2012-10-09 21:49           ` Tobias.Bieniek
@ 2012-10-13 14:24           ` Tobias.Bieniek
  2 siblings, 0 replies; 16+ messages in thread
From: Tobias.Bieniek @ 2012-10-13 14:24 UTC (permalink / raw)


2012/10/9 Jason A. Donenfeld <Jason at zx2c4.com>:
>> + else if (!strcmp(name, "date-order"))
>> + repo->date_order = atoi(value);
>> + else if (!strcmp(name, "topo-order"))
>> + repo->topo_order = atoi(value);
>>
>> + if (date_order) {
>> + static const char *date_order_arg = "--date-order";
>> + vector_push(&vec, &date_order_arg, 0);
>> + }
>> +
>> + if (topo_order) {
>> + static const char *topo_order_arg = "--topo-order";
>> + vector_push(&vec, &topo_order_arg, 0);
>> + }
>
>
> Some quick testing of git log reveals that only date-order or
> topo-order can be specified, and if both are specified, it just rolls
> with the last one.
>
> As such, consider reworking these two options into a single option,
> similar to how the "section-sort" option does it.

Hi Jason, I've reworked the ordering commit. The new flag is called
"log-order" and can have the values "date", "topo" or any other value
for the default ordering. The commits are available again in the same
repository at git://github.com/Turbo87/cgit.git

Turbo




^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-10-13 14:24 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-02 15:38 [PATCH 1/3] Added "sort-sections" flag for the repository listing Tobias.Bieniek
2012-07-02 15:38 ` [PATCH 2/3] Added "date-order" and "topo-order" flags Tobias.Bieniek
2012-07-02 15:38 ` [PATCH 3/3] Fixed parameter parsing in repo_config() function Tobias.Bieniek
     [not found] ` <CABEOeT=yfWaqRfanCcgVYLkTa3PD8JtkfvY2NfTGxNOAO2PEFQ@mail.gmail.com>
2012-10-08 21:11   ` [PATCH 1/3] Added "sort-sections" flag for the repository listing Jason
2012-10-09 18:59     ` Tobias.Bieniek
2012-10-09 19:03       ` Jason
2012-10-09 19:10         ` Jason
2012-10-09 19:11           ` Jason
2012-10-09 21:54             ` Tobias.Bieniek
2012-10-09 22:16               ` Jason
2012-10-09 21:49           ` Tobias.Bieniek
2012-10-09 22:15             ` Jason
2012-10-09 22:26               ` Tobias.Bieniek
2012-10-13 14:24           ` Tobias.Bieniek
2012-10-09 21:47         ` Tobias.Bieniek
2012-10-09 19:12       ` Jason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).