On Thu, Jun 25, 2015 at 9:40 PM, Paul Tan wrote:
> On Wed, Jun 24, 2015 at 11:10 PM, Johannes Schindelin
> wrote:
>>> + else if (l1.len && l2.len && l3.len && is_email(paths->items->string))
>>> + ret = PATCH_FORMAT_MBOX;
>>
>> Maybe we can do better than this by folding the `is_e
On Wed, Jun 24, 2015 at 11:10 PM, Johannes Schindelin
wrote:
> Hi Paul,
>
> On 2015-06-18 13:25, Paul Tan wrote:
>
>> diff --git a/builtin/am.c b/builtin/am.c
>> index e9a3687..7b97ea8 100644
>> --- a/builtin/am.c
>> +++ b/builtin/am.c
>> @@ -121,6 +121,96 @@ static void am_destroy(const struct am
Hi Paul,
On 2015-06-18 13:25, Paul Tan wrote:
> diff --git a/builtin/am.c b/builtin/am.c
> index e9a3687..7b97ea8 100644
> --- a/builtin/am.c
> +++ b/builtin/am.c
> @@ -121,6 +121,96 @@ static void am_destroy(const struct am_state *state)
> strbuf_release(&sb);
> }
>
> +/*
> + * Returns
On Fri, Jun 19, 2015 at 5:02 AM, Junio C Hamano wrote:
> Paul Tan writes:
>
>> +static int is_email(const char *filename)
>> +{
>> + struct strbuf sb = STRBUF_INIT;
>> + FILE *fp = xfopen(filename, "r");
>> + int ret = 1;
>> +
>> + while (!strbuf_getline(&sb, fp, '\n')) {
>> +
Paul Tan writes:
> +static int is_email(const char *filename)
> +{
> + struct strbuf sb = STRBUF_INIT;
> + FILE *fp = xfopen(filename, "r");
> + int ret = 1;
> +
> + while (!strbuf_getline(&sb, fp, '\n')) {
> + const char *x;
> +
> + strbuf_rtrim(&sb);
Is
5 matches
Mail list logo