Re: [PATCH v6 08/13] merge-recursive: move better_branch_name() to merge.c
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Jan 5, 2021, 16:19 UTC
- Message-ID
- <4efb8024-b8c4-a69e-c5ce-4ad43781ecc3@gmail.com>
- In-Reply-To
- <20201124115315.13311-9-alban.gruin@gmail.com>
On 11/24/2020 6:53 AM, Alban Gruin wrote:
> better_branch_name() will be used by merge-octopus once it is rewritten > in C, so instead of duplicating it, this moves this function > preventively inside an appropriate file in libgit.a. This function is > also renamed to reflect its usage by merge strategies.
s/preventively/preemptively/
Show 12 quoted lines
> diff --git a/cache.h b/cache.h > index be16ab3215..2d844576ea 100644 > --- a/cache.h > +++ b/cache.h > @@ -1933,7 +1933,7 @@ int checkout_fast_forward(struct repository *r, > const struct object_id *from, > const struct object_id *to, > int overwrite_ignore); > - > +char *merge_get_better_branch_name(const char *branch); > > int sane_execvp(const char *file, char *const argv[]);
I tend to avoid adding new things to the enormous cache.h, but the best place I could see was refs.h next to repo_default_branch_name().
Maybe cache.h is fine.
-Stolee