git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Finding a tag that introduced a submodule change
@ 2017-03-03 15:40 Robert Dailey
  2017-03-03 16:39 ` Jacob Keller
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Robert Dailey @ 2017-03-03 15:40 UTC (permalink / raw)
  To: Git

I have a repository with a single submodule in it. Since the parent
repository represents the code base for an actual product, I tag
release versions in the parent repository. I do not put tags in the
submodule since multiple other products may be using it there and I
wanted to avoid ambiguous tags.

Sometimes I run into a situation where I need to find out which
release of the product a submodule change was introduced in. This is
nontrivial, since there are no tags in the submodule itself. This is
one thing I tried:

1. Do a `git log` in the submodule to find the SHA1 representing the
change I want to check for
2. In the parent repository, do a git log with pickaxe to determine
when the submodule itself changed to the value of that SHA1.
3. Based on the result of #2, do a `git tag --contains` to see the
lowest-version tag that contains the SHA1, which will identify the
first release that introduced that change

However, I was not able to get past #2 because apparently there are
cases where when we move the submodule "forward", we skip over
commits, so the value of the submodule itself never was set to that
SHA1.

I'm at a loss here on how to easily do this. Can someone recommend a
way to do this? Obviously the easier the better, as I have to somehow
train my team how to do this on their own.

Thanks in advance.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-03-16 10:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-03 15:40 Finding a tag that introduced a submodule change Robert Dailey
2017-03-03 16:39 ` Jacob Keller
2017-03-03 18:04 ` Junio C Hamano
2017-03-15 14:12   ` Robert Dailey
2017-03-15 17:10 ` Stefan Beller
2017-03-16 10:17   ` Jacob Keller

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).