]> granicus.if.org Git - cgit/commit
ui-log: try to disambiguate ref names
authorLars Hjemli <hjemli@gmail.com>
Wed, 3 Dec 2008 16:34:23 +0000 (17:34 +0100)
committerLars Hjemli <hjemli@gmail.com>
Wed, 3 Dec 2008 16:34:23 +0000 (17:34 +0100)
commita1b01b2513510f8f93f7f8ca39969002cd496a19
tree143e569416a89b31de6f96e8e79f8841c24dd935
parentc7d1402b177f4cf835e81f962e2faa3c9e28c549
ui-log: try to disambiguate ref names

The 'h' querystring parameter in cgit is normally used to specify
a branch (i.e. a ref below refs/heads/), but if a repository contains
a tag with the same name as a branch the output from ui-log would use
the tag as start-revision.

This patch tries to fix the issue by checking if the specified ref is
valid as a branch name; if so, the full refname is used in the call
to setup_revisions().

Noticed-by: Takamori Yamaguchi <akschar@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
ui-log.c