RE: [PATCH] worktree add: add --lock option

2017-04-24 Thread taylor, david
> From: Duy Nguyen [mailto:pclo...@gmail.com] > Sent: Friday, April 14, 2017 9:01 AM > To: Junio C Hamano > Cc: Git Mailing List; taylor, david > Subject: Re: [PATCH] worktree add: add --lock option > > On Fri, Apr 14, 2017 at 5:50 AM, Junio C Hamano > wrote: > >

Re: [PATCH] worktree add: add --lock option

2017-04-15 Thread Duy Nguyen
On Sat, Apr 15, 2017 at 3:07 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> Nguyễn Thái Ngọc Duy writes: >> >>> -unlink_or_warn(sb.buf); >>> +if (!ret && opts->keep_locked) { >>> +/* >>> + * Don't keep the confusing "initializing" message >>> +

Re: [PATCH] worktree add: add --lock option

2017-04-15 Thread Junio C Hamano
Junio C Hamano writes: > Nguyễn Thái Ngọc Duy writes: > >> -unlink_or_warn(sb.buf); >> +if (!ret && opts->keep_locked) { >> +/* >> + * Don't keep the confusing "initializing" message >> + * after it's already over. >> + */ >> +

Re: [PATCH] worktree add: add --lock option

2017-04-15 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > - unlink_or_warn(sb.buf); > + if (!ret && opts->keep_locked) { > + /* > + * Don't keep the confusing "initializing" message > + * after it's already over. > + */ > + truncate(sb.buf, 0); > +

Re: [PATCH] worktree add: add --lock option

2017-04-14 Thread Jacob Keller
On Thu, Apr 13, 2017 at 3:50 PM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> As explained in the document. This option has an advantage over the >> command sequence "git worktree add && git worktree lock": there will be >> no gap that somebody can accidentally "prune" the new workt

Re: [PATCH] worktree add: add --lock option

2017-04-14 Thread Duy Nguyen
On Fri, Apr 14, 2017 at 5:50 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> As explained in the document. This option has an advantage over the >> command sequence "git worktree add && git worktree lock": there will be >> no gap that somebody can accidentally "prune" the new workt

Re: [PATCH] worktree add: add --lock option

2017-04-13 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > As explained in the document. This option has an advantage over the > command sequence "git worktree add && git worktree lock": there will be > no gap that somebody can accidentally "prune" the new worktree (or soon, > explicitly "worktree remove" it). > > "worktre

[PATCH] worktree add: add --lock option

2017-04-12 Thread Nguyễn Thái Ngọc Duy
As explained in the document. This option has an advantage over the command sequence "git worktree add && git worktree lock": there will be no gap that somebody can accidentally "prune" the new worktree (or soon, explicitly "worktree remove" it). "worktree add" does keep a lock on while it's prepa