git2-rs icon indicating copy to clipboard operation
git2-rs copied to clipboard

Accessing commit object flags

Open andreisilviudragnea opened this issue 3 years ago • 2 comments

How should I write this C code in Rust: commit->object.flags & PATCHSAME (https://github.com/git/git/blob/master/sequencer.c#L5187)?

Object flags are not accessible.

andreisilviudragnea avatar Jan 25 '22 11:01 andreisilviudragnea

not even sure how that works. what type does commit->object have? see https://github.com/libgit2/libgit2/blob/main/src/object.h#L19 git_object should not have flags

extrawurst avatar Jan 25 '22 13:01 extrawurst

Note: this crate is build upon libgit2, which (mainly) exposes opaque data types.

You should probably start with figuring out/communicating what the expression means semantically.

neithernut avatar Jan 25 '22 13:01 neithernut