Skip to content

Commit 6c0cc71

Browse files
committed
Persist object refs on disk with a trailing newline
Match git's behavior. This improves compatibility with alternative Git client programs such as Sublime Merge.
1 parent 651f9fa commit 6c0cc71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gix-ref/src/store/file/transaction/prepare.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ impl Transaction<'_, '_> {
182182
let mut lock = lock.take().map_or_else(obtain_lock, Ok)?;
183183

184184
lock.with_mut(|file| match new {
185-
Target::Object(oid) => write!(file, "{oid}"),
185+
Target::Object(oid) => writeln!(file, "{oid}"),
186186
Target::Symbolic(name) => writeln!(file, "ref: {}", name.0),
187187
})?;
188188
Some(lock.close()?)

0 commit comments

Comments
 (0)