From: Jens Lehmann <Jens.Lehmann@web.de>
To: Chris Packham <judge.packham@gmail.com>
Cc: Fredrik Gustafsson <iveqy@iveqy.com>,
git@vger.kernel.org, stefan.naewe@atlas-elektronik.com,
Heiko Voigt <hvoigt@hvoigt.net>
Subject: Re: [RFC/PATCH] submodule: add 'exec' option to submodule update
Date: Sun, 30 Jun 2013 17:30:14 +0200 [thread overview]
Message-ID: <51D04F06.9000400@web.de> (raw)
In-Reply-To: <51CEA4B2.1090008@gmail.com>
Am 29.06.2013 11:11, schrieb Chris Packham:
> On 28/06/13 22:42, Fredrik Gustafsson wrote:
>> technically it looks fine to me (except for the lack of tests) but I'm
>> not sure I follow the use case.
>>
>> In your case, you want to run a script to determinate if that certain
>> submodule should use merge or rebase depending on "whatever". And this
>> can't be done with git submodule foreach because you want to know the
>> sha1 to update to. Have I understood you correctly?
>
> Correct. We tend to have submodules that are just normal detached heads
> which we don't usually touch and others that are actively developed
> where we would use submodule.x.update=rebase (I personally do) but some
> developers want to use stgit on those repositories.
>
> Another approach could be to do a 'git pull --no-recurse-submodule' then
> use 'git submodule foreach script-that-does-the-rebase'. The benefit of
> the patch I sent is that it can be setup using the config variables[1]
> and updated the normal way along with the detached HEADs and those using
> plain git branches.
Wouldn't a "stgit submodule update" (which would do the Right Thing for
submodules initialized with stgit by maybe just using the pull & foreach
logic you described) be a better UI for solving your problem?
> There may be other use-cases for integration with other tools as well
> (e.g. something that updates a review tool when commits get rebased).
>
> --
> [1] I'm not crazy about the name of submodule.*.update.command but I
> couldn't think of a better one.
Hmm, if we go that route, why not do the same we do for aliases? If
the submodule.*.update setting is prefixed with a '!', we just execute
the shell command following. This would give everyone the freedom to
do arbitrary stuff if the current none, checkout, merge & rebase won't
do the trick without having to add another config option.
next prev parent reply other threads:[~2013-06-30 15:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-28 9:53 [RFC/PATCH] submodule: add 'exec' option to submodule update Chris Packham
2013-06-28 10:13 ` Stefan Näwe
2013-06-28 10:42 ` Fredrik Gustafsson
2013-06-29 9:11 ` Chris Packham
2013-06-30 15:30 ` Jens Lehmann [this message]
2013-07-01 9:21 ` Chris Packham
2013-07-01 10:11 ` [RFC/PATCHv2] submodule: add ability to configure update command Chris Packham
2013-07-01 16:26 ` Junio C Hamano
2013-07-02 10:12 ` [RFC/PATCHv3] submodule update: allow custom " Chris Packham
2013-07-02 16:56 ` Jens Lehmann
2013-07-02 23:26 ` Chris Packham
2013-07-03 6:55 ` Jens Lehmann
2013-07-03 7:54 ` Chris Packham
2013-07-03 8:50 ` Chris Packham
2013-07-03 17:09 ` Junio C Hamano
2013-07-03 9:02 ` [RFC/PATCHv4] " Chris Packham
2013-07-03 17:17 ` Junio C Hamano
2013-07-01 16:48 ` [RFC/PATCHv2] submodule: add ability to configure " Junio C Hamano
2013-07-02 9:59 ` Chris Packham
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51D04F06.9000400@web.de \
--to=jens.lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=hvoigt@hvoigt.net \
--cc=iveqy@iveqy.com \
--cc=judge.packham@gmail.com \
--cc=stefan.naewe@atlas-elektronik.com \
/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.
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 NNTP newsgroup(s).