commit b0a8eb0befef415b2a43366ae0dbef9829a79a09 parent 2c9fd2f76fb2b35d4ad595764d9eb7ef1668b5f9 Author: Chris Bracken <chris@bracken.jp> Date: Sat, 21 Feb 2026 00:13:27 +0900 git: remove redundant empty-string checks for path Diffstat:
| M | src/git/git.c | | | 7 | +------ |
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/git/git.c b/src/git/git.c @@ -333,12 +333,7 @@ static bool gitrepo_walk_tree_files(git_repository* repo, return false; } - char* entrypath; - if (path[0] == '\0') { - entrypath = estrdup(entryname); - } else { - entrypath = path_concat(path, entryname); - } + char* entrypath = path_concat(path, entryname); git_filemode_t mode = git_tree_entry_filemode(entry); if (mode == GIT_FILEMODE_COMMIT) {