> I'd rather remove the complete section (However, that means that you have > to introduce a function to do that in config.c) No problem. > Also, the second part of your patch would be clearer (methinks) if you > replaced the call to get_sha1() with dwim_ref(). You'd get the real > refname for free... Not only that, my previous version did not work if somebody specified remotes/remote/upstreambranch instead of remote/upstreambranch. Updated version attached. Paolo