cros mass git operations

24 views
Skip to first unread message

Jerry Jin

unread,
Mar 3, 2021, 3:23:07 AM3/3/21
to Chromium OS Development
hello, i'm new to cros development, i work on entire source tree in one vscode window, which includes 200+ git repos, not sure if this is a good idea...

after i made changes here and there, how do i `git status` like working on a single git repo?
any script to report all the changes in all 200+ git repos?
i found some git related scripts in `depot_tools`, but it seems none does that

it would be great to have scripts for "mass git operations" like `git status`. `git diff`, `git checkout -- .`, etc...

thank you!

regards
jerry

Vincent Palatin

unread,
Mar 3, 2021, 3:51:36 AM3/3/21
to Jerry Jin, Chromium OS Development
'repo status' and 'repo diff' ? (which comes in depot_tools AFAIR)


-- 
Vincent 

Jerry Jin

unread,
Mar 3, 2021, 7:54:11 AM3/3/21
to Chromium OS Development, Vincent Palatin, Chromium OS Development, Jerry Jin
thank you, `repo status` is very useful, `repo diff` behaves different from `git diff`, it seems it only looks at existing project files, new files are not in output

Mike Frysinger

unread,
Mar 3, 2021, 11:00:28 AM3/3/21
to Jerry Jin, Chromium OS Development, Vincent Palatin
`git diff` doesn't show new files either
-mike

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
https://groups.google.com/a/chromium.org/group/chromium-os-dev

Jerry Jin

unread,
Mar 3, 2021, 9:46:04 PM3/3/21
to Mike Frysinger, Chromium OS Development, Vincent Palatin
thank you, i tried again, you're right, `git diff` doesn't show new files

dragon788

unread,
Mar 5, 2021, 9:53:51 AM3/5/21
to Jerry Jin, Mike Frysinger, Chromium OS Development, Vincent Palatin
If you want to see new files that have been added with `git add` that didn't exist before, you can use `git diff --staged`, so maybe `repo diff --staged` if it is just a wrapper for git.

---
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-d...@chromium.org.

Vadim Bendebury (вб)

unread,
Mar 5, 2021, 10:39:18 AM3/5/21
to Jerry Jin, Chromium OS Development
there is `willis` utility for that:

$ cd ~/trunk/src/platform/dev/contrib/
$ go build willis.go
$ ./willis


--

Jerry Jin

unread,
Mar 6, 2021, 1:01:40 AM3/6/21
to Chromium OS Development, drag...@gmail.com, Mike Frysinger, Chromium OS Development, Vincent Palatin, Jerry Jin
thank you, i tried, `--staged` cannot be used with `repo diff`
```
 repo diff --staged
Usage: repo diff [<project>...]

The -u option causes 'repo diff' to generate diff output with file paths
relative to the repository root, so the output can be applied
to the Unix 'patch' command.

main.py: error: no such option: --staged
```

Jerry Jin

unread,
Mar 6, 2021, 1:02:35 AM3/6/21
to Chromium OS Development, Vadim Bendebury, Chromium OS Development, Jerry Jin
thank you, what does `willis` do? i followed your instructions, there's nothing in the console output

Vadim Bendebury (вб)

unread,
Mar 8, 2021, 12:26:54 PM3/8/21
to Jerry Jin, Chromium OS Development
no output means your entire repo is in clean state,

willis shows repo components which have local branches, changed files, etc.

-vb

Bob Moragues

unread,
Mar 8, 2021, 1:17:12 PM3/8/21
to Vadim Bendebury (вб), Jerry Jin, Chromium OS Development
For items that willis doesn't cover.
I am just learning about that now.

There is a "repo forall" command that can be used to give you some customization.

Personally, I have used "repo status" and "repo branches" to give me a general idea of where I need to look.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages