Re: [PATCH v2 02/12] rerere: convert flags into an enum
Patrick Steinhardt <ps@pks.im> writes:
Show 18 quoted lines
> diff --git a/rerere.h b/rerere.h
> index dd9da03d6db..f13790c5dcd 100644
> --- a/rerere.h
> +++ b/rerere.h
> @@ -39,10 +33,27 @@ struct rerere_id {
> int variant;
> };
>
> +enum rerere_flags {
> + /*
> + * Auto-update the index with previously recorded resolutions. This can
> + * be used to explicitly override "rerere.autoUpdate".
> + */
> + RERERE_AUTOUPDATE = (1 << 0),
> +
> + /* Reverse of RERERE_AUTOUPDATE. */
> + RERERE_NOAUTOUPDATE = (1 << 1),
> +Nit: From my understanding, RERERE_NOAUTOUPDATE outputs the conflict
resolution information to the stderr instead of updating the index.
Perhaps that's something to document?
Show 15 quoted lines
> + /* Skip acquiring the MERGE_RR.lock for a read-only operation. */
> + RERERE_READONLY = (1 << 2),
> +
> + /* If MERGE_RR.lock is taken, return -1 as if rerere were disabled. */
> + RERERE_NOWAIT = (1 << 3),
> +};
> +
> int rerere_cache_setup(struct rerere_cache *cache,
> struct repository *r,
> struct string_list *merge_rr,
> - int flags);
> + enum rerere_flags flags);
> void rerere_cache_release(struct rerere_cache *cache);
>
> /*