fabatera
fabatera

Reputation: 379

Relating two different commits from two different repos

I have 2 different repositories modified to solve 1 problem. I'd committed the changes made in each repo and pushed to gerrit for review.

So I have 1 commit and 1 push for each repo.

How to relate or link both commits / pushs so other people will know that 1 problem was solved?

Upvotes: 0

Views: 803

Answers (2)

In Gerrit changes can be grouped by topics. This is useful because it allows you to easily find related changes by using the topic: search operator. Also on the change screen changes with the same topic are displayed so that you can easily navigate between them.

See more info in Gerrit documentation:

Upvotes: 3

Patrick Mevzek
Patrick Mevzek

Reputation: 12495

If the repositories are completely unrelated (one not being the clone of the other), you will have no technical way to link them[*]

For semantic value, you could tag each commit with the same tag name in both repositories. And a tag name being clear enough on what the issue was while at the same time not being too long... which is often difficult (naming is always a difficult problem).

You have also the git notes feature, but this is kind of arcane, and not all tools, besides core git, know how to handle them (where tags are known everywhere). If using the notes feature you could put in each repository a note on the relevant commit ID being, as pure text, the commit ID or URL of the other commit.

Other than that, you can always have a README or CHANGES file in each repository listing things like that. It is however of course completely manual and non formatted.

[*] or if you want to be super-geeky you create a metarepository where you import both repositories in it (a git repository can have more than one root commit in fact, not always known, rarely useful, always complicated, but still possible); or you use submodules.

Upvotes: 0

Related Questions