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

2018-07-09 Thread Pratik Karki
Hi, On Mon, Jul 9, 2018 at 3:16 AM Johannes Schindelin wrote: > > Hi Pratik, > > On Sun, 8 Jul 2018, Pratik Karki wrote: > > > diff --git a/checkout.c b/checkout.c > > index bdefc888ba..da68915fd7 100644 > > --- a/checkout.c > > +++ b/checkout.c > > @@ -2,6 +2,11 @@ > > #include "remote.h" > >

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

2018-07-09 Thread Pratik Karki
On Mon, Jul 9, 2018 at 10:27 PM Junio C Hamano wrote: > > Pratik Karki writes: > > > In the upcoming builtin rebase, we will have to start by detaching > > the HEAD, just like shell script version does. Essentially, we have > > to do the same thing as `git checkout -q ^0 --`, in pure C. > > > >

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

2018-07-09 Thread Junio C Hamano
Pratik Karki writes: > In the upcoming builtin rebase, we will have to start by detaching > the HEAD, just like shell script version does. Essentially, we have > to do the same thing as `git checkout -q ^0 --`, in pure C. > > The aforementioned functionality was already present in `sequencer.c`

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

2018-07-08 Thread Johannes Schindelin
Hi Pratik, On Sun, 8 Jul 2018, Pratik Karki wrote: > diff --git a/checkout.c b/checkout.c > index bdefc888ba..da68915fd7 100644 > --- a/checkout.c > +++ b/checkout.c > @@ -2,6 +2,11 @@ > #include "remote.h" > #include "refspec.h" > #include "checkout.h" > +#include "unpack-trees.h" >

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

2018-07-08 Thread Pratik Karki
In the upcoming builtin rebase, we will have to start by detaching the HEAD, just like shell script version does. Essentially, we have to do the same thing as `git checkout -q ^0 --`, in pure C. The aforementioned functionality was already present in `sequencer.c` in `do_reset()` function. But