From: Joshua Juran Date: Sat, 20 Nov 2010 04:22:19 GMT Subject: Re: [PATCH] branch: support sorting branches by mtime Message-ID: <21836339-5F7E-4485-97CB-FC609CE4E364@gmail.com> In-Reply-To: <1290090126-14471-1-git-send-email-pclouds@gmail.com> On Nov 18, 2010, at 6:22 AM, Nguyễn Thái Ngọc Duy wrote: > 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