Make chdir failures visible
Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
47d32af233
commit
7be77de266
4
git.c
4
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user