dogfeet / git-tles Goto Github PK
View Code? Open in Web Editor NEWGIT utilities
GIT utilities
git todo asdf
equals to:
tmp=git config todo.base
git config todo.base asdf
git todo
git config todo.base $tmp
git-svn은 Remote Tracking Branch 이름 패턴이 다르다.
안녕하세요? 어제 git:todo plugin 포스트에 댓글 남겼던 Raymundo 입니다.
git todo를 써보면서 느낀 건데요.
--A1---A2---A3---A4---A5 branch A
\ \ \ \
B1----M1---M2--B2---M3 branch B
A1까지 진행한 상태에서 B라는 브랜치를 새로 만들고 위와 같이 진행되었을 때 A를 기준브랜치로 잡고 git todo 하면 B는 A보다 [+5] 진행한 걸로 나옵니다.
그러나 A를 B로 merge한 것은 A와 동일한 수정이니까 굳이 이걸 다 카운트할 필요가 없어보여서, B1과 B2만 ahead로 간주하도록 고쳐보았습니다. (실제로 제 저장소에서는 +22 중에 머지가 17개고 B만의 수정 커밋은 5개였거든요)
문제는, "A에 속한 커밋을 머지한 커밋"만을 찾아내야 하는데 그럴 효과적인 방법을 몰라서 branchB에 있는 모든 머지커밋들(M1,M2,M3)을 대상으로 각각
git merge-base <커밋의 두번째 parent> <branchA>
하여 "merge-base값"이 <커밋의 두번째 parent>값과 동일한 것을 찾았거든요.
즉 git rev-list A..B --merges 해서 나오는 머지커밋의 수만큼 계속 git merge-base를 실행해야 해서... 수가 많으면 매우 느려집니다. 제 간단한 저장소에는 어차피 0.34초 정도 안에 출력이 나니까 상관이 없는데, progit 저장소에서 이걸 적용하면 적용하지 않았을때 12초 걸리던 게 15초 이상 걸리게 되는군요ㅎ
별 수 없이 이걸 옵션으로 결정할 수 있도록 바꾸긴 했는데,
혹시 이 상태에서 저렇게 제외할 머지 커밋의 갯수를 찾아낼 더 효과적인 방법이 있을런지, 고견을 듣고 싶어서 글 남깁니다. 제가 git 초보라서 ^^;
그럼 안녕히 계세요~
P.S. 혹시나 해서, 제가 수정한 부분은 다음 커밋입니다:
gypark@e9f84f0
git todo master
-> git todo | grep master
git todo -a master
-> git todo -a | grep master
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.