0

excuse me for the vague title, let me explain:

I have a collection of git repos, and I need to come up with a "synthetic" hash which is generated by the revision hashes from these repos, so it can be used to differentiate which repo has new commits:

E.g. if I have two repos with latest hashes:

  • repo A: 90d4b6
  • repo B: fa880b
  • synthetic hash is e0ea5a

Next time repo A has new commits:

  • repo A': ac9561
  • repo B': fa880b
  • synthetic hash' now becomes 12fc92

Is there a way/hash function to construct the synthetic hash so I can tell from the change (from e0ea5a to 12fc92) that this is caused by repo A changes?

I know the information about all repos's current revision hash, however I only know the "synthetic" hash from last time

Chen Xie
  • 3,849
  • 8
  • 27
  • 46

1 Answers1

0

You can do the following:

  1. Use no-ff merge which will create a "side" graph for the merge. your merge will have 2 parents and using git show <SHA-1> you will be able to view the origin

enter image description here

enter image description here

CodeWizard
  • 128,036
  • 21
  • 144
  • 167