Johannes Schindelin <Johannes.Schindelin@xxxxxx> 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.