twosigma / git-meta

Repository for the git-meta project -- build your own monorepo using Git submodules
http://twosigma.github.io/git-meta
BSD 3-Clause "New" or "Revised" License
216 stars 50 forks source link

"git-meta log -p" appears inconsistent with "git meta diff" #710

Open rgeary19 opened 5 years ago

rgeary19 commented 5 years ago

The -p option to git meta log should list the changes to the files committed. However, instead it shows you the changes to the submodule SHAs, eg.

@@ -1 +1 @@
-Subproject commit ad227241dcd754d2cebf79ef5f170c5920383c0e
+Subproject commit e5232a12bf1c70f404ff91466b8751e491e7c7c4

To get the expected behavior I can add the flag --submodule=diff. However this is unexpected as the purpose of git meta is to pretend there is no submodules.

petroseskinder commented 5 years ago

@rgeary19 this seems like an issue of expectations.

Was it an intentional decision for git meta log -p to not pass --submodule=diff by default, @bpeabody @jhedwardyang @novalis @abliss?

I have had similiar issues with git meta diff. At some point, I had to pass --submodule=diff if I wanted it to display the diff in each submodule.

novalis commented 5 years ago

I agree with this, but it's a bit tricky (in part because one doesn't always have the necessary submodules open). Happy to review a patch.

bpeabody commented 5 years ago

It was not a conscious decision to not pass --submodule=diff; there is a set of commands that are automatically forwarded to vanilla Git. We explicitly went back and made git meta diff as a special case pass in --submodule=diff.