{"thread":{"id":"49111","subject":"[RFC] implement branch.sort config option","startedAt":"2018-08-13T09:57:18Z","lastAt":"2018-08-13T19:19:03Z","messageCount":3,"participants":["Samuel Maftoul","Jeff King","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"355319","messageId":"CAFj+z06S1V3Z7Z0zKPSrpZfWuzku9PTYjG+uu6ig-yCnG4FCLw@mail.gmail.com","threadId":"49111","inReplyTo":null,"subject":"[RFC] implement branch.sort config option","fromName":"Samuel Maftoul","fromEmail":"samuel.maftoul@gmail.com","sentAt":"2018-08-13T09:56:58Z","receivedAt":"2018-08-13T09:57:18Z","isPatch":false,"sender":{"key":"samuel.maftoul@gmail.com","avatar":"https://avatars.githubusercontent.com/u/239203?v=4"},"body":"Currently, you can:\n\ngit tag --sort=$sorting_key\n\nYou can also do this on branches:\n\ngit branch --sort=$sorting_key\n\nFor tags, you can also configure it with a config key:\n\ngit config tag.sort $sorting_key\n\nBut there is no corresponding config for sorting branches.\n\nLocally, I have a (pretty simple) patch that implements the\nbranch.sort config key.\nShould I contribute that ?\nJudging the number of votes and the complexity of answers to this\nquestion https://stackoverflow.com/questions/5188320/how-can-i-get-a-list-of-git-branches-ordered-by-most-recent-commit,\n I would say it's a wanted and useful feature.\nI'm still missing tests and docs, but if agreed the feature is useful,\nI will write them.\n\nThanks\n"},{"id":"355419","messageId":"20180813174643.GA8790@sigill.intra.peff.net","threadId":"49111","inReplyTo":"CAFj+z06S1V3Z7Z0zKPSrpZfWuzku9PTYjG+uu6ig-yCnG4FCLw@mail.gmail.com","subject":"Re: [RFC] implement branch.sort config option","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-08-13T17:46:43Z","receivedAt":"2018-08-13T17:46:47Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Aug 13, 2018 at 11:56:58AM +0200, Samuel Maftoul wrote:\n\n> Currently, you can:\n> \n> git tag --sort=$sorting_key\n> \n> You can also do this on branches:\n> \n> git branch --sort=$sorting_key\n> \n> For tags, you can also configure it with a config key:\n> \n> git config tag.sort $sorting_key\n> \n> But there is no corresponding config for sorting branches.\n> \n> Locally, I have a (pretty simple) patch that implements the\n> branch.sort config key.\n> Should I contribute that ?\n\nYes, that seems like a useful feature to me, and as you point out it\nmakes the overall interface more consistent.\n\n-Peff\n"},{"id":"355454","messageId":"xmqq1sb25b30.fsf@gitster-ct.c.googlers.com","threadId":"49111","inReplyTo":"CAFj+z06S1V3Z7Z0zKPSrpZfWuzku9PTYjG+uu6ig-yCnG4FCLw@mail.gmail.com","subject":"Re: [RFC] implement branch.sort config option","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-08-13T19:18:59Z","receivedAt":"2018-08-13T19:19:03Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Samuel Maftoul <samuel.maftoul@gmail.com> writes:\n\n> I'm still missing tests and docs, but if agreed the feature is useful,\n> I will write them.\n\nI personally think branch.sort would have about the same value as\nthe existing tag.sort, so if a patch is done well, it is likely that\nusers would find it valuable, but let's leave the final judgement\nuntil we actually see the completed patch first.\n\nThanks.\n"}]}