]> asedeno.scripts.mit.edu Git - git.git/blobdiff - builtin-receive-pack.c
replace direct calls to unlink(2) with unlink_or_warn
[git.git] / builtin-receive-pack.c
index 849f1fe6f9c703bd7717e54548300dfe6e495061..035b723e50a72427a26102b91f5900b131d44095 100644 (file)
@@ -675,7 +675,7 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
        setup_path();
 
        if (!enter_repo(dir, 0))
-               die("'%s': unable to chdir or not a git archive", dir);
+               die("'%s' does not appear to be a git repository", dir);
 
        if (is_repository_shallow())
                die("attempt to push into a shallow repository");
@@ -702,7 +702,7 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
                        unpack_status = unpack();
                execute_commands(unpack_status);
                if (pack_lockfile)
-                       unlink(pack_lockfile);
+                       unlink_or_warn(pack_lockfile);
                if (report_status)
                        report(unpack_status);
                run_receive_hook(post_receive_hook);