Thread (3 messages) flat view 3 messages, 3 authors, 2016-06-15

Re: [PATCH] Support specific color for a specific remote branches

From: Jeff King <hidden>
Date: 2016-06-15 22:51:46

On Mon, Aug 08, 2011 at 11:08:26AM -0700, Junio C Hamano wrote:
quoted
+	return 0;
+}
+
+static char *git_branch_get_custom_color_remote(const char *name)
+{
+	int name_len;
+	char* repo_name;
+	struct string_list_item *custom;
+	name_len = strchr(name, '/') - name;
Who said a remote name is terminated with (and cannot contain) a slash?

Shouldn't this code be consulting the configuration file to learn the
remote mapping, e.g.

    [remote "frotz"]
        fetch = +refs/heads/*:refs/remotes/nitfol/*

so that remote branches from "frotz" remote, that happen to be stored
under refs/remotes/nitfol/ hierarchy, are painted in the correct color?
This seems related to the recent thread about showing branches only for
a specific remote:

  http://article.gmane.org/gmane.comp.version-control.git/178668

Maybe the two should share code.

Right now, "git branch -r" means "show everything under refs/remotes
instead of refs/heads". This would be easy to implement if it instead
meant "show all refs created by the RHS of a fetch refspec in a
configured remote". The two are equivalent in the default config, but
the latter may make more sense in a complex case.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help