Probably something like this:
repo forall -p -c git diff --stat HEAD@{1} HEAD
Thank you for the reply. Could you briefly explain what @{1} means? I tried "repo forall -c git diff --stat HEAD@{1} HEAD", and got the following error message:
fatal: Log for 'HEAD' only has 1 entries.
fatal: ambiguous argument 'HEAD@{1}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
fatal: ambiguous argument 'HEAD@{1}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
Then I changed the command to "repo forall -c git diff --stat HEAD~1 HEAD", this command works fine, however it always show the diff of current version and previous version regardless of whether it is synced this time. For example, let's say I have git repository A and B in project list. Repo synced them. Then A has updates, and repo synced them again. We should only see file updates in A, however with this above command it will always show previous version of both A and B.
Thanks
Si
> On Apr 19, 2011, at 10:14 AM, Shawn Pearce wrote:
>
> > Probably something like this:
> >
> > repo forall -p -c git diff --stat HEAD@{1} HEAD
>
> Thank you for the reply. Could you briefly explain what @{1} means?
It means the previous value of the immediately preceding ref, i.e.
it answers the question "what was HEAD before the last checkout
operation?". Quoting gitrevisions(7):
A ref followed by the suffix @ with an ordinal specification
enclosed in a brace pair (e.g. {1}, {15}) to specify the n-th
prior value of that ref. For example master@{1} is the
immediate prior value of master while master@{5} is the 5th
prior value of master. This suffix may only be used immediately
following a ref name and the ref must have an existing log
($GIT_DIR/logs/<ref>).
See also git-reflog(1).
> I tried "repo forall -c git diff --stat HEAD@{1} HEAD", and got the
> following error message:
>
> fatal: Log for 'HEAD' only has 1 entries.
> fatal: ambiguous argument 'HEAD@{1}': unknown revision or path not in the working tree.
> Use '--' to separate paths from revisions
> fatal: ambiguous argument 'HEAD@{1}': unknown revision or path not in the working tree.
> Use '--' to separate paths from revisions
That would indicate that those gits had an empty reflog, i.e. they
have not been checked out before. They could be new gits that were
just added to the manifest.
[...]
--
Magnus Bäck Opinions are my own and do not necessarily
SW Configuration Manager represent the ones of my employer, etc.
Sony Ericsson