mirror of
https://git.zx2c4.com/cgit
synced 2024-11-09 10:08:42 +00:00
ui-tree.c: avoid peeking at GITLINK objects
When an object in the tree has GITLINK mode-bits we don't need to get any more info about that particular object (and trying to get more info about it will usually generate an annoying warning on stderr since the object typically doesn't exist in the repo anyways). Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
parent
dd7c172542
commit
08a8757fa5
14
ui-tree.c
14
ui-tree.c
@ -73,12 +73,14 @@ static int ls_item(const unsigned char *sha1, const char *base, int baselen,
|
|||||||
fullpath = fmt("%s%s%s", ctx.qry.path ? ctx.qry.path : "",
|
fullpath = fmt("%s%s%s", ctx.qry.path ? ctx.qry.path : "",
|
||||||
ctx.qry.path ? "/" : "", name);
|
ctx.qry.path ? "/" : "", name);
|
||||||
|
|
||||||
type = sha1_object_info(sha1, &size);
|
if (!S_ISGITLINK(mode)) {
|
||||||
if (type == OBJ_BAD && !S_ISGITLINK(mode)) {
|
type = sha1_object_info(sha1, &size);
|
||||||
htmlf("<tr><td colspan='3'>Bad object: %s %s</td></tr>",
|
if (type == OBJ_BAD) {
|
||||||
name,
|
htmlf("<tr><td colspan='3'>Bad object: %s %s</td></tr>",
|
||||||
sha1_to_hex(sha1));
|
name,
|
||||||
return 0;
|
sha1_to_hex(sha1));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
html("<tr><td class='ls-mode'>");
|
html("<tr><td class='ls-mode'>");
|
||||||
|
Loading…
Reference in New Issue
Block a user