On Mon, Aug 08, 2011 at 11:08:26AM -0700, Junio C Hamano wrote: > > + 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 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html