With repo forall command, how to print both shortstat
and REPO_PROJECT
?
I tried below, it didn't work, it just prints the $REPO_PROJECT
but not the shortstat
.
repo forall -c 'echo $REPO_PROJECT' -c 'git diff --shortstat tagA tagB'
I wanted it to print:
project/name
1 file changed, 2 insertions(+), 2 deletions(-)
答案 0 :(得分:7)
有一个-p
选项可以打印项目名称
repo forall -p -c 'git diff --shortstat tagA tagB'
在我的项目中,此命令输出如下内容:
project MTCommonServices/
9 files changed, 274 insertions(+), 216 deletions(-)
project MTConfig/
2 files changed, 12 insertions(+), 2 deletions(-)
project MTModuleOrder/
26 files changed, 764 insertions(+), 160 deletions(-)
project MTModuleProductDetail/
8 files changed, 34 insertions(+), 3 deletions(-)
project MTModuleUser/
18 files changed, 444 insertions(+), 148 deletions(-)
project MaitaoApp/
3 files changed, 137 insertions(+), 111 deletions(-)
答案 1 :(得分:1)
"alwaysRun=true"
作品。