Re: [PATCH 10/9] clone: leave repo in place after checkout errors

2013-03-26 Thread Jeff King
On Tue, Mar 26, 2013 at 03:32:59PM -0700, Jonathan Nieder wrote: > > +static const char junk_leave_repo_msg[] = > > +N_("The remote repository was cloned successfully, but there was\n" > > + "an error checking out the HEAD branch. The repository has been left > > in\n" > > + "place but the wo

Re: [PATCH 10/9] clone: leave repo in place after checkout errors

2013-03-26 Thread Jonathan Nieder
Jeff King wrote: > --- a/builtin/clone.c > +++ b/builtin/clone.c > @@ -377,10 +377,40 @@ static void remove_junk(void) > static const char *junk_work_tree; > static const char *junk_git_dir; > static pid_t junk_pid; > +enum { > + JUNK_LEAVE_NONE, > + JUNK_LEAVE_REPO, > + JUNK_LEAVE_

[PATCH 10/9] clone: leave repo in place after checkout errors

2013-03-26 Thread Jeff King
On Tue, Mar 26, 2013 at 02:40:57PM -0700, Junio C Hamano wrote: > > I think the "leave the data behind" fix may be to just set "junk_pid = > > 0" a little sooner in cmd_clone (i.e., before checkout()). Then we > > would still die, but at least leave the fetched objects intact. > > Yeah, perhaps,