summaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
authorLibravatar Alex Riesen <raa.lkml@gmail.com>2008-12-05 01:36:46 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-12-04 18:05:51 -0800
commit7be77de266b5cbcbd28d69a04df6f0b167b87cf6 (patch)
treef2c82df15cb22f28dd31f427dccbf9d608fbc44b /setup.c
parentMake some of fwrite/fclose/write/close failures visible (diff)
downloadtgif-7be77de266b5cbcbd28d69a04df6f0b167b87cf6.tar.xz
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 'setup.c')
-rw-r--r--setup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/setup.c b/setup.c
index 78a8041ff0..833ced2269 100644
--- a/setup.c
+++ b/setup.c
@@ -470,7 +470,8 @@ const char *setup_git_directory_gently(int *nongit_ok)
}
die("Not a git repository");
}
- chdir("..");
+ if (chdir(".."))
+ die("Cannot change to %s/..: %s", cwd, strerror(errno));
}
inside_git_dir = 0;