From: Junio C Hamano Date: Fri, 26 Apr 2019 03:02:49 GMT Subject: Re: [PATCH 3/3] checkout: allow -b/-B to work on a merge base Message-ID: In-Reply-To: <031780431d790c16b3862d6f155693e197bb74ed.1556226502.git.liu.denton@gmail.com> Denton Liu writes: > - new_branch_info->name = arg; > + new_branch_info->name = strstr(arg, "...") ? > + xstrdup(oid_to_hex(rev)) : > + arg; Can we do better? I am not sure why we want to hardcode the knowledge of "..." syntax like this here. "git checkout A...B" introduced in 2009 needed only a single-liner change from get_sha1() to get_sha1_mb() without making the ugly implementation detail seep into this layer.