aspiers / git-deps

git commit dependency analysis tool
GNU General Public License v2.0
297 stars 46 forks source link

Excluding commits previously cherry-picked. #101

Open PastaPastaPasta opened 4 years ago

PastaPastaPasta commented 4 years ago

I'm trying to use git deps to optimize the backported work that I'm doing, and due to the massive size of the repo, if I don't exclude things that have already been backported it is impossible to glean any data. However, it appears that git deps "-e" only works if that exact commit is in the branch you're excluding, not if there is already a cherry-pick of that commit in the branch.

Does that make sense?

Please let me know if this functionality does exist and I'm just missing it.

Very cool piece of software and I'm hoping I'll be able to use it :)

aspiers commented 3 years ago

Hmm, that's a good question, and sorry that I've only just noticed it. On first thought, I think the answer is to add a new option (or extend -e) so that specific commits can be excluded, not just branches. Then you could specify a list of all the commits you've already backported.

Worth noting that -e can already be repeated multiple times, but it will exclude all ancestors of the commit-ish provided, whereas in this case you presumably want to exclude just the cherry-picks, in addition to excluding the tip of the backport target branch.

Does that sound good? Shouldn't be hard to do.

Incidentally, I developed some other tools for backporting:

jerryleooo commented 1 month ago

I also need this, as there might be tons of commits that need to be excluded so infeasible to use -e

cool idea, still👍