author | Junio C Hamano <gitster@pobox.com> | |
Thu, 2 Aug 2007 22:10:56 +0000 (15:10 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 3 Aug 2007 00:26:26 +0000 (17:26 -0700) | ||
commit | 6490a3383f1d0d96c122069e510ef1af1d019fbb | |
tree | 2f53fc4f0484afc619dea3b589d5eb9cdc228b4a | tree | snapshot |
parent | 29093c28a21d75500e9388ad103b9af9a0bab1ae | commit | diff |
Fix work-tree related breakages
In set_work_tree(), variable rel needs to be reinitialized to
NULL on every call (it should not be static).
Make sure the incoming dir variable is not too long before
copying to the temporary buffer, and make sure chdir to the
resulting directory succeeds.
This was spotted and fixed by Alex and Johannes in a handful
patch exchanges. Here is the final version.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
In set_work_tree(), variable rel needs to be reinitialized to
NULL on every call (it should not be static).
Make sure the incoming dir variable is not too long before
copying to the temporary buffer, and make sure chdir to the
resulting directory succeeds.
This was spotted and fixed by Alex and Johannes in a handful
patch exchanges. Here is the final version.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
setup.c | diff | blob | history |