Jeff King writes:
> On Fri, Jan 06, 2017 at 08:19:53PM -0500, Kyle Meyer wrote:
>
>> > The other option is just "git checkout --detach", which is also used in
>> > the test suite. I tend to prefer it because it's a little more obvious
>> > to a reader.
>>
>> True, that does seem clearer. Seems
On Fri, Jan 06, 2017 at 08:19:53PM -0500, Kyle Meyer wrote:
> > The other option is just "git checkout --detach", which is also used in
> > the test suite. I tend to prefer it because it's a little more obvious
> > to a reader.
>
> True, that does seem clearer. Seems I should've waited a bit bef
Jeff King writes:
> On Fri, Jan 06, 2017 at 08:09:32PM -0500, Kyle Meyer wrote:
>
>> > $ git grep -c HEAD^{} junio/pu -- t/
>> > junio/pu:t/t3200-branch.sh:3
>> >
>> > Maybe use HEAD^0 just for consistency?
>>
>> Yes, thanks for pointing that out.
>
> The other option is just "git checkout --deta
On Fri, Jan 06, 2017 at 08:09:32PM -0500, Kyle Meyer wrote:
> > $ git grep -c HEAD^{} junio/pu -- t/
> > junio/pu:t/t3200-branch.sh:3
> >
> > Maybe use HEAD^0 just for consistency?
>
> Yes, thanks for pointing that out.
The other option is just "git checkout --detach", which is also used in
the
Johannes Schindelin writes:
[...]
>> +test_expect_success 'resolving @{push} fails with a detached HEAD' '
>> +git checkout HEAD^{} &&
>
> I seem to recall that we prefer HEAD^0 over HEAD^{} and the existing
> scripts seem to agree with me:
>
> $ git grep -c HEAD^0 junio/pu -- t/
> junio/pu:
Hi Kyle,
On Thu, 5 Jan 2017, Kyle Meyer wrote:
> Move the detached HEAD check from branch_get_push_1() to
> branch_get_push() to avoid setting branch->push_tracking_ref when
> branch is NULL.
>
> Signed-off-by: Kyle Meyer
Good point.
> diff --git a/remote.c b/remote.c
> index ad6c5424e..d5eae
On Thu, Jan 05, 2017 at 11:56:23PM -0500, Kyle Meyer wrote:
> Move the detached HEAD check from branch_get_push_1() to
> branch_get_push() to avoid setting branch->push_tracking_ref when
> branch is NULL.
Yep, I think this is the right fix.
> diff --git a/t/t1514-rev-parse-push.sh b/t/t1514-rev-
Move the detached HEAD check from branch_get_push_1() to
branch_get_push() to avoid setting branch->push_tracking_ref when
branch is NULL.
Signed-off-by: Kyle Meyer
---
remote.c | 6 +++---
t/t1514-rev-parse-push.sh | 6 ++
2 files changed, 9 insertions(+), 3 deletions(-)
d
8 matches
Mail list logo