Am 23.03.2017 um 20:39 schrieb Jeff King:
On Thu, Mar 23, 2017 at 12:33:06PM -0700, Junio C Hamano wrote:
Nice, but why add the "if" when it's doing nothing?
It's short-circuiting in the conditional.
I think René meant this:
/* just for side effects */
skip_prefix(name, "refs/hea
On Thu, Mar 23, 2017 at 8:39 PM, Jeff King wrote:
> On Thu, Mar 23, 2017 at 12:33:06PM -0700, Junio C Hamano wrote:
>
>> >> Nice, but why add the "if" when it's doing nothing?
>> >
>> > It's short-circuiting in the conditional.
>>
>> I think René meant this:
>>
>> /* just for side effects */
Jeff King writes:
> On Thu, Mar 23, 2017 at 12:33:06PM -0700, Junio C Hamano wrote:
>
>> >> Nice, but why add the "if" when it's doing nothing?
>> >
>> > It's short-circuiting in the conditional.
>>
>> I think René meant this:
>>
>> /* just for side effects */
>> skip_prefix(name, "re
René Scharfe writes:
>> I think René meant this:
>>
>> /* just for side effects */
>> skip_prefix(name, "refs/heads/", &name) ||
>> skip_prefix(name, "refs/tags/", &name) ||
>> skip_prefix(name, "refs/remotes/", &name);
>>
>> return name;
>>
>> which still short-sircuits,
On Thu, Mar 23, 2017 at 12:33:06PM -0700, Junio C Hamano wrote:
> >> Nice, but why add the "if" when it's doing nothing?
> >
> > It's short-circuiting in the conditional.
>
> I think René meant this:
>
> /* just for side effects */
> skip_prefix(name, "refs/heads/", &name) ||
> sk
Am 23.03.2017 um 20:33 schrieb Junio C Hamano:
Jeff King writes:
On Thu, Mar 23, 2017 at 08:18:26PM +0100, René Scharfe wrote:
Am 23.03.2017 um 16:50 schrieb SZEDER Gábor:
This eliminates three magic numbers.
Signed-off-by: SZEDER Gábor
---
refs.c | 10 +-
1 file changed, 5 inser
Jeff King writes:
> On Thu, Mar 23, 2017 at 08:18:26PM +0100, René Scharfe wrote:
>
>> Am 23.03.2017 um 16:50 schrieb SZEDER Gábor:
>> > This eliminates three magic numbers.
>> >
>> > Signed-off-by: SZEDER Gábor
>> > ---
>> > refs.c | 10 +-
>> > 1 file changed, 5 insertions(+), 5 dele
On Thu, Mar 23, 2017 at 12:23 PM, Jeff King wrote:
> On Thu, Mar 23, 2017 at 08:18:26PM +0100, René Scharfe wrote:
>
>> Am 23.03.2017 um 16:50 schrieb SZEDER Gábor:
>> > This eliminates three magic numbers.
>> >
>> > Signed-off-by: SZEDER Gábor
>> > ---
>> > refs.c | 10 +-
>> > 1 file c
On Thu, Mar 23, 2017 at 08:18:26PM +0100, René Scharfe wrote:
> Am 23.03.2017 um 16:50 schrieb SZEDER Gábor:
> > This eliminates three magic numbers.
> >
> > Signed-off-by: SZEDER Gábor
> > ---
> > refs.c | 10 +-
> > 1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a
Am 23.03.2017 um 16:50 schrieb SZEDER Gábor:
This eliminates three magic numbers.
Signed-off-by: SZEDER Gábor
---
refs.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/refs.c b/refs.c
index e7606716d..0272e332c 100644
--- a/refs.c
+++ b/refs.c
@@ -366,11 +366,11
This eliminates three magic numbers.
Signed-off-by: SZEDER Gábor
---
refs.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/refs.c b/refs.c
index e7606716d..0272e332c 100644
--- a/refs.c
+++ b/refs.c
@@ -366,11 +366,11 @@ int for_each_glob_ref(each_ref_fn fn, const
11 matches
Mail list logo