Skip to content

Commit

Permalink
Skip updating the index completely when --height-limit is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
gmart7t2 committed Jun 28, 2023
1 parent c051010 commit e4080c7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index/updater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ pub(crate) struct Updater {

impl Updater {
pub(crate) fn update(index: &Index) -> Result {
if index.height_limit == Some(0) {
return Ok(());
}

let wtx = index.begin_write()?;

let height = wtx
Expand Down

0 comments on commit e4080c7

Please sign in to comment.