-
-
Save Likk/9af89b10fd0008df91ad to your computer and use it in GitHub Desktop.
git branch の最終更新日でソートするワンライナー
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git branch -v | perl -MDateTime::Format::HTTP -nle 'my @c= split/(?:\*?\s)+/,$_; my $e= `git show $c[2] --date=rfc2822 --pretty="%cd" --decorate | head -n 1`;chomp $e ; print sprintf("%s %s",DateTime::Format::HTTP->parse_datetime($e),join q{ },@c) ;' | sort |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment