From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 4C6751FA04 for ; Thu, 11 Jun 2020 15:31:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728583AbgFKP2S (ORCPT ); Thu, 11 Jun 2020 11:28:18 -0400 Received: from pb-smtp2.pobox.com ([64.147.108.71]:63093 "EHLO pb-smtp2.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728578AbgFKP2R (ORCPT ); Thu, 11 Jun 2020 11:28:17 -0400 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 4C5F171169; Thu, 11 Jun 2020 11:28:15 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=vEimSuknEz0Un/IJ4+/ERr42AC4=; b=aNpk19 rDQ/kekkBJ7sGwXpj+0rIX9H+nN/bE+HA4VZ6JYleQv56abP8WTLxl3yGlvsohmp KvMpqsY6tbfCZ8biT7H5fKV1+uLI+Lq5Ue5vw7Vg7xfZR134zeb2s5wgfP6msark 6426THjj9sZs8Ekwm2YWmDZbWIU1oPtQWI5Zg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=BAN0FQTFubo2RSjGASp47dneFo8W6Y2T FRgQsBAYfzEmP/HQLd1/FKmx/w+xie6QjkI4rkTK4SVr5VOtsC1UGlU0SgSLtdJt Afuqplk/7VWJ6NtSt4GDDlysmqrQ+bQOb79zS0DxPavJw6HVjKXTfpzvUyDskSKO oMrK6CxHurM= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 449DC71168; Thu, 11 Jun 2020 11:28:15 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [35.196.173.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id BE5B671167; Thu, 11 Jun 2020 11:28:14 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Johannes Schindelin Cc: Eric Sunshine , Don Goodman-Wilson via GitGitGadget , Git List , Derrick Stolee , Jeff King , "brian m. carlson" , Don Goodman-Wilson Subject: Re: [PATCH 1/9] init: allow overriding the default branch name for new repositories References: <90912e32da1192cfc3b39a18cb606caa46e85b1c.1591823971.git.gitgitgadget@gmail.com> Date: Thu, 11 Jun 2020 08:28:14 -0700 In-Reply-To: (Johannes Schindelin's message of "Thu, 11 Jun 2020 16:09:30 +0200 (CEST)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 2AE40506-ABF8-11EA-B375-D1361DBA3BAF-77302942!pb-smtp2.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Johannes Schindelin writes: >> Overall, the internal logic regarding duplicating/freeing strings >> would probably be easier to grok if there were two separate functions: >> >> char *git_default_branch_name(void); >> char *git_default_ref_name(void); >> >> but that's subjective. > > For such a tiny nuance, I'd rather keep it as one function... And you'd need two functions, default and primary, possibly full and short. Splitting these into two here would mean you'd need four.