[PATCH] fix git-checkout-cache segfault on parisc
[PATCH] fix git-checkout-cache segfault on parisc

The index cleanup code is executed via atexit() which is *after* main
has completed, so the stack allocated cache_file has gone out of scope.
Parisc seems to use stack in the destructor functions, so cache_file
gets partially overwritten leading to the predictable disastrous
consequences.

[jc: Just to make sure, I audited other users of the function
 hold_index_file_for_update() to make sure they do not have this
 problem; everybody else uses non-stack cache_file structure and
 is fine.  Thanks, James.]

Signed-off-by: James Bottomley <407b36959ca09543ccda8f8e06721c791bc53435@SteelEye.com>
Signed-off-by: Junio C Hamano <dc50d1021234060e53ec42a77d526afa2fe07479@cox.net>

destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git