From: Johan Herland <johan@herland.net>
To: markus.heidelberg@web.de
Cc: gitster@pobox.com, git@vger.kernel.org,
Johannes.Schindelin@gmx.de, apenwarr@gmail.com,
peter.hutterer@who-t.net
Subject: Re: [PATCH 1/2] Rename submodule.<name>.rebase to submodule.<name>.update
Date: Wed, 03 Jun 2009 08:20:21 +0200 [thread overview]
Message-ID: <200906030820.21372.johan@herland.net> (raw)
In-Reply-To: <200906030615.45791.markus.heidelberg@web.de>
Hi,
Thanks for the feedback. Really appreciated!
On Wednesday 03 June 2009, Markus Heidelberg wrote:
> Johan Herland, 03.06.2009:
> > Therefore, while "submodule.<name>.rebase" are not yet in a stable git
> > release, future-proof it, by changing it from
> >
> > submodule.<name>.rebase = true/false
> >
> > to
> >
> > submodule.<name>.update = checkout/rebase
> >
> > where "checkout" specifies the default behaviour of "git submodule
> > update" (checking out the new commit to a detached HEAD), and "rebase"
> > specifies the --rebase behaviour (where the current local branch in the
> > submodule is rebase onto the new commit). Thus .update == checkout is
> > .rebase == false, and .update == rebase is equivalent to .rebase ==
> > false. Finally, leaving
> ^^^^^
> .rebase == true
Indeed. Thanks.
> > diff --git a/git-submodule.sh b/git-submodule.sh
> > @@ -400,9 +400,9 @@ cmd_update()
> > die "Unable to find current revision in submodule path '$path'"
> > fi
> >
> > - if test true = "$rebase"
> > + if ! test -z "$update"
>
> Isn't this simpler: if test -n "$update"
> OTOH I think I have heard something about portability, but I'm not sure.
Yes, "test -n" is simpler than "! test -z", but at an earlier occasion I was
told that "test -n" is not as portable as "test -z"...
> > @@ -420,16 +420,18 @@ cmd_update()
> > die "Unable to fetch in submodule path '$path'"
> > fi
> >
> > - if test true = "$rebase_module"
> > - then
> > - command="git-rebase"
> > + case "$update_module" in
> > + rebase)
> > + command="git rebase"
>
> I think it is common practice to use the dashed form in scripts and this
> patch shouldn't change it anyway.
I thought we were moving away from the dashed form altogether, both in
scripts and in examples. Junio, is there an "official" position?
> > action="rebase"
> > msg="rebased onto"
> > - else
> > - command="git-checkout $force -q"
> > + ;;
> > + *)
> > + command="git checkout $force -q"
>
> ditto
Thanks for your comments, I'll send an updated patch.
Have fun! :)
...Johan
--
Johan Herland, <johan@herland.net>
www.herland.net
next prev parent reply other threads:[~2009-06-03 6:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-01 1:24 What's cooking in git.git (May 2009, #04; Sun, 31) Junio C Hamano
2009-06-01 16:05 ` Brandon Casey
2009-06-02 22:59 ` [PATCH 0/2] "git submodule update" enhancements (Was: What's cooking in git.git (May 2009, #04; Sun, 31)) Johan Herland
2009-06-02 22:59 ` [PATCH 1/2] Rename submodule.<name>.rebase to submodule.<name>.update Johan Herland
2009-06-03 0:15 ` Peter Hutterer
2009-06-03 2:33 ` Junio C Hamano
2009-06-03 6:46 ` Johan Herland
2009-06-03 4:15 ` Markus Heidelberg
2009-06-03 6:20 ` Johan Herland [this message]
2009-06-03 6:27 ` [PATCH 1/2 v2] " Johan Herland
2009-06-02 22:59 ` [PATCH 2/2] git-submodule: add support for --merge Johan Herland
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=200906030820.21372.johan@herland.net \
--to=johan@herland.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=apenwarr@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=markus.heidelberg@web.de \
--cc=peter.hutterer@who-t.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.
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).