Pay attention, only you create a commit at branch, the branch will generate at real so if you execute `zit init`, then `zit branch` immediately will get nothing, this is not a bug.
()
| 39 | * so if you execute `zit init`, then `zit branch` immediately will get nothing, this is not a bug. |
| 40 | */ |
| 41 | @Override |
| 42 | public void run() { |
| 43 | // none name for readable command |
| 44 | if(ConstantVal.NONE.equals(name)) { |
| 45 | final String currentBranch = ZitContext.getBranchName(); |
| 46 | final List<String> branchNames = iteratorBranchNames(); |
| 47 | branchNames.forEach(branchName -> |
| 48 | log.info("{} {}", branchName.equals(currentBranch) ? ConstantVal.STAR : ConstantVal.EMPTY, branchName) |
| 49 | ); |
| 50 | } else { |
| 51 | // got name for branch will be created base on the commit point |
| 52 | createBranch(name, startPoint); |
| 53 | log.info("created branch {} at {}", name, startPoint.substring(0, 11)); |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * list all branches in the repository |
nothing calls this directly
no test coverage detected