Skip to content

Commit cb8bbc6

Browse files
committed
lib: Add RemoteUpdateFlags bitflag
1 parent 7fa64c6 commit cb8bbc6

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

libgit2-sys/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,13 @@ pub struct git_indexer_options {
366366

367367
pub type git_remote_ready_cb = Option<extern "C" fn(*mut git_remote, c_int, *mut c_void) -> c_int>;
368368

369+
git_enum! {
370+
pub enum git_remote_update_flags {
371+
GIT_REMOTE_UPDATE_FETCHHEAD = 1 << 0,
372+
GIT_REMOTE_UPDATE_REPORT_UNCHANGED = 1 << 1,
373+
}
374+
}
375+
369376
#[repr(C)]
370377
pub struct git_remote_callbacks {
371378
pub version: c_uint,

src/lib.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,17 @@ bitflags! {
662662
}
663663
}
664664

665+
bitflags! {
666+
/// How to handle reference updates.
667+
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
668+
pub struct RemoteUpdateFlags: u32 {
669+
/// Write the fetch results to FETCH_HEAD.
670+
const UPDATE_FETCHHEAD = raw::GIT_REMOTE_UPDATE_FETCHHEAD as u32;
671+
/// Report unchanged tips in the update_tips callback.
672+
const REPORT_UNCHANGED = raw::GIT_REMOTE_UPDATE_REPORT_UNCHANGED as u32;
673+
}
674+
}
675+
665676
#[cfg(test)]
666677
#[macro_use]
667678
mod test;

0 commit comments

Comments
 (0)