Merge branch 'nd/remote-update-doc'
[gitweb.git] / builtin / difftool.c
index d9a0fecffcfb9f1169c94c321191e9319e943013..bc97d4aef2db2d76e3ffddfc4759e52688f3974e 100644 (file)
@@ -15,7 +15,7 @@
 #include "config.h"
 #include "builtin.h"
 #include "run-command.h"
-#include "exec_cmd.h"
+#include "exec-cmd.h"
 #include "parse-options.h"
 #include "argv-array.h"
 #include "strbuf.h"
@@ -306,7 +306,7 @@ static char *get_symlink(const struct object_id *oid, const char *path)
        } else {
                enum object_type type;
                unsigned long size;
-               data = read_sha1_file(oid->hash, &type, &size);
+               data = read_object_file(oid, &type, &size);
                if (!data)
                        die(_("could not read object %s for symlink %s"),
                                oid_to_hex(oid), path);
@@ -695,12 +695,11 @@ int cmd_difftool(int argc, const char **argv, const char *prefix)
                         N_("use `diff.guitool` instead of `diff.tool`")),
                OPT_BOOL('d', "dir-diff", &dir_diff,
                         N_("perform a full-directory diff")),
-               { OPTION_SET_INT, 'y', "no-prompt", &prompt, NULL,
+               OPT_SET_INT_F('y', "no-prompt", &prompt,
                        N_("do not prompt before launching a diff tool"),
-                       PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, 0},
-               { OPTION_SET_INT, 0, "prompt", &prompt, NULL, NULL,
-                       PARSE_OPT_NOARG | PARSE_OPT_NONEG | PARSE_OPT_HIDDEN,
-                       NULL, 1 },
+                       0, PARSE_OPT_NONEG),
+               OPT_SET_INT_F(0, "prompt", &prompt, NULL,
+                       1, PARSE_OPT_NONEG | PARSE_OPT_HIDDEN),
                OPT_BOOL(0, "symlinks", &symlinks,
                         N_("use symlinks in dir-diff mode")),
                OPT_STRING('t', "tool", &difftool_cmd, N_("<tool>"),