Alternatively, I think:

```c
struct git_reference {
    git_refdb *db;
    git_ref_t type;

    union {
        git_oid oid;
        char *symbolic;
    } target;
    git_oid peel;

    ...
};
```

would take up the same memory and keep the target union as it is (so fewer structure accessor changes would have to be made). Right now, the peel value is only used for direct targets, but even then it is only used for packed refs. If just treat it as a cached peeled value, it could potentially be applied for cases besides packed refs, maybe?