static int all = 0; /* Default to annotated tags only */
static int tags = 0; /* But allow any tags if --tags is specified */
static int all = 0; /* Default to annotated tags only */
static int tags = 0; /* But allow any tags if --tags is specified */
static int abbrev = DEFAULT_ABBREV;
static int names = 0, allocs = 0;
static struct commit_name {
const struct commit *commit;
static int abbrev = DEFAULT_ABBREV;
static int names = 0, allocs = 0;
static struct commit_name {
const struct commit *commit;
-static void add_to_known_names(const char *path, const struct commit *commit)
+static void add_to_known_names(const char *path,
+ const struct commit *commit,
+ int prio)
static int get_name(const char *path, const unsigned char *sha1)
{
struct commit *commit = lookup_commit_reference_gently(sha1, 1);
static int get_name(const char *path, const unsigned char *sha1)
{
struct commit *commit = lookup_commit_reference_gently(sha1, 1);
/* If --all, then any refs are used.
* If --tags, then any tags are used.
* Otherwise only annotated tags are used.
*/
/* If --all, then any refs are used.
* If --tags, then any tags are used.
* Otherwise only annotated tags are used.
*/
struct commit_name *b = *(struct commit_name **)_b;
unsigned long a_date = a->commit->date;
unsigned long b_date = b->commit->date;
struct commit_name *b = *(struct commit_name **)_b;
unsigned long a_date = a->commit->date;
unsigned long b_date = b->commit->date;
if (n) {
printf("%s-g%s\n", n->path,
find_unique_abbrev(cmit->object.sha1, abbrev));
if (n) {
printf("%s-g%s\n", n->path,
find_unique_abbrev(cmit->object.sha1, abbrev));