Revision e885a84f1bc660adfc1dea5f6c25d0a92c7c9dbc authored by Jeff King on 30 September 2020, 12:28:18 UTC, committed by Junio C Hamano on 30 September 2020, 19:53:47 UTC
Many functions take an argv/argc pair, but never actually look at argc.
This makes it useless at best (we use the NULL sentinel in argv to find
the end of the array), and misleading at worst (what happens if the argc
count does not match the argv NULL?).

In each of these instances, the argv NULL does match the argc count, so
there are no bugs here. But let's tighten the interfaces to make it
harder to get wrong (and to reduce some -Wunused-parameter complaints).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 185e865
Raw File
rebase.h
#ifndef REBASE_H
#define REBASE_H

enum rebase_type {
	REBASE_INVALID = -1,
	REBASE_FALSE = 0,
	REBASE_TRUE,
	REBASE_PRESERVE,
	REBASE_MERGES,
	REBASE_INTERACTIVE
};

enum rebase_type rebase_parse_value(const char *value);

#endif /* REBASE */
back to top