We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56b66ac commit 6bed200Copy full SHA for 6bed200
git-object/src/owned/tree.rs
@@ -6,9 +6,6 @@ use std::io;
6
quick_error! {
7
#[derive(Debug)]
8
pub enum Error {
9
- NoEntries {
10
- description("Trees must have at least one entry")
11
- }
12
NewlineInFilename(name: BString){
13
display("Newlines are invalid in file paths: {:?}", name)
14
}
@@ -50,9 +47,6 @@ impl TreeMode {
50
47
51
48
impl Tree {
52
49
pub fn write_to(&self, mut out: impl io::Write) -> io::Result<()> {
53
- if self.entries.is_empty() {
54
- return Err(Error::NoEntries.into());
55
56
for Entry { mode, filename, oid } in &self.entries {
57
out.write_all(mode.as_bytes())?;
58
out.write_all(SPACE)?;
0 commit comments