On Thu, Jul 23, 2015 at 12:14 AM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> + strtoul_ui(valp, 10, &ref->align_value);
>> + if (ref->align_value < 1)
>> + die(_("Value should be greater than zero"));
>
> You're not checkin
Karthik Nayak writes:
> + strtoul_ui(valp, 10, &ref->align_value);
> + if (ref->align_value < 1)
> + die(_("Value should be greater than zero"));
You're not checking the return value of strtoul_ui, which returns -1
before assign
On Mon, Jul 20, 2015 at 10:59 PM, Junio C Hamano wrote:
> Junio C Hamano writes:
>
>> Your caller is iterating over the elements in a format string,
>> e.g. 'A %(align:20)%(foo) B %(bar) C', and its caller is iterating
>> over a list of refs, e.g. 'maint', 'master' branches. With that
>> format
On Mon, Jul 20, 2015 at 11:31 PM, Eric Sunshine wrote:
> On Mon, Jul 20, 2015 at 1:22 PM, Karthik Nayak wrote:
>> Add a new atom "align" and support %(align:X) where X is a number.
>> This will align the preceeding atom value to the left followed by
>> spaces for a total length of X characters. I
On Mon, Jul 20, 2015 at 1:22 PM, Karthik Nayak wrote:
> Add a new atom "align" and support %(align:X) where X is a number.
> This will align the preceeding atom value to the left followed by
> spaces for a total length of X characters. If X is less than the item
> size, the entire atom value is pr
On Mon, Jul 20, 2015 at 12:12 PM, Junio C Hamano wrote:
> Eric Sunshine writes:
>
>> On Sat, Jul 18, 2015 at 3:12 PM, Karthik Nayak wrote:
>>> Add a new atom "align" and support %(align:X) where X is a number.
>>> This will align the preceeding atom value to the left followed by
>>> spaces for a
Junio C Hamano writes:
> Your caller is iterating over the elements in a format string,
> e.g. 'A %(align:20)%(foo) B %(bar) C', and its caller is iterating
> over a list of refs, e.g. 'maint', 'master' branches. With that
> format string, as long as %(foo) does not expand to something that
> ex
From: Karthik Nayak
Add a new atom "align" and support %(align:X) where X is a number.
This will align the preceeding atom value to the left followed by
spaces for a total length of X characters. If X is less than the item
size, the entire atom value is printed.
Helped-by: Duy Nguyen
Mentored-b
>
> What is your plan for this function? Is it envisioned that this
> will gain more variations of formatting options over time?
> Otherwise it seems misnamed (it is not "assign formatting" but
> merely "pad to the right").
>
I wanna include an 'ifexists' atom in the future where an user can
spec
Karthik Nayak writes:
> @@ -687,6 +690,17 @@ static void populate_value(struct ref_array_item *ref)
> else
> v->s = " ";
> continue;
> + } else if (starts_with(name, "align:")) {
> + const ch
Eric Sunshine writes:
> On Sat, Jul 18, 2015 at 3:12 PM, Karthik Nayak wrote:
>> Add a new atom "align" and support %(align:X) where X is a number.
>> This will align the preceeding atom value to the left followed by
>> spaces for a total length of X characters. If X is less than the item
>> siz
On Mon, Jul 20, 2015 at 5:19 AM, Eric Sunshine wrote:
> On Sat, Jul 18, 2015 at 3:12 PM, Karthik Nayak wrote:
>> Add a new atom "align" and support %(align:X) where X is a number.
>> This will align the preceeding atom value to the left followed by
>> spaces for a total length of X characters. If
On Sat, Jul 18, 2015 at 3:12 PM, Karthik Nayak wrote:
> Add a new atom "align" and support %(align:X) where X is a number.
> This will align the preceeding atom value to the left followed by
> spaces for a total length of X characters. If X is less than the item
> size, the entire atom value is pr
From: Karthik Nayak
Add a new atom "align" and support %(align:X) where X is a number.
This will align the preceeding atom value to the left followed by
spaces for a total length of X characters. If X is less than the item
size, the entire atom value is printed.
Helped-by: Duy Nguyen
Mentored-b
14 matches
Mail list logo