- Commit
- a8adff4aec5dbd1d11cc23c9cb733db071f5c7a8
- Parent
- b1071ded6282af723899bc505afe5bd25c0b1716
- Author
- Pablo <pablo-pie@riseup.net>
- Date
Improved an error message
Yet another static site generator for Git 🙀️
Improved an error message
1 files changed, 3 insertions, 4 deletions
| Status | Name | Changes | Insertions | Deletions | 
| Modified | src/main.rs | 2 files changed | 3 | 4 | 
diff --git a/src/main.rs b/src/main.rs @@ -88,10 +88,9 @@ impl RepoInfo { let (first_commit, last_commit) = { let mut revwalk = repo.revwalk().unwrap(); - if let Err(e) = revwalk.push_head() { - errorln!("Couldn't retrieve repository HEAD in {name:?}: {e}. Check if HEAD contains any commits and points to the right branch", - name = name.as_ref(), - e = e.message()); + if revwalk.push_head().is_err() { + errorln!("Couldn't retrieve repository HEAD in {name:?}. Did you push to \"master\" instead of \"main\"?", + name = name.as_ref()); return Err(()); }