projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add functions git_config_set() and git_config_set_multivar()
[git.git]
/
server-info.c
diff --git
a/server-info.c
b/server-info.c
index
3c08a28
..
e4006f0
100644
(file)
--- a/
server-info.c
+++ b/
server-info.c
@@
-9,7
+9,15
@@
static FILE *info_ref_fp;
static int add_info_ref(const char *path, const unsigned char *sha1)
{
static int add_info_ref(const char *path, const unsigned char *sha1)
{
+ struct object *o = parse_object(sha1);
+
fprintf(info_ref_fp, "%s %s\n", sha1_to_hex(sha1), path);
fprintf(info_ref_fp, "%s %s\n", sha1_to_hex(sha1), path);
+ if (o->type == tag_type) {
+ o = deref_tag(o, path, 0);
+ if (o)
+ fprintf(info_ref_fp, "%s %s^{}\n",
+ sha1_to_hex(o->sha1), path);
+ }
return 0;
}
return 0;
}
@@
-416,7
+424,6
@@
static void find_pack_info_one(int pack_ix)
{
unsigned char sha1[20];
struct object *o;
{
unsigned char sha1[20];
struct object *o;
- struct object_list *ref;
int i;
struct packed_git *p = info[pack_ix]->p;
int num = num_packed_objects(p);
int i;
struct packed_git *p = info[pack_ix]->p;
int num = num_packed_objects(p);
@@
-429,8
+436,12
@@
static void find_pack_info_one(int pack_ix)
die("corrupt pack file %s?", p->pack_name);
if ((o = lookup_object(sha1)) == NULL)
die("cannot parse %s", sha1_to_hex(sha1));
die("corrupt pack file %s?", p->pack_name);
if ((o = lookup_object(sha1)) == NULL)
die("cannot parse %s", sha1_to_hex(sha1));
- for (ref = o->refs; ref; ref = ref->next)
- ref->item->flags = 0;
+ if (o->refs) {
+ struct object_refs *refs = o->refs;
+ int j;
+ for (j = 0; j < refs->count; j++)
+ refs->ref[j]->flags = 0;
+ }
o->flags = 0;
}
o->flags = 0;
}
@@
-440,8
+451,12
@@
static void find_pack_info_one(int pack_ix)
die("corrupt pack file %s?", p->pack_name);
if ((o = lookup_object(sha1)) == NULL)
die("cannot find %s", sha1_to_hex(sha1));
die("corrupt pack file %s?", p->pack_name);
if ((o = lookup_object(sha1)) == NULL)
die("cannot find %s", sha1_to_hex(sha1));
- for (ref = o->refs; ref; ref = ref->next)
- ref->item->flags |= REFERENCED;
+ if (o->refs) {
+ struct object_refs *refs = o->refs;
+ int j;
+ for (j = 0; j < refs->count; j++)
+ refs->ref[j]->flags |= REFERENCED;
+ }
o->flags |= INTERNAL;
}
o->flags |= INTERNAL;
}
@@
-452,8
+467,12
@@
static void find_pack_info_one(int pack_ix)
die("cannot find %s", sha1_to_hex(sha1));
show(o, pack_ix);
die("cannot find %s", sha1_to_hex(sha1));
show(o, pack_ix);
- for (ref = o->refs; ref; ref = ref->next)
- show(ref->item, pack_ix);
+ if (o->refs) {
+ struct object_refs *refs = o->refs;
+ int j;
+ for (j = 0; j < refs->count; j++)
+ show(refs->ref[j], pack_ix);
+ }
}
}
}
}