summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2008-12-05 01:36:46 +0100
committerJunio C Hamano <gitster@pobox.com>2008-12-04 18:05:51 -0800
commit7be77de266b5cbcbd28d69a04df6f0b167b87cf6 (patch)
treef2c82df15cb22f28dd31f427dccbf9d608fbc44b /git.c
parent47d32af2338418275ab6b53a737952af22289d97 (diff)
downloadgit-7be77de266b5cbcbd28d69a04df6f0b167b87cf6.tar.gz
Make chdir failures visible
Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git.c')
-rw-r--r--git.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/git.c b/git.c
index 9e5813cc92..940a498962 100644
--- a/git.c
+++ b/git.c
@@ -195,8 +195,8 @@ static int handle_alias(int *argcp, const char ***argv)
ret = 1;
}
- if (subdir)
- chdir(subdir);
+ if (subdir && chdir(subdir))
+ die("Cannot change to %s: %s", subdir, strerror(errno));
errno = saved_errno;