Re: [PATCH] use natural ordering to display list of branches.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, 5 Jun 2008, Cedric Vivier wrote:

> Hi everyone,
> 
> This small patch makes git display list of branches in natural order.
> This way, when you name your branches against, for instance, a bug number from
> some bug-tracking tool, the list will show up in a natural/human/logical order.
> 
> Current behavior for "git branch":
> BUG-1040-doing-bar-is-too-slow
> BUG-84-calling-Z-with-null-segfaults
> BUG-900-program-freezes-when-user-click-on-button
> experimental-feature-X
> master
> 
> With the patch:
> BUG-84-calling-Z-with-null-segfaults
> BUG-900-program-freezes-when-user-click-on-button
> BUG-1040-doing-bar-takes-too-much-time
> experimental-feature-X
> master
> 
> 
> Signed-off-by: Cedric Vivier <cedricv@xxxxxxxxxx>
> ---

This is not a good commit message.

> @@ -279,7 +280,7 @@ static int ref_cmp(const void *r1, const void *r2)
> 
>  	if (c1->kind != c2->kind)
>  		return c1->kind - c2->kind;
> -	return strcmp(c1->name, c2->name);
> +	return strnatcmp(c1->name, c2->name);
>  }
> 
>  static void print_ref_item(struct ref_item *item, int maxwidth, int verbose,

What about people preferring the status quo?  I think a command line 
option would be in order.

Also, you _might_ want to provide a test case, so that it does not get 
broken by accident.

Other than that: nice.

Ciao,
Dscho
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux