tree-diff: convert diff_root_tree_sha1() to just call diff_tree_sha1 with old=NULL
[gitweb.git] / editor.c
index 065a7abf2ffc0df61c35e0740e95caa5af14b229..0abbd8dc3a0ec91acd0c143b6d9b5ad41ac90417 100644 (file)
--- a/editor.c
+++ b/editor.c
@@ -37,7 +37,7 @@ int launch_editor(const char *path, struct strbuf *buffer, const char *const *en
                return error("Terminal is dumb, but EDITOR unset");
 
        if (strcmp(editor, ":")) {
-               const char *args[] = { editor, path, NULL };
+               const char *args[] = { editor, real_path(path), NULL };
                struct child_process p;
                int ret, sig;
 
@@ -51,7 +51,7 @@ int launch_editor(const char *path, struct strbuf *buffer, const char *const *en
                sigchain_push(SIGINT, SIG_IGN);
                sigchain_push(SIGQUIT, SIG_IGN);
                ret = finish_command(&p);
-               sig = ret + 128;
+               sig = ret - 128;
                sigchain_pop(SIGINT);
                sigchain_pop(SIGQUIT);
                if (sig == SIGINT || sig == SIGQUIT)