Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
entry.c | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)
diff --git a/entry.c b/entry.c
index 96a4a60..0316c74 100644
--- a/entry.c
+++ b/entry.c
@@ -166,7 +166,6 @@ static int write_entry(struct cache_entry *ce, char *path, const struct checkout
static int checkout_submodule(const char *path, struct cache_entry *ce, const struct checkout *state)
{
- static char cwd[PATH_MAX];
const char *gitdirenv;
const char *args[10];
int argc;
@@ -175,12 +174,6 @@ static int checkout_submodule(const char *path, struct cache_entry *ce, const st
if (!state->submodules)
return 0;
- if (!getcwd(cwd, sizeof(cwd)) || cwd[0] != '/')
- die("Unable to read current working directory");
-
- if (chdir(path))
- die("Cannot move to '%s'", path);
-
argc = 0;
args[argc++] = "checkout";
if (state->force)
@@ -190,12 +183,9 @@ static int checkout_submodule(const char *path, struct cache_entry *ce, const st
gitdirenv = getenv(GIT_DIR_ENVIRONMENT);
unsetenv(GIT_DIR_ENVIRONMENT);
- err = run_command_v_opt(args, RUN_GIT_CMD);
+ err = run_command_v_opt_cd(args, RUN_GIT_CMD, path);
setenv(GIT_DIR_ENVIRONMENT, gitdirenv, 1);
- if (chdir(cwd))
- die("Cannot come back to cwd");
-
if (err)
return error("failed to run git-checkout in submodule '%s'", path);
--
1.5.2.rc3.83.gbbb0
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
| Ingo Molnar | Re: [PATCH 6/6] sched: disabled rt-bandwidth by default |
| Maciej W. Rozycki | [PATCH 2/2] acpi: Disable IRQ 0 through I/O APIC for some HP systems |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Ryan Hope | reiser4 for 2.6.27-rc1 |
git: | |
| Johannes Schindelin | Re: [PATCH] use natural ordering to display list of branches. |
| David Kastrup | Terminology question about remote branches. |
| David Kastrup | Re: If you would write git from scratch now, what would you change? |
| Johannes Schindelin | [PATCH 1/2] clone: Add an option to set up a mirror |
| Martin Toft | Mysterious transfer speed differences |
| Joachim Schipper | Re: OpenBSD/alpha Status |
| Richard Daemon | OpenBSD 4.3 running in VirtualBox? Anyone have it working properly? |
| Diana Eichert | Re: In Memoriam: Jun-ichiro Hagino |
| binto | Before & After Under The Giant Lock |
| Florent Thoumie | Re: New wpi driver |
| Peter Jeremy | Re: repeatedly opening the same .so(s) is slow? |
| Dirk Engling | Re: Strange keyboard (viral?) behaviour |
