git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git describe/contains for submodule commits
@ 2019-05-22 23:42 Jacob Keller
  2019-05-23  0:04 ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 3+ messages in thread
From: Jacob Keller @ 2019-05-22 23:42 UTC (permalink / raw)
  To: Git mailing list

Hi,

I've had a few times where I was curious of when a submodule got set
to a specific commit.

I noticed that git describe has "blob" support, which outputs something like

<commit>:/path/to/file

using the revision walking machinery.

I'm curious if anyone knows if that sort of revision walk could be
expected to find the first treeish that had a submodule commit instead
of a blob.

I'm not that familiar with the revision walking, so I was hoping to
get some pointers of whre to look before I began implementing.

Ultimately, I'd like to have some sort of command like:

  git submodule contains <submodule> <commit id>

and have it try to figure out the most recent commit htat has a
submodule change for which the submodule is a child of the specified
submodule commit.

I can sort of reverse engineer this through git log, but it's slow and
tedious, so I was hoping to be able to implement it into a revision
walk that did this.

Once I know the commit that introduces the submodule change, I could
feed that to git describe --contains to find the tag/version which
included the change easily enough.

Thanks,
Jake

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

end of thread, other threads:[~2019-05-29 17:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-22 23:42 git describe/contains for submodule commits Jacob Keller
2019-05-23  0:04 ` Ævar Arnfjörð Bjarmason
2019-05-29 17:32   ` 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).