author | Junio C Hamano <gitster@pobox.com> | |
Thu, 3 Jul 2008 04:57:52 +0000 (21:57 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 3 Jul 2008 04:57:52 +0000 (21:57 -0700) |
* j6t/mingw: (38 commits)
compat/pread.c: Add a forward declaration to fix a warning
Windows: Fix ntohl() related warnings about printf formatting
Windows: TMP and TEMP environment variables specify a temporary directory.
Windows: Make 'git help -a' work.
Windows: Work around an oddity when a pipe with no reader is written to.
Windows: Make the pager work.
When installing, be prepared that template_dir may be relative.
Windows: Use a relative default template_dir and ETC_GITCONFIG
Windows: Compute the fallback for exec_path from the program invocation.
Turn builtin_exec_path into a function.
Windows: Use a customized struct stat that also has the st_blocks member.
Windows: Add a custom implementation for utime().
Windows: Add a new lstat and fstat implementation based on Win32 API.
Windows: Implement a custom spawnve().
Windows: Implement wrappers for gethostbyname(), socket(), and connect().
Windows: Work around incompatible sort and find.
Windows: Implement asynchronous functions as threads.
Windows: Disambiguate DOS style paths from SSH URLs.
Windows: A rudimentary poll() emulation.
Windows: Implement start_command().
...
compat/pread.c: Add a forward declaration to fix a warning
Windows: Fix ntohl() related warnings about printf formatting
Windows: TMP and TEMP environment variables specify a temporary directory.
Windows: Make 'git help -a' work.
Windows: Work around an oddity when a pipe with no reader is written to.
Windows: Make the pager work.
When installing, be prepared that template_dir may be relative.
Windows: Use a relative default template_dir and ETC_GITCONFIG
Windows: Compute the fallback for exec_path from the program invocation.
Turn builtin_exec_path into a function.
Windows: Use a customized struct stat that also has the st_blocks member.
Windows: Add a custom implementation for utime().
Windows: Add a new lstat and fstat implementation based on Win32 API.
Windows: Implement a custom spawnve().
Windows: Implement wrappers for gethostbyname(), socket(), and connect().
Windows: Work around incompatible sort and find.
Windows: Implement asynchronous functions as threads.
Windows: Disambiguate DOS style paths from SSH URLs.
Windows: A rudimentary poll() emulation.
Windows: Implement start_command().
...
1 | 2 | |||
---|---|---|---|---|
Documentation/git.txt | patch | | diff1 | | diff2 | | blob | history |
Makefile | patch | | diff1 | | diff2 | | blob | history |
cache.h | patch | | diff1 | | diff2 | | blob | history |
exec_cmd.c | patch | | diff1 | | diff2 | | blob | history |
git-compat-util.h | patch | | diff1 | | diff2 | | blob | history |
git.c | patch | | diff1 | | diff2 | | blob | history |
help.c | patch | | diff1 | | diff2 | | blob | history |
setup.c | patch | | diff1 | | diff2 | | blob | history |
sha1_file.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc Documentation/git.txt
Simple merge
diff --cc Makefile
Simple merge
diff --cc cache.h
Simple merge
diff --cc exec_cmd.c
Simple merge
diff --cc git-compat-util.h
Simple merge
diff --cc git.c
index 22ac5226def5c2dd4e699533255b84e18f630bfa,871b93ca7e5eb9e919f0d55e169f8864df5e8a6d..3307c078e539e150556f8b27264bbf29b05d9bb6
+++ b/git.c
}
}
+static void execv_dashed_external(const char **argv)
+{
+ struct strbuf cmd;
+ const char *tmp;
+
+ strbuf_init(&cmd, 0);
+ strbuf_addf(&cmd, "git-%s", argv[0]);
+
+ /*
+ * argv[0] must be the git command, but the argv array
+ * belongs to the caller, and may be reused in
+ * subsequent loop iterations. Save argv[0] and
+ * restore it on error.
+ */
+ tmp = argv[0];
+ argv[0] = cmd.buf;
+
+ trace_argv_printf(argv, "trace: exec:");
+
+ /* execvp() can only ever return if it fails */
+ execvp(cmd.buf, (char **)argv);
+
+ trace_printf("trace: exec failed: %s\n", strerror(errno));
+
+ argv[0] = tmp;
+
+ strbuf_release(&cmd);
+}
+
+
int main(int argc, const char **argv)
{
- const char *cmd = argv[0] ? argv[0] : "git-help";
- char *slash = strrchr(cmd, '/');
+ const char *cmd = argv[0] && *argv[0] ? argv[0] : "git-help";
+ char *slash = (char *)cmd + strlen(cmd);
const char *cmd_path = NULL;
int done_alias = 0;
diff --cc help.c
Simple merge
diff --cc setup.c
Simple merge
diff --cc sha1_file.c
Simple merge