Skip to content
Browse files

( ꒪⌓꒪) git cherry -v の出力からissue/ticket の内容を列挙するいい感じのアレ

  • Loading branch information...
1 parent 52feeb5 commit ef99176929f083f9d4dbab09d5db99060cb7039e @yuroyoro committed Jul 13, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 .gitconfig
View
5 .gitconfig
@@ -109,6 +109,11 @@
delete-unmerged = "!f() { git ls-files --deleted | cut -f2 | sort -u ; }; git rm `f`"
# 指定したコミットで変更されたファイルを編集する
modified = "!f() { git diff $1..$1\\^ --name-only | xargs sh -c 'vim "$@" < /dev/tty' - ;}; f"
+ # cherr -vで出てくる;commitから#1234なチケット番号を切り出す
+ cherry-ticket-numbers = "!f() { git cherry -v "$@" | cut -b 44- | awk 'match($0, /#[0-9]+/) {print substr($0, RSTART, RLENGTH)}' | sort -u ;}; f"
+ # cherr -vに含まれるチケットを列挙する
+ cherry-tickets = "!f() { git cherry -v "$@" | cut -b 44- | awk 'match($0, /#[0-9]+/) {print substr($0, RSTART+1, RLENGTH-1)}' | sort -u | xargs git issue --oneline ;}; f"
+
# grep関連
gr = grep
gn = grep -n

0 comments on commit ef99176

Please sign in to comment.
Something went wrong with that request. Please try again.