On Tue, 24 May 2016 at 18:15:18, Lukas Fleischer wrote:
> When composing snapshot file names for a tag with a prefix of the form
> v[0-9] (resp. V[0-9]), the leading "v" (resp. "V") is stripped. This
> leads to conflicts if a tag with the stripped name already exists or if
> there are tags only
Signed-off-by: Richard Maw
---
ui-refs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ui-refs.c b/ui-refs.c
index 5b4530e..f21797b 100644
--- a/ui-refs.c
+++ b/ui-refs.c
@@ -189,9 +189,9 @@ void cgit_print_branches(int maxcount)
The find_current_ref callback does not need to be modified
to strip off the namespace prefix,
since the for_each_ref functions don't include the base ref prefix.
Signed-off-by: Richard Maw
---
cgit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
libgit has a for_each_namespaced_ref,
but lacks equivalents for just branches, tags or remotes.
Rather than implementing all of those helpers,
it's more convenient to implement just one
that prepends the namespace to the provided ref base.
Signed-off-by: Richard Maw
---
These patches are to support viewing the namespaces of a git repository
as independent git repositories.
You might want to do this for projects that share a lot of history
(e.g. systemd, udev and eudev), or to permit a user to "fork" a repository
so users on the same server can cheaply copy a
resolve_ref_unsafe() can't be told to be namespace aware,
so we need to prepend the namespace beforehand.
Additionally, we need to add the RESOLVE_REF_NO_RECURSE flag,
since otherwise if the commit that is pointed to exists in the root namespace,
it will opt to return that rather than the value
This uses the same age file as before if it's in the root namespace,
but puts the agefile in info/web/namespaced/$GIT_NAMESPACE/last-modified.
Signed-off-by: Richard Maw
---
contrib/hooks/post-receive.agefile | 15 ++-
1 file changed, 14 insertions(+), 1
This adds "repo.agefile", since namespaced repositories share the same files,
and we'd like to be able to see the ages of the refs for each namespace.
Whatever the git server uses for updating the age file must be namespace aware
and must write the age file to a path consistent with
Signed-off-by: Richard Maw
---
cgitrc.5.txt | 14 ++
1 file changed, 14 insertions(+)
diff --git a/cgitrc.5.txt b/cgitrc.5.txt
index 59127f8..b449338 100644
--- a/cgitrc.5.txt
+++ b/cgitrc.5.txt
@@ -468,6 +468,10 @@ repo.about-filter::
Override the
This contains the unexpanded name of the namespace
rather than the base ref of the namespace,
since the git namespace mechanism works by setting GIT_NAMESPACE
and on the first call to get_git_namespace() it gets expanded.
We need to save this for a later call to prepare_repo_cmd,
rather than
This is run soon before exiting so it wasn't leaked for long.
Signed-off-by: Richard Maw
---
cgit.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/cgit.c b/cgit.c
index ab3fadb..9427c4a 100644
--- a/cgit.c
+++ b/cgit.c
@@ -616,11 +616,11 @@
This causes all ref resolving to look for the requested branch
inside the current namespace.
Previously any form of git revision would be accepted,
but ref resolving isn't namespace aware
and it would be infeasible to replicate all its behaviour,
so we stick to providing the most common cases
of
This requires namespacing the HEAD symbolic ref
and the list of refs.
Sending HEAD required some tweaking,
since the file itself refers to a namespaced ref,
but we want to provide the ref with its namespace stripped off.
Signed-off-by: Richard Maw
---
ui-clone.c | 23
Signed-off-by: Richard Maw
---
cgitrc.5.txt | 32
1 file changed, 32 insertions(+)
diff --git a/cgitrc.5.txt b/cgitrc.5.txt
index 2e1912d..59127f8 100644
--- a/cgitrc.5.txt
+++ b/cgitrc.5.txt
@@ -570,6 +570,10 @@ repo.max-stats::
The get_ref_from_filename function is expected to return a sha1.
It didn't actually do this,
instead returning the ref that would under normal circumstances resolve to that.
Since we're going to resolve refs in a way that is namespace aware
we need to return the sha1 rather than the ref,
since
This is not strictly necessary,
as we do not have any way to generate namespace entries from a scan-path,
but I'd rather not leave this as a surprise
to someone who comes up with a good namespace discovery mechanism.
Signed-off-by: Richard Maw
---
cgit.c | 2 ++
1 file
Hi Richard,
This looks like really cool work. I'll review it this week and get
back to you. Thanks for submitting.
Jason
___
CGit mailing list
CGit@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/cgit
17 matches
Mail list logo