Re: [PATCH v2 2/2] Make locked paths absolute when current directory is changed

2014-07-31 Thread Duy Nguyen
On Thu, Jul 31, 2014 at 10:01 AM, Yue Lin Ho wrote: > Hi: > How do I trace these patches applied? They are not applied yet. I'll needto redo them on top of rs/strbuf-getcwd. -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel

Re: [PATCH v2 2/2] Make locked paths absolute when current directory is changed

2014-07-30 Thread Yue Lin Ho
Hi: > 2014-07-23 19:55 GMT+08:00 Duy Nguyen : > On Tue, Jul 22, 2014 at 12:04 AM, Junio C Hamano > wrote: > > Duy Nguyen writes: ​[snip]​ > > OK, we should center these efforts around the strbuf_getcwd() topic, > > basing the other topic on realpath() and this one on it then? > > OK. > -- > Duy

Re: [PATCH v2 2/2] Make locked paths absolute when current directory is changed

2014-07-23 Thread Duy Nguyen
On Tue, Jul 22, 2014 at 12:04 AM, Junio C Hamano wrote: > Duy Nguyen writes: > >> On Mon, Jul 21, 2014 at 8:27 PM, Ramsay Jones >> wrote: +void make_locked_paths_absolute(void) +{ + struct lock_file *lk; + for (lk = lock_file_list; lk != NULL; lk = lk->next) { +

Re: [PATCH v2 2/2] Make locked paths absolute when current directory is changed

2014-07-21 Thread Junio C Hamano
Duy Nguyen writes: > On Mon, Jul 21, 2014 at 8:27 PM, Ramsay Jones > wrote: >>> +void make_locked_paths_absolute(void) >>> +{ >>> + struct lock_file *lk; >>> + for (lk = lock_file_list; lk != NULL; lk = lk->next) { >>> + if (lk->filename && !is_absolute_path(lk->filename)) {

Re: [PATCH v2 2/2] Make locked paths absolute when current directory is changed

2014-07-21 Thread Ramsay Jones
On 21/07/14 14:47, Duy Nguyen wrote: > On Mon, Jul 21, 2014 at 8:27 PM, Ramsay Jones > wrote: >>> +void make_locked_paths_absolute(void) >>> +{ >>> + struct lock_file *lk; >>> + for (lk = lock_file_list; lk != NULL; lk = lk->next) { >>> + if (lk->filename && !is_absolute_path(l

Re: [PATCH v2 2/2] Make locked paths absolute when current directory is changed

2014-07-21 Thread Duy Nguyen
On Mon, Jul 21, 2014 at 8:27 PM, Ramsay Jones wrote: >> +void make_locked_paths_absolute(void) >> +{ >> + struct lock_file *lk; >> + for (lk = lock_file_list; lk != NULL; lk = lk->next) { >> + if (lk->filename && !is_absolute_path(lk->filename)) { >> + char

Re: [PATCH v2 2/2] Make locked paths absolute when current directory is changed

2014-07-21 Thread Ramsay Jones
On 20/07/14 13:13, Nguyễn Thái Ngọc Duy wrote: > Locked paths are saved in a linked list so that if something wrong > happens, *.lock are removed. This works fine if we keep cwd the same, > which is true 99% of time except: > > - update-index and read-tree hold the lock on $GIT_DIR/index really >

[PATCH v2 2/2] Make locked paths absolute when current directory is changed

2014-07-20 Thread Nguyễn Thái Ngọc Duy
Locked paths are saved in a linked list so that if something wrong happens, *.lock are removed. This works fine if we keep cwd the same, which is true 99% of time except: - update-index and read-tree hold the lock on $GIT_DIR/index really early, then later on may call setup_work_tree() to move