Revision 4ed19a3c178d22fbd424af78b42b65533a8d1ebb authored by Michael Dressel on 04 June 2008, 19:06:31 UTC, committed by Junio C Hamano on 04 June 2008, 20:08:03 UTC
The <pattern> given "git describe --match" was used only to filter tag
objects, and not to filter lightweight tags.  This fixes it.

[jc: made the log to clarify this is a bugfix, not an enhancement, with
additional test]

Signed-off-by: Michael Dressel <MichaelTiloDressel@t-online.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 28bc302
Raw File
alias.c
#include "cache.h"

static const char *alias_key;
static char *alias_val;
static int alias_lookup_cb(const char *k, const char *v)
{
	if (!prefixcmp(k, "alias.") && !strcmp(k+6, alias_key)) {
		if (!v)
			return config_error_nonbool(k);
		alias_val = xstrdup(v);
		return 0;
	}
	return 0;
}

char *alias_lookup(const char *alias)
{
	alias_key = alias;
	alias_val = NULL;
	git_config(alias_lookup_cb);
	return alias_val;
}
back to top