git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Julian Ibarz <julian.ibarz@gmail.com>
To: Heiko Voigt <hvoigt@hvoigt.net>
Cc: Junio C Hamano <gitster@pobox.com>,
	Jens Lehmann <Jens.Lehmann@web.de>,
	git@vger.kernel.org
Subject: Re: Re: Re: Updating a submodule with a compatible version from another submodule version using the parent meta-repository
Date: Sat, 12 Feb 2011 15:32:43 -0500	[thread overview]
Message-ID: <AANLkTimist_GXgRGdUW1PpxpRO=poYgD4HkDC5CsyLra@mail.gmail.com> (raw)
In-Reply-To: <20110209193610.GA67890@book.hvoigt.net>

Hi Heiko,

Thanks for all your feedbacks. Before your first mail I had already
implemented command 1 you are talking about and almost finished
command 2. Today I could spend some time again on this side project
and I have finished command 2. Here is what you do:

git submodulecheckout --find-versions <submodule> > <some_temp_file>
cd <submodule>
git submodulecheckout --find-closest < <some_temp_file>

This will output the version you need to checkout in the meta
repository. I don't handle the case where there is multiple solutions
but it is a good start I think. I think with this you can already
start the integration in the submodule bash script to make it
recursive and be more user-friendly? Are you still interested Heiko?

I have pushed this to my repository so you can check it out if you want.

Both commands have a suboptimal implementation but it can be improved
without changing the current API so I think it is a minor issue. I
will probably try this at work today on msysgit. Currently I am  doing
this at home on my linux using some open source meta-repository, if
you have a big one to try this feature let me know (I am currently
using git://git.assembla.com/luadocsuperforest.git and it is not that
big).

Best regards,

Julian Ibarz

On Wed, Feb 9, 2011 at 2:36 PM, Heiko Voigt <hvoigt@hvoigt.net> wrote:
> Hi Julian,
>
> On Wed, Feb 02, 2011 at 11:31:40PM -0500, Julian Ibarz wrote:
>> So now my two questions that could save me some time are:
>> - is there a function that gives the distance between two commits? I'm
>> sure there is something like this coded somewhere but I didn't find it
>> yet
>
> One thing which now came to my mind is that you might be interested in
> is to use merge bases to find the earliest commit that contains a
> certain revision.
>
> Have a look at how I implemented the submodule merge strategy that might
> help you. You can find it in commit 68d03e4a. I basically do a search
> for the earliest commit that contains the commits from both sides. You
> could use a similar strategy but limit the possible candidates to a
> restricted list of commits which are contained in the supermodule.
>
> Cheers Heiko
>

  reply	other threads:[~2011-02-12 20:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTinN1XVsAZXGLqkuhysrJ8-TCtGm4pOu2RfCEVVp@mail.gmail.com>
2011-01-26 18:32 ` Updating a submodule with a compatible version from another submodule version using the parent meta-repository Julian Ibarz
2011-01-26 19:06   ` Jens Lehmann
2011-01-26 19:10     ` Julian Ibarz
2011-01-26 19:39       ` Jens Lehmann
2011-01-26 19:48         ` Julian Ibarz
2011-01-26 20:31           ` Jens Lehmann
2011-01-26 20:43             ` Julian Ibarz
2011-01-26 20:41           ` Junio C Hamano
2011-01-26 20:45             ` Julian Ibarz
2011-01-26 22:05               ` Junio C Hamano
2011-01-29 11:08                 ` Heiko Voigt
2011-01-30  9:44                   ` Julian Ibarz
2011-02-03  4:31                     ` Julian Ibarz
2011-02-06 18:51                       ` Heiko Voigt
2011-02-09 19:36                       ` Heiko Voigt
2011-02-12 20:32                         ` Julian Ibarz [this message]
2011-02-13 13:30                           ` Heiko Voigt
2011-02-13 18:59                             ` Julian Ibarz
2011-02-14 21:13                               ` Heiko Voigt
2011-02-20  1:15                                 ` Julian Ibarz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTimist_GXgRGdUW1PpxpRO=poYgD4HkDC5CsyLra@mail.gmail.com' \
    --to=julian.ibarz@gmail.com \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hvoigt@hvoigt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).