Volume XXII, number 280Wednesday, October 7, 2026Latest message 51 minutes ago

The Git List

News and archive of git@vger.kernel.org, since April 2005

patchbuiltin/rm.c: use die_errno() when system call fails

1 messages between Jul 6, 2026 and Jul 6, 2026, from Gatla Vishweshwar Reddy.

Plain Markdown or JSON for tools and agents. Diffs are folded; open one to read it.

Gatla Vishweshwar ReddyJul 6, 2026, 18:21 UTC on lore
---
 builtin/rm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to builtin/rm.c +1 −1
diff --git a/builtin/rm.c b/builtin/rm.c
index 081d0bc375..3f5e6e232d 100644
--- a/builtin/rm.c
+++ b/builtin/rm.c
@@ -396,7 +396,7 @@ int cmd_rm(int argc,
 			printf("rm '%s'\n", path);
 
 		if (remove_file_from_index(the_repository->index, path))
-			die(_("git rm: unable to remove %s"), path);
+			die_errno(_("git rm: unable to remove %s"), path);
 	}
 
 	if (show_only)
-- 
2.54.0

Back to recent threads

[PATCH] builtin/rm.c: use die_errno() when system call fails | The Git List