{"thread":{"id":"26539","subject":"[CGit] [PATCH 0/6] Communicate the repo name to the filter scripts","startedAt":"2011-02-17T21:11:03Z","lastAt":"2011-02-24T13:32:45Z","messageCount":11,"participants":["Ferry Huberts","Lars Hjemli"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"161452","messageId":"1297977069-21884-1-git-send-email-mailings@hupie.com","threadId":"26539","inReplyTo":null,"subject":"[CGit] [PATCH 0/6] Communicate the repo name to the filter scripts","fromName":"Ferry Huberts","fromEmail":"mailings@hupie.com","sentAt":"2011-02-17T21:11:03Z","receivedAt":"2011-02-17T21:11:03Z","isPatch":true,"sender":{"key":"mailings@hupie.com","avatar":"https://gravatar.com/avatar/ca355376c0713475e17ae413a49f6b98bcbc54cd8364cab7113c53107fb839bb?d=mp&s=160"},"body":"From: Ferry Huberts <ferry.huberts@pelagic.nl>\n\nThis patch series fixes two bugs and communicates the repo name\nto the filter scripts.\n\nI have a server setup in which each repo has a trac instance and\nfor the commit filter I really need to known with which repo I'm\ndealing in order to be able to resolve the #123 ticket numbers\ninto hyperlinks into the correct trac instance.\n\nPatch 0001 fixes a memory leak and can be applied regardless of the other\n           patches\nPatch 0002 makes sure that all arguments for the filter are correctly initialised\n           so that the argv[] list is always terminated with a NULL pointer,\n           which is currently not the case for the source filter.\nThe other patches implement my desired functionality.\n\n\nFerry Huberts (6):\n  source_filter: fix a memory leak\n  new_filter: correctly initialise all arguments for a new filter\n  new_filter: determine extra_args from filter type\n  source_filter: also communicate the repo name to the filter\n  commit_filter: also communicate the repo name to the filter\n  about_filter: also communicate the repo name to the filter\n\n cgit.c                         |   41 +++++++++++++++++++++++++++++++--------\n filters/commit-links.sh        |    2 +\n filters/syntax-highlighting.sh |    1 +\n ui-commit.c                    |    5 +++-\n ui-repolist.c                  |    5 +++-\n ui-summary.c                   |    5 +++-\n ui-tree.c                      |    4 +++\n 7 files changed, 51 insertions(+), 12 deletions(-)\n\n-- \n1.7.4\n"},{"id":"161454","messageId":"1297977069-21884-2-git-send-email-mailings@hupie.com","threadId":"26539","inReplyTo":"1297977069-21884-1-git-send-email-mailings@hupie.com","subject":"[CGit] [PATCH 1/6] source_filter: fix a memory leak","fromName":"Ferry Huberts","fromEmail":"mailings@hupie.com","sentAt":"2011-02-17T21:11:04Z","receivedAt":"2011-02-17T21:11:04Z","isPatch":true,"sender":{"key":"mailings@hupie.com","avatar":"https://gravatar.com/avatar/ca355376c0713475e17ae413a49f6b98bcbc54cd8364cab7113c53107fb839bb?d=mp&s=160"},"body":"From: Ferry Huberts <ferry.huberts@pelagic.nl>\n\nSigned-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>\n---\n ui-tree.c |    2 ++\n 1 files changed, 2 insertions(+), 0 deletions(-)\n\ndiff --git a/ui-tree.c b/ui-tree.c\nindex 0b1b531..442b6be 100644\n--- a/ui-tree.c\n+++ b/ui-tree.c\n@@ -48,6 +48,8 @@ static void print_text_buffer(const char *name, char *buf, unsigned long size)\n \t\tcgit_open_filter(ctx.repo->source_filter);\n \t\thtml_raw(buf, size);\n \t\tcgit_close_filter(ctx.repo->source_filter);\n+\t\tfree(ctx.repo->source_filter->argv[1]);\n+\t\tctx.repo->source_filter->argv[1] = NULL;\n \t\thtml(\"</code></pre></td></tr></table>\\n\");\n \t\treturn;\n \t}\n-- \n1.7.4\n"},{"id":"161453","messageId":"1297977069-21884-3-git-send-email-mailings@hupie.com","threadId":"26539","inReplyTo":"1297977069-21884-1-git-send-email-mailings@hupie.com","subject":"[CGit] [PATCH 2/6] new_filter: correctly initialise all arguments for a new filter","fromName":"Ferry Huberts","fromEmail":"mailings@hupie.com","sentAt":"2011-02-17T21:11:05Z","receivedAt":"2011-02-17T21:11:05Z","isPatch":true,"sender":{"key":"mailings@hupie.com","avatar":"https://gravatar.com/avatar/ca355376c0713475e17ae413a49f6b98bcbc54cd8364cab7113c53107fb839bb?d=mp&s=160"},"body":"From: Ferry Huberts <ferry.huberts@pelagic.nl>\n\nSigned-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>\n---\n cgit.c |    7 +++++--\n 1 files changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/cgit.c b/cgit.c\nindex 412fbf0..4440feb 100644\n--- a/cgit.c\n+++ b/cgit.c\n@@ -28,6 +28,7 @@ void add_mimetype(const char *name, const char *value)\n \n struct cgit_filter *new_filter(const char *cmd, int extra_args)\n {\n+\tint i = 0;\n \tstruct cgit_filter *f;\n \n \tif (!cmd || !cmd[0])\n@@ -36,8 +37,10 @@ struct cgit_filter *new_filter(const char *cmd, int extra_args)\n \tf = xmalloc(sizeof(struct cgit_filter));\n \tf->cmd = xstrdup(cmd);\n \tf->argv = xmalloc((2 + extra_args) * sizeof(char *));\n-\tf->argv[0] = f->cmd;\n-\tf->argv[1] = NULL;\n+\tf->argv[i++] = f->cmd;\n+\twhile (i < (2 + extra_args)) {\n+\t  f->argv[i++] = NULL;\n+\t}\n \treturn f;\n }\n \n-- \n1.7.4\n"},{"id":"161456","messageId":"1297977069-21884-4-git-send-email-mailings@hupie.com","threadId":"26539","inReplyTo":"1297977069-21884-1-git-send-email-mailings@hupie.com","subject":"[CGit] [PATCH 3/6] new_filter: determine extra_args from filter type","fromName":"Ferry Huberts","fromEmail":"mailings@hupie.com","sentAt":"2011-02-17T21:11:06Z","receivedAt":"2011-02-17T21:11:06Z","isPatch":true,"sender":{"key":"mailings@hupie.com","avatar":"https://gravatar.com/avatar/ca355376c0713475e17ae413a49f6b98bcbc54cd8364cab7113c53107fb839bb?d=mp&s=160"},"body":"From: Ferry Huberts <ferry.huberts@pelagic.nl>\n\nSigned-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>\n---\n cgit.c |   34 +++++++++++++++++++++++++++-------\n 1 files changed, 27 insertions(+), 7 deletions(-)\n\ndiff --git a/cgit.c b/cgit.c\nindex 4440feb..6fa8f60 100644\n--- a/cgit.c\n+++ b/cgit.c\n@@ -18,6 +18,10 @@\n \n const char *cgit_version = CGIT_VERSION;\n \n+typedef enum {\n+\tabout, commit, source\n+} filter_type;\n+\n void add_mimetype(const char *name, const char *value)\n {\n \tstruct string_list_item *item;\n@@ -26,14 +30,30 @@ void add_mimetype(const char *name, const char *value)\n \titem->util = xstrdup(value);\n }\n \n-struct cgit_filter *new_filter(const char *cmd, int extra_args)\n+struct cgit_filter *new_filter(const char *cmd, filter_type filtertype)\n {\n \tint i = 0;\n \tstruct cgit_filter *f;\n+\tint extra_args;\n \n \tif (!cmd || !cmd[0])\n \t\treturn NULL;\n \n+\tswitch (filtertype) {\n+\t\tcase about:\n+\t\tcase commit:\n+\t\t\textra_args = 0;\n+\t\t\tbreak;\n+\n+\t\tcase source:\n+\t\t\textra_args = 1;\n+\t\t\tbreak;\n+\n+\t\tdefault:\n+\t\t\textra_args = 0;\n+\t\t\tbreak;\n+\t}\n+\n \tf = xmalloc(sizeof(struct cgit_filter));\n \tf->cmd = xstrdup(cmd);\n \tf->argv = xmalloc((2 + extra_args) * sizeof(char *));\n@@ -78,11 +98,11 @@ void repo_config(struct cgit_repo *repo, const char *name, const char *value)\n \t\trepo->readme = xstrdup(value);\n \t} else if (ctx.cfg.enable_filter_overrides) {\n \t\tif (!strcmp(name, \"about-filter\"))\n-\t\t\trepo->about_filter = new_filter(value, 0);\n+\t\t\trepo->about_filter = new_filter(value, about);\n \t\telse if (!strcmp(name, \"commit-filter\"))\n-\t\t\trepo->commit_filter = new_filter(value, 0);\n+\t\t\trepo->commit_filter = new_filter(value, commit);\n \t\telse if (!strcmp(name, \"source-filter\"))\n-\t\t\trepo->source_filter = new_filter(value, 1);\n+\t\t\trepo->source_filter = new_filter(value, source);\n \t}\n }\n \n@@ -171,9 +191,9 @@ void config_cb(const char *name, const char *value)\n \telse if (!strcmp(name, \"cache-dynamic-ttl\"))\n \t\tctx.cfg.cache_dynamic_ttl = atoi(value);\n \telse if (!strcmp(name, \"about-filter\"))\n-\t\tctx.cfg.about_filter = new_filter(value, 0);\n+\t\tctx.cfg.about_filter = new_filter(value, about);\n \telse if (!strcmp(name, \"commit-filter\"))\n-\t\tctx.cfg.commit_filter = new_filter(value, 0);\n+\t\tctx.cfg.commit_filter = new_filter(value, commit);\n \telse if (!strcmp(name, \"embedded\"))\n \t\tctx.cfg.embedded = atoi(value);\n \telse if (!strcmp(name, \"max-atom-items\"))\n@@ -201,7 +221,7 @@ void config_cb(const char *name, const char *value)\n \telse if (!strcmp(name, \"section-from-path\"))\n \t\tctx.cfg.section_from_path = atoi(value);\n \telse if (!strcmp(name, \"source-filter\"))\n-\t\tctx.cfg.source_filter = new_filter(value, 1);\n+\t\tctx.cfg.source_filter = new_filter(value, source);\n \telse if (!strcmp(name, \"summary-log\"))\n \t\tctx.cfg.summary_log = atoi(value);\n \telse if (!strcmp(name, \"summary-branches\"))\n-- \n1.7.4\n"},{"id":"161455","messageId":"1297977069-21884-5-git-send-email-mailings@hupie.com","threadId":"26539","inReplyTo":"1297977069-21884-1-git-send-email-mailings@hupie.com","subject":"[CGit] [PATCH 4/6] source_filter: also communicate the repo name to the filter","fromName":"Ferry Huberts","fromEmail":"mailings@hupie.com","sentAt":"2011-02-17T21:11:07Z","receivedAt":"2011-02-17T21:11:07Z","isPatch":true,"sender":{"key":"mailings@hupie.com","avatar":"https://gravatar.com/avatar/ca355376c0713475e17ae413a49f6b98bcbc54cd8364cab7113c53107fb839bb?d=mp&s=160"},"body":"From: Ferry Huberts <ferry.huberts@pelagic.nl>\n\nSigned-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>\n---\n cgit.c                         |    2 +-\n filters/syntax-highlighting.sh |    1 +\n ui-tree.c                      |    2 ++\n 3 files changed, 4 insertions(+), 1 deletions(-)\n\ndiff --git a/cgit.c b/cgit.c\nindex 6fa8f60..65c892c 100644\n--- a/cgit.c\n+++ b/cgit.c\n@@ -46,7 +46,7 @@ struct cgit_filter *new_filter(const char *cmd, filter_type filtertype)\n \t\t\tbreak;\n \n \t\tcase source:\n-\t\t\textra_args = 1;\n+\t\t\textra_args = 2;\n \t\t\tbreak;\n \n \t\tdefault:\ndiff --git a/filters/syntax-highlighting.sh b/filters/syntax-highlighting.sh\nindex 6b1c576..80d670f 100755\n--- a/filters/syntax-highlighting.sh\n+++ b/filters/syntax-highlighting.sh\n@@ -26,6 +26,7 @@\n \n # store filename and extension in local vars\n BASENAME=\"$1\"\n+REPONAME=\"$2\"\n EXTENSION=\"${BASENAME##*.}\"\n \n # map Makefile and Makefile.* to .mk\ndiff --git a/ui-tree.c b/ui-tree.c\nindex 442b6be..2c7298c 100644\n--- a/ui-tree.c\n+++ b/ui-tree.c\n@@ -45,6 +45,8 @@ static void print_text_buffer(const char *name, char *buf, unsigned long size)\n \tif (ctx.repo->source_filter) {\n \t\thtml(\"<td class='lines'><pre><code>\");\n \t\tctx.repo->source_filter->argv[1] = xstrdup(name);\n+\t\tif (!ctx.repo->source_filter->argv[2])\n+\t\t\tctx.repo->source_filter->argv[2] = xstrdup(ctx.repo->name);\n \t\tcgit_open_filter(ctx.repo->source_filter);\n \t\thtml_raw(buf, size);\n \t\tcgit_close_filter(ctx.repo->source_filter);\n-- \n1.7.4\n"},{"id":"161457","messageId":"1297977069-21884-6-git-send-email-mailings@hupie.com","threadId":"26539","inReplyTo":"1297977069-21884-1-git-send-email-mailings@hupie.com","subject":"[CGit] [PATCH 5/6] commit_filter: also communicate the repo name to the filter","fromName":"Ferry Huberts","fromEmail":"mailings@hupie.com","sentAt":"2011-02-17T21:11:08Z","receivedAt":"2011-02-17T21:11:08Z","isPatch":true,"sender":{"key":"mailings@hupie.com","avatar":"https://gravatar.com/avatar/ca355376c0713475e17ae413a49f6b98bcbc54cd8364cab7113c53107fb839bb?d=mp&s=160"},"body":"From: Ferry Huberts <ferry.huberts@pelagic.nl>\n\nSigned-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>\n---\n cgit.c                  |    5 ++++-\n filters/commit-links.sh |    2 ++\n ui-commit.c             |    5 ++++-\n 3 files changed, 10 insertions(+), 2 deletions(-)\n\ndiff --git a/cgit.c b/cgit.c\nindex 65c892c..9e8c4c4 100644\n--- a/cgit.c\n+++ b/cgit.c\n@@ -41,10 +41,13 @@ struct cgit_filter *new_filter(const char *cmd, filter_type filtertype)\n \n \tswitch (filtertype) {\n \t\tcase about:\n-\t\tcase commit:\n \t\t\textra_args = 0;\n \t\t\tbreak;\n \n+\t\tcase commit:\n+\t\t\textra_args = 1;\n+\t\t\tbreak;\n+\n \t\tcase source:\n \t\t\textra_args = 2;\n \t\t\tbreak;\ndiff --git a/filters/commit-links.sh b/filters/commit-links.sh\nindex 110c609..d098cd5 100755\n--- a/filters/commit-links.sh\n+++ b/filters/commit-links.sh\n@@ -3,6 +3,8 @@\n #\n # To use this script, refer to this file with either the commit-filter or the\n # repo.commit-filter options in cgitrc.\n+#\n+# 1st argument is the repo name\n \n # This expression generates links to commits referenced by their SHA1.\n regex=$regex'\ndiff --git a/ui-commit.c b/ui-commit.c\nindex 2b4f677..b0607d0 100644\n--- a/ui-commit.c\n+++ b/ui-commit.c\n@@ -109,8 +109,11 @@ void cgit_print_commit(char *hex, const char *prefix)\n \t}\n \thtml(\"</table>\\n\");\n \thtml(\"<div class='commit-subject'>\");\n-\tif (ctx.repo->commit_filter)\n+\tif (ctx.repo->commit_filter) {\n+\t\tif (!ctx.repo->commit_filter->argv[1])\n+\t\t\tctx.repo->commit_filter->argv[1] = xstrdup(ctx.repo->name);\n \t\tcgit_open_filter(ctx.repo->commit_filter);\n+\t}\n \thtml_txt(info->subject);\n \tif (ctx.repo->commit_filter)\n \t\tcgit_close_filter(ctx.repo->commit_filter);\n-- \n1.7.4\n"},{"id":"161458","messageId":"1297977069-21884-7-git-send-email-mailings@hupie.com","threadId":"26539","inReplyTo":"1297977069-21884-1-git-send-email-mailings@hupie.com","subject":"[CGit] [PATCH 6/6] about_filter: also communicate the repo name to the filter","fromName":"Ferry Huberts","fromEmail":"mailings@hupie.com","sentAt":"2011-02-17T21:11:09Z","receivedAt":"2011-02-17T21:11:09Z","isPatch":true,"sender":{"key":"mailings@hupie.com","avatar":"https://gravatar.com/avatar/ca355376c0713475e17ae413a49f6b98bcbc54cd8364cab7113c53107fb839bb?d=mp&s=160"},"body":"From: Ferry Huberts <ferry.huberts@pelagic.nl>\n\nSigned-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>\n---\n cgit.c        |    3 ---\n ui-repolist.c |    5 ++++-\n ui-summary.c  |    5 ++++-\n 3 files changed, 8 insertions(+), 5 deletions(-)\n\ndiff --git a/cgit.c b/cgit.c\nindex 9e8c4c4..653b099 100644\n--- a/cgit.c\n+++ b/cgit.c\n@@ -41,9 +41,6 @@ struct cgit_filter *new_filter(const char *cmd, filter_type filtertype)\n \n \tswitch (filtertype) {\n \t\tcase about:\n-\t\t\textra_args = 0;\n-\t\t\tbreak;\n-\n \t\tcase commit:\n \t\t\textra_args = 1;\n \t\t\tbreak;\ndiff --git a/ui-repolist.c b/ui-repolist.c\nindex 2c98668..a0c2235 100644\n--- a/ui-repolist.c\n+++ b/ui-repolist.c\n@@ -290,8 +290,11 @@ void cgit_print_site_readme()\n {\n \tif (!ctx.cfg.root_readme)\n \t\treturn;\n-\tif (ctx.cfg.about_filter)\n+\tif (ctx.cfg.about_filter) {\n+\t\tif (!ctx.repo->about_filter->argv[1])\n+\t\t\tctx.repo->about_filter->argv[1] = xstrdup(ctx.repo->name);\n \t\tcgit_open_filter(ctx.cfg.about_filter);\n+\t}\n \thtml_include(ctx.cfg.root_readme);\n \tif (ctx.cfg.about_filter)\n \t\tcgit_close_filter(ctx.cfg.about_filter);\ndiff --git a/ui-summary.c b/ui-summary.c\nindex b203bcc..f8c85a2 100644\n--- a/ui-summary.c\n+++ b/ui-summary.c\n@@ -112,8 +112,11 @@ void cgit_print_repo_readme(char *path)\n \t * filesystem, while applying the about-filter.\n \t */\n \thtml(\"<div id='summary'>\");\n-\tif (ctx.repo->about_filter)\n+\tif (ctx.repo->about_filter) {\n+\t\tif (!ctx.repo->about_filter->argv[1])\n+\t\t\tctx.repo->about_filter->argv[1] = xstrdup(ctx.repo->name);\n \t\tcgit_open_filter(ctx.repo->about_filter);\n+\t}\n \tif (ref)\n \t\tcgit_print_file(tmp, ref);\n \telse\n-- \n1.7.4\n"},{"id":"161459","messageId":"4D5D91D1.3070802@hupie.com","threadId":"26539","inReplyTo":"1297977069-21884-1-git-send-email-mailings@hupie.com","subject":"Re: [CGit] [PATCH 0/6] Communicate the repo name to the filter scripts","fromName":"Ferry Huberts","fromEmail":"mailings@hupie.com","sentAt":"2011-02-17T21:23:29Z","receivedAt":"2011-02-17T21:23:29Z","isPatch":true,"sender":{"key":"mailings@hupie.com","avatar":"https://gravatar.com/avatar/ca355376c0713475e17ae413a49f6b98bcbc54cd8364cab7113c53107fb839bb?d=mp&s=160"},"body":"PS. this patch series is (re)based on the current master\n17596459fe9a43428a261e66f65b227d15bf7ee5\n\ngrtz\n\n-- \nFerry Huberts\n"},{"id":"161593","messageId":"AANLkTimASPjeHor3R6c=i1xpjftxrg4NnFaLJfReuZ-X@mail.gmail.com","threadId":"26539","inReplyTo":"1297977069-21884-1-git-send-email-mailings@hupie.com","subject":"Re: [CGit] [PATCH 0/6] Communicate the repo name to the filter scripts","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2011-02-19T08:46:15Z","receivedAt":"2011-02-19T08:46:15Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On Thu, Feb 17, 2011 at 22:11, Ferry Huberts <mailings@hupie.com> wrote:\n> This patch series fixes two bugs and communicates the repo name\n> to the filter scripts.\n\nThanks, but I think the current filter invocations with unnamed,\npositional command arguments was a mistake. We should probably fix it\ninstead of extending it, taking care not to break backwards\ncompatibility.\n\nThe easiest fix would be to add some environment variables:\n* GIT_DIR\n* CGIT_REPO_NAME\n* CGIT_REPO_REL_URL\n* CGIT_REPO_ABS_URL\n* CGIT_BRANCH_NAME\n* CGIT_COMMIT_ID\n* CGIT_PATH_FILTER\n\nWhat do you think?\n\n--\nlarsh\n"},{"id":"161616","messageId":"4D5FCBAB.6060009@hupie.com","threadId":"26539","inReplyTo":"AANLkTimASPjeHor3R6c=i1xpjftxrg4NnFaLJfReuZ-X@mail.gmail.com","subject":"Re: [CGit] [PATCH 0/6] Communicate the repo name to the filter scripts","fromName":"Ferry Huberts","fromEmail":"mailings@hupie.com","sentAt":"2011-02-19T13:54:51Z","receivedAt":"2011-02-19T13:54:51Z","isPatch":true,"sender":{"key":"mailings@hupie.com","avatar":"https://gravatar.com/avatar/ca355376c0713475e17ae413a49f6b98bcbc54cd8364cab7113c53107fb839bb?d=mp&s=160"},"body":"On 02/19/2011 09:46 AM, Lars Hjemli wrote:\n> On Thu, Feb 17, 2011 at 22:11, Ferry Huberts <mailings@hupie.com> wrote:\n>> This patch series fixes two bugs and communicates the repo name\n>> to the filter scripts.\n> \n> Thanks, but I think the current filter invocations with unnamed,\n> positional command arguments was a mistake. We should probably fix it\n> instead of extending it, taking care not to break backwards\n> compatibility.\n> \n> The easiest fix would be to add some environment variables:\n> * GIT_DIR\n> * CGIT_REPO_NAME\n> * CGIT_REPO_REL_URL\n> * CGIT_REPO_ABS_URL\n> * CGIT_BRANCH_NAME\n> * CGIT_COMMIT_ID\n> * CGIT_PATH_FILTER\n> \n> What do you think?\n> \n> --\n> larsh\n\nI've been thinking about this too and did think about this solution but\nalso about a solution in which these settings are written to a temporary\nfile. I have no preference as long as the repo settings are communicated\nto the filter script. Writing to a file is probably bad for performance\nthough.\n\nThe patches I sent just plainly solve my own problem and I was hoping a\nbit for this discussion :-)\n\nYour proposal sounds reasonable and a good approach.\n\nI'm a bit worried about the GIT_DIR env var, about it conflicting with\nthe real git env var. It's probably best to rename that one to CGIT_GIT_DIR.\n\nAlso, we'd have to be sure that when we set these env vars that they're\nonly propagated to the filter script we're going to run and not to other\nenvs: running filter scripts in parallel must not be prevented.\n\n\nHave you looked at the first 2 patches?\nThese solve bugs and can be applied regardless of this discussion.\n\n\nplease let me know what you think.\n\n\ngrtz\n-- \nFerry Huberts\n"},{"id":"162134","messageId":"4D665DFD.6080802@hupie.com","threadId":"26539","inReplyTo":"AANLkTimASPjeHor3R6c=i1xpjftxrg4NnFaLJfReuZ-X@mail.gmail.com","subject":"Re: [CGit] [PATCH 0/6] Communicate the repo name to the filter scripts","fromName":"Ferry Huberts","fromEmail":"mailings@hupie.com","sentAt":"2011-02-24T13:32:45Z","receivedAt":"2011-02-24T13:32:45Z","isPatch":true,"sender":{"key":"mailings@hupie.com","avatar":"https://gravatar.com/avatar/ca355376c0713475e17ae413a49f6b98bcbc54cd8364cab7113c53107fb839bb?d=mp&s=160"},"body":"Lars,\n\nI've put my repo on github: https://github.com/fhuberts/cgit\nYou can fetch my changes from there\n\nAny idea on how to proceed?\n\n\nOn 02/19/2011 09:46 AM, Lars Hjemli wrote:\n> On Thu, Feb 17, 2011 at 22:11, Ferry Huberts <mailings@hupie.com> wrote:\n>> This patch series fixes two bugs and communicates the repo name\n>> to the filter scripts.\n> \n> Thanks, but I think the current filter invocations with unnamed,\n> positional command arguments was a mistake. We should probably fix it\n> instead of extending it, taking care not to break backwards\n> compatibility.\n> \n> The easiest fix would be to add some environment variables:\n> * GIT_DIR\n> * CGIT_REPO_NAME\n> * CGIT_REPO_REL_URL\n> * CGIT_REPO_ABS_URL\n> * CGIT_BRANCH_NAME\n> * CGIT_COMMIT_ID\n> * CGIT_PATH_FILTER\n> \n> What do you think?\n> \n> --\n> larsh\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n\ngrtz\n\n-- \nFerry Huberts\n"}]}