How to see the subrepo history?
Thank you for a great git feature. subrepo clone has worked very well for my use cases. I have not figured out whether one should be able to see the commit log history of the subrepo though.
In git subrepo help, it says "git log subrepo/\
$ git log subrepo/themes/bilberry-hugo-theme/fetch
fatal: ambiguous argument 'subrepo/themes/bilberry-hugo-theme/fetch': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
The error is the same for any nonsensical path passed to git log.
The README gives two forms of git log incantation. The same as above, and then also
git log refs/subrepo/<subdir>/fetch
which fails for me with the same error. I'm running git version 1.20.1 on a mac and the subrepo version from Nov 2018, pulled yesterday from master, version 0.4.0.
After squashing, is the history still from the subrepo still available locally? Have I misunderstood something about the command usage or is there a new way to see the commit history?
Thanks again for a very nice tool. I know if I really want to see the commit history, I can always download the repo to a temporary location.
@FrankReh you can run git subrepo branch <subrepo>, then you will generate a branch (and a worktree with that branch) and that should allow you to check the logs for the subrepo.
The reason you would get the error for the log command is that the metadata for the subrepo has not been fetched. This can be caused by performing a git subrepo clean, or just checking out a repo and not using the subrepo commands. It is suggested that you use git subrepo fetch before attempting to use the git log on a subrepo.
Most helpful comment
The reason you would get the error for the log command is that the metadata for the subrepo has not been fetched. This can be caused by performing a git subrepo clean, or just checking out a repo and not using the subrepo commands. It is suggested that you use git subrepo fetch before attempting to use the git log on a subrepo.