Re: [PATCH] branch: support sorting branches by mtime
On Nov 18, 2010, at 6:22 AM, Nguyễn Thái Ngọc Duy wrote:
Show 22 quoted lines
> I lost in my branches again while looking for a topic that I feel like
> working on tonight. Too old branches are out of question.
>
> This throwaway patch demonstrates the idea. I should have looked into
> reflog for this kind of information, but my laziness won over me.
>
> OK Git's fun time is over..
> ---
> builtin/branch.c | 32 ++++++++++++++++++++++++++++----
> 1 files changed, 28 insertions(+), 4 deletions(-)
>
> diff --git a/builtin/branch.c b/builtin/branch.c
> index 87976f0..fdc2714 100644
> --- a/builtin/branch.c
> +++ b/builtin/branch.c
> @@ -232,6 +232,7 @@ struct ref_item {
> char *name;
> char *dest;
> unsigned int kind, len;
> + unsigned long mtime;
> struct commit *commit;
> };It's possible to have 32-bit long and 64-bit time_t.
Josh