Re: [PATCH 06/10] Move read_cache_unmerged() to read-cache.c
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 5, 2008, 23:05 UTC
- Message-ID
- <7vhcc7zdm5.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <514d4184569ab033cad97be9afbd88c767bfb484.1212698317.git.vmiklos@frugalware.org>
Miklos Vajna <vmiklos@frugalware.org> writes:
> builtin-read-tree has a read_cache_unmerged() which is useful for other > builtins, for example builtin-merge uses it as well. Move it to > read-cache.c to avoid code duplication.
Looks good, but as a public interface probably it needs a few lines of comment in front of the function's definition to describe what it is used for. Perhaps like...
/* * Read the index file that is potentially unmerged into given * index_state, dropping any unmerged entries. Returns true is * the index is unmerged. Callers who want to refuse to work * from an unmerged state can call this and check its return value, * instead of calling read_cache(). */