Skip to content

Commit 5b0f3cb

Browse files
committed
fix: Update error message and comments
1 parent b83b919 commit 5b0f3cb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/file_manager/git.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl GitManager {
5050
Ok(head_ref) => {
5151
let head = head_ref
5252
.target()
53-
.ok_or_else(|| anyhow::anyhow!("HEAD refers to non-HEAD"))?;
53+
.ok_or_else(|| anyhow::anyhow!("HEAD does not point to a valid commit"))?;
5454
vec![repo.find_commit(head)?]
5555
}
5656
Err(_) => Vec::new(),
@@ -144,14 +144,14 @@ impl GitManager {
144144

145145
fn status_to_string(status: git2::Status) -> String {
146146
match status {
147-
// 아직 add 되지 않은 상태
147+
// Not yet added to index
148148
git2::Status::WT_NEW => "ADDED".to_string(),
149149
git2::Status::WT_MODIFIED => "MODIFIED".to_string(),
150150
git2::Status::WT_DELETED => "DELETED".to_string(),
151151
git2::Status::WT_RENAMED => "RENAMED".to_string(),
152152
git2::Status::WT_TYPECHANGE => "TYPECHANGE".to_string(),
153153

154-
// stage 된 상태
154+
// Staged state
155155
git2::Status::INDEX_NEW => "ADDED".to_string(),
156156
git2::Status::INDEX_MODIFIED => "MODIFIED".to_string(),
157157
git2::Status::INDEX_DELETED => "DELETED".to_string(),

0 commit comments

Comments
 (0)