From 9a499575c4d0f38dc31e00be74a857c29fb9772b Mon Sep 17 00:00:00 2001 From: Kiril Videlov Date: Thu, 25 Apr 2024 17:41:13 +0200 Subject: [PATCH] fixes a bug with the reflog editing --- crates/gitbutler-core/src/snapshots/reflog.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/gitbutler-core/src/snapshots/reflog.rs b/crates/gitbutler-core/src/snapshots/reflog.rs index 024e66504..2366dd4d4 100644 --- a/crates/gitbutler-core/src/snapshots/reflog.rs +++ b/crates/gitbutler-core/src/snapshots/reflog.rs @@ -42,7 +42,7 @@ impl SnapshotsReference { // 0000000000000000000000000000000000000000 82873b54925ab268e9949557f28d070d388e7774 Kiril Videlov 1714037434 +0200 branch: Created from 82873b54925ab268e9949557f28d070d388e7774 let content = std::fs::read_to_string(&self.file_path)?; let mut lines = content.lines().collect::>(); - let mut first_line = lines.remove(0).split_whitespace().collect_vec(); + let mut first_line = lines[0].split_whitespace().collect_vec(); let len = first_line.len(); first_line[1] = sha; first_line[len - 1] = sha;