From: Junio C Hamano Date: Mon, 30 Mar 2015 22:24:26 GMT Subject: Re: [PATCH] show-branch: show all local heads when only giving one rev along --topics Message-ID: In-Reply-To: <1427753543-19680-1-git-send-email-mh@glandium.org> Mike Hommey writes: > (Maybe --topics should always require one rev on the command > line?) That sounds line a good thing to do. > - else if (all_heads + all_remotes) > - snarf_refs(all_heads, all_remotes); > else { > while (0 < ac) { > append_one_rev(*av); > ac--; av++; > } > + if (all_heads + all_remotes) > + snarf_refs(all_heads, all_remotes); Hmmmmmm. Is this safe and will not cause problems by possibly duplicated refnames that came from the command line and the ones that came from for-each-ref iteration? I am not saying the change is problematic; it is just I haven't looked at this code for a long time that the existing machinery is already designed to tolerate duplicated input. Thanks.