#include "blob.h"
#include "quote.h"
#include "parse-options.h"
+#include "exec_cmd.h"
static void hash_fd(int fd, const char *type, int write_object, const char *path)
{
int fd;
fd = open(path, O_RDONLY);
if (fd < 0)
- die("Cannot open %s", path);
+ die_errno("Cannot open '%s'", path);
hash_fd(fd, type, write_object, vpath);
}
type = blob_type;
- argc = parse_options(argc, argv, hash_object_options, hash_object_usage, 0);
+ git_extract_argv0_path(argv[0]);
+
+ argc = parse_options(argc, argv, NULL, hash_object_options,
+ hash_object_usage, 0);
if (write_object) {
prefix = setup_git_directory();