Git and sparse-checkout on large monorepos - hiding irrelevant changes for a sparse-checkout specification? (git-diff, git-log, etc)

江枫思渺然 提交于 2020-04-30 06:37:26

问题


As git is increasingly advertised (and enhanced) to better support very large repositories (so-called "monorepos"), with major recent enhancements to the sparse-checkout workflow (git-sparse-checkout command and partial clone / promisors / --filter), I'm surprised that I can't find a way to leverage the sparse-checkout configuration/specification when dealing with commit history.

I see that the topic has been partially brought up in previous questions:

  • filter git commit history after sparse checkout
  • git log filter with sparse checkout

The only answers propose per-command path filters, but converting the .git/info/sparse-checkout specification to path filters will often be non-trivial if not impossible.

The lack of sparse-checkout support seems particularly problematic with git-diff, where on a large monorepo the differences between two reasonably-distant versions of the repo might be substantially obscured, or effectively unreachable, due to all other teams'/areas' updates. This is both a performance concern, and a readability/reachability/usability concern.

Does anyone know whether using sparse-checkout configuration in diff and other tools is possible, and/or whether such a possibility is in the works?

来源:https://stackoverflow.com/questions/61326025/git-and-sparse-checkout-on-large-monorepos-hiding-irrelevant-changes-for-a-spa

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!