Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
builtin/help.c: use warning_errno()
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Sun, 8 May 2016 09:47:27 +0000
(16:47 +0700)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 9 May 2016 19:29:08 +0000
(12:29 -0700)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/help.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
6da31d7
)
diff --git
a/builtin/help.c
b/builtin/help.c
index 3c55ce456309ee7da95eac0517f11161ab3c1f7c..88480131cf9fa85f303ede2662eabe09d848ba4e 100644
(file)
--- a/
builtin/help.c
+++ b/
builtin/help.c
@@
-127,7
+127,7
@@
static void exec_woman_emacs(const char *path, const char *page)
path = "emacsclient";
strbuf_addf(&man_page, "(woman \"%s\")", page);
execlp(path, "emacsclient", "-e", man_page.buf, (char *)NULL);
path = "emacsclient";
strbuf_addf(&man_page, "(woman \"%s\")", page);
execlp(path, "emacsclient", "-e", man_page.buf, (char *)NULL);
- warning
(_("failed to exec '%s': %s"), path, strerror(errno)
);
+ warning
_errno(_("failed to exec '%s'"), path
);
}
}
}
}
@@
-148,7
+148,7
@@
static void exec_man_konqueror(const char *path, const char *page)
path = "kfmclient";
strbuf_addf(&man_page, "man:%s(1)", page);
execlp(path, filename, "newTab", man_page.buf, (char *)NULL);
path = "kfmclient";
strbuf_addf(&man_page, "man:%s(1)", page);
execlp(path, filename, "newTab", man_page.buf, (char *)NULL);
- warning
(_("failed to exec '%s': %s"), path, strerror(errno)
);
+ warning
_errno(_("failed to exec '%s'"), path
);
}
}
}
}
@@
-157,7
+157,7
@@
static void exec_man_man(const char *path, const char *page)
if (!path)
path = "man";
execlp(path, "man", page, (char *)NULL);
if (!path)
path = "man";
execlp(path, "man", page, (char *)NULL);
- warning
(_("failed to exec '%s': %s"), path, strerror(errno)
);
+ warning
_errno(_("failed to exec '%s'"), path
);
}
static void exec_man_cmd(const char *cmd, const char *page)
}
static void exec_man_cmd(const char *cmd, const char *page)
@@
-165,7
+165,7
@@
static void exec_man_cmd(const char *cmd, const char *page)
struct strbuf shell_cmd = STRBUF_INIT;
strbuf_addf(&shell_cmd, "%s %s", cmd, page);
execl(SHELL_PATH, SHELL_PATH, "-c", shell_cmd.buf, (char *)NULL);
struct strbuf shell_cmd = STRBUF_INIT;
strbuf_addf(&shell_cmd, "%s %s", cmd, page);
execl(SHELL_PATH, SHELL_PATH, "-c", shell_cmd.buf, (char *)NULL);
- warning(_("failed to exec '%s'
: %s"), cmd, strerror(errno)
);
+ warning(_("failed to exec '%s'
"), cmd
);
}
static void add_man_viewer(const char *name)
}
static void add_man_viewer(const char *name)