Re: [PATCH v2 3/4] sequencer: refactor the code to detach HEAD to checkout.c

2018-07-03 Thread Junio C Hamano
Pratik Karki writes: > The motivation behind this commit is to extract the core part of > do_reset() from sequencer.c and move it to a new detach_head_to() > function in checkout.c. > > Here the index only gets locked after performing the first part of > `do_reset()` rather than before which

[PATCH v2 3/4] sequencer: refactor the code to detach HEAD to checkout.c

2018-07-02 Thread Pratik Karki
The motivation behind this commit is to extract the core part of do_reset() from sequencer.c and move it to a new detach_head_to() function in checkout.c. Here the index only gets locked after performing the first part of `do_reset()` rather than before which essentially derives the `oid` from