[PATCH] pull: pass --signoff/--no-signoff to "git merge"

2017-10-11 Thread W. Trevor King
stic pull is likely to succeed, suggesting it is easier to explain to Git newbies than a FETCH_HEAD merge. Signed-off-by: W. Trevor King --- Documentation/git-merge.txt | 8 Documentation/merge-options.txt | 10 ++ builtin/pull.c

Re: [PATCH] pull: pass --signoff/--no-signoff to "git merge"

2017-10-11 Thread W. Trevor King
On Thu, Oct 12, 2017 at 10:17:51AM +0900, Junio C Hamano wrote: > "W. Trevor King" writes: > > > Following 09c2cb87 (pull: pass --allow-unrelated-histories to "git > > merge", 2016-03-18) with the tests also drawing on 14d01b4f (merge: > > add a --sig

Re: [PATCH] pull: pass --signoff/--no-signoff to "git merge"

2017-10-11 Thread W. Trevor King
On Thu, Oct 12, 2017 at 02:42:30PM +0900, Junio C Hamano wrote: > "W. Trevor King" writes: > > On Thu, Oct 12, 2017 at 10:17:51AM +0900, Junio C Hamano wrote: > >> "W. Trevor King" writes: > >> > >> > Following 09c2cb87 (pull: pass --

[PATCH v2] pull: pass --signoff/--no-signoff to "git merge"

2017-10-12 Thread W. Trevor King
t as somewhat alphabetized and having an "add to the commit message" function like --log. Helped-by: Junio C Hamano Signed-off-by: W. Trevor King --- Changes since v1 [1]: * Dropped "Following" paragraph. Junio took issue with the phrasing [2], and the implementation in v2

[PATCH] Documentation/merge-options.txt: Add -S/--gpg-sign

2017-10-12 Thread W. Trevor King
Pull has supported these since ea230d8 (pull: add the --gpg-sign option, 2014-02-10). Insert in long-option alphabetical order following 7c85d274 (Documentation/merge-options.txt: order options in alphabetical groups, 2009-10-22). Signed-off-by: W. Trevor King --- This patch is based on maint

Re: [PATCH v2] pull: pass --signoff/--no-signoff to "git merge"

2017-10-12 Thread W. Trevor King
On Thu, Oct 12, 2017 at 01:46:39AM -0700, W. Trevor King wrote: > The order of options in merge-options.txt isn't clear to me, but > I've put --signoff between --log and --stat as somewhat alphabetized > and having an "add to the commit message" function like --log.

[PATCH v3] pull: pass --signoff/--no-signoff to "git merge"

2017-10-12 Thread W. Trevor King
The long-option bit didn't make it into the commit message, but it's under the fold in [1]. I've put --signoff between --log and --stat to preserve the alphabetical order. [1]: https://public-inbox.org/git/87iqe7zspn@jondo.cante.net/ Helped-by: Junio C Hamano Signed-of

Re: Possible regression in master? (submodules without a "master" branch)

2014-03-27 Thread W. Trevor King
On Thu, Mar 27, 2014 at 03:21:49PM +0100, Johan Herland wrote: > I just found a failure to checkout a project with submodules where > there is no explicit submodule branch configuration, and the > submodules happen to not have a "master" branch: The docs say [1]: A remote branch name for tracki

Re: Possible regression in master? (submodules without a "master" branch)

2014-03-27 Thread W. Trevor King
On Thu, Mar 27, 2014 at 08:52:08AM -0700, W. Trevor King wrote: > Working around that to default to the upstream submodule's HEAD is > possible (you can just use --branch HEAD) Actually, this is probably not a good idea. The initial submodule addition works: $ git submodule add -

Re: [git] Re: Possible regression in master? (submodules without a "master" branch)

2014-03-27 Thread W. Trevor King
On Thu, Mar 27, 2014 at 06:31:27PM +0100, Jens Lehmann wrote: > Am 27.03.2014 18:16, schrieb Junio C Hamano: > > Johan Herland writes: > > > >> I just found a failure to checkout a project with submodules where > >> there is no explicit submodule branch configuration, and the > >> submodules happ

submodule..branch vs. submodule..branch (was: Possible regression in master? (submodules without a "master" branch).

2014-03-27 Thread W. Trevor King
I'm breaking this off into a sub-thread, so it doesn't distract from the main issue. On Thu, Mar 27, 2014 at 12:39:03PM -0700, Junio C Hamano wrote: > There is this bit for "update" in git-submodule.txt: > > For updates that clone missing submodules, checkout-mode updates > will create submod

[PATCH] Documentation/submodule: Fix submodule. -> . typos

2014-03-27 Thread W. Trevor King
submodule..branch. Reported-by: Junio C Hamano Signed-off-by: W. Trevor King --- This patch is against master, because 23d25e48 hasn't landed in maint yet. If you want, I can split this into two patches, one against maint fixing the b9289227 typo and another against master fixing th

Re: [PATCH] Documentation/submodule: Fix submodule. -> . typos

2014-03-27 Thread W. Trevor King
On Fri, Mar 28, 2014 at 12:15:00AM +0100, Jens Lehmann wrote: > Am 27.03.2014 22:06, schrieb W. Trevor King: > > The transition from submodule..* to submodule..* happened > > in 73b0898d (Teach "git submodule add" the --name option, 2012-09-30), > > which lan

Re: Possible regression in master? (submodules without a "master" branch)

2014-03-27 Thread W. Trevor King
On Thu, Mar 27, 2014 at 11:55:21PM +0100, Jens Lehmann wrote: > Me thinks that when a superproject doesn't have 'branch' configured > and does set 'update' to something other than 'checkout' for a > submodule it should better make sure 'master' is a valid branch in > there. Everything else sounds l

Re: Re: Possible regression in master? (submodules without a "master" branch)

2014-03-27 Thread W. Trevor King
On Fri, Mar 28, 2014 at 12:21:23AM +0100, Johan Herland wrote: > On Thu, Mar 27, 2014 at 9:27 PM, Heiko Voigt wrote: > > On Thu, Mar 27, 2014 at 12:39:03PM -0700, Junio C Hamano wrote: > >> There is this bit for "update" in git-submodule.txt: > >> > >> For updates that clone missing submodules, c

[RFC] submodule: change submodule..branch default from master to HEAD

2014-03-27 Thread W. Trevor King
nd get along just fine without submodule..branch. Remote updates do need a remote branch, but HEAD works as well here as it did for the initial clone. Reported-by: Johan Herland Signed-off-by: W. Trevor King --- This still needs tests, but it gets through the following fine: rm -rf superproject s

Re: [RFC] submodule: change submodule..branch default from master to HEAD

2014-03-27 Thread W. Trevor King
On Thu, Mar 27, 2014 at 11:43:47PM -0400, Eric Sunshine wrote: > On Thu, Mar 27, 2014 at 11:36 PM, W. Trevor King wrote: > > submodule..branch:: > > A remote branch name for tracking updates in the upstream submodule. > > - If the option is not specified, i

Re: [RFC] submodule: change submodule..branch default from master to HEAD

2014-03-27 Thread W. Trevor King
On Thu, Mar 27, 2014 at 08:52:55PM -0700, W. Trevor King wrote: > On Thu, Mar 27, 2014 at 11:43:47PM -0400, Eric Sunshine wrote: > > On Thu, Mar 27, 2014 at 11:36 PM, W. Trevor King wrote: > > > submodule..branch:: > > > A remote branch name for track

Re: [PATCH] Documentation/submodule: Fix submodule. -> . typos

2014-03-28 Thread W. Trevor King
On Fri, Mar 28, 2014 at 05:55:18PM +0100, Jens Lehmann wrote: > I just noticed that the two patches Junio added to pu have a > reworded commit message I'm perfectly happy with. The revised wording works for me too. Cheers, Trevor -- This email may be signed or encrypted with GnuPG (http://www.g

Re: [RFC] submodule: change submodule..branch default from master to HEAD

2014-03-28 Thread W. Trevor King
On Fri, Mar 28, 2014 at 05:57:50PM +0100, Jens Lehmann wrote: > Am 28.03.2014 04:58, schrieb W. Trevor King: > > On Thu, Mar 27, 2014 at 08:52:55PM -0700, W. Trevor King wrote: > >> No the remote branch is in the upstream subproject. I suppose I meant > >> “the submodu

Re: [RFC] submodule: change submodule..branch default from master to HEAD

2014-03-31 Thread W. Trevor King
On Mon, Mar 31, 2014 at 09:35:07PM +0200, Jens Lehmann wrote: > Am 28.03.2014 04:36, schrieb W. Trevor King: > > The main drawback to this approach is that we're changing a default, > > but I agree with John's: > > > > On Fri, Mar 28, 2014 at 12:21:23AM +010

Re: [RFC] t7410: 210 tests for various 'git submodule update' scenarios

2014-04-16 Thread W. Trevor King
On Wed, Apr 16, 2014 at 02:54:48AM +0200, Johan Herland wrote: > This is a work-in-progress to flesh out (and promote discussion about) > the expected behaviors for all possible scenarios in which > 'git submodule update' might be run. This is lovely :). > +# - current state of submodule: > +#

Re: [RFC] t7410: 210 tests for various 'git submodule update' scenarios

2014-04-17 Thread W. Trevor King
allowed) [1], but I imagine there are folks who would resist ;). Maybe a deprecation period to help ease the transition? This is all assuming that I get more folks to buy into the tight-syncing ;). The end-goal of my tightly-bound approach is to remove 'submodule update' altogethe

Re: [git] [RFC/PATCH 2/4] Submodules: Add the lib-submodule-update.sh test library

2014-04-17 Thread W. Trevor King
On Tue, Mar 25, 2014 at 06:05:05PM +0100, Jens Lehmann wrote: > *) When a submodule is replaced with a tracked file of the same name >the submodule work tree including any local modifications (and >even the whole history if it uses a .git directory instead of a >gitfile!) is simply remo

Re: [git] What's cooking in git.git (Apr 2014, #03; Fri, 11)

2014-04-17 Thread W. Trevor King
On Fri, Apr 11, 2014 at 03:22:58PM -0700, Junio C Hamano wrote: > * jl/submodule-recursive-checkout (2013-12-26) 5 commits > - Teach checkout to recursively checkout submodules > - submodule: teach unpack_trees() to update submodules > - submodule: teach unpack_trees() to repopulate submodules >

Re: [git] [RFC/PATCH 2/4] Submodules: Add the lib-submodule-update.sh test library

2014-04-17 Thread W. Trevor King
On Thu, Apr 17, 2014 at 11:08:06PM +0200, Jens Lehmann wrote: > Am 17.04.2014 18:41, schrieb W. Trevor King: > > On Tue, Mar 25, 2014 at 06:05:05PM +0100, Jens Lehmann wrote: > >> *) When a submodule is replaced with a tracked file of the same name > >>the submod

[PATCH] pre-push.sample: Write error message to stderr

2014-09-11 Thread W. Trevor King
githooks(5) suggests: Information about why the push is rejected may be sent to the user by writing to standard error. So follow that advice in the sample. Signed-off-by: W. Trevor King --- templates/hooks--pre-push.sample | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] docs/git-mailinfo: Mention the manual separator (---)

2014-09-24 Thread W. Trevor King
And explain how it interacts with the scissors setting. Signed-off-by: W. Trevor King --- The three-dash limit comes from f0658cf2 (restrict the patch filtering, 2007-03-12), but I couldn't find any associated documentation. Since the effect is so similar to the scissors line, I thought

Re: [git] What's cooking in git.git (Sep 2014, #09; Tue, 30)

2014-09-30 Thread W. Trevor King
On Tue, Sep 30, 2014 at 01:23:18PM -0700, Junio C Hamano wrote: > Here are the topics that have been cooking. It looks like my boring git-mailinfo doc patch [1] fell through the cracks here ;). Or maybe it's just cooking a bit longer before getting queued? Cheers, Trevor [1]: Gmane: http://arti

Re: [PATCH] docs/git-mailinfo: Mention the manual separator (---)

2014-09-30 Thread W. Trevor King
On Tue, Sep 30, 2014 at 02:12:58PM -0700, Junio C Hamano wrote: > If we are extending the documentation on "---", … Ah, I see that the --- are actually mentioned already in the DISCUSSION section of git-am(1) since 2499857b (git-am documentation: describe what is taken from where, 2007-03-24). I

[PATCH] t1304: Set LOGNAME even if USER is unset or null

2014-10-17 Thread W. Trevor King
x27;t expect compatibility issues. [1]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/id.html Signed-off-by: W. Trevor King --- The patch is based on the current maint branch. Previous LOGNAME discussion: * Michael Gruber on 2011-05-06 suggesting a discussing a whoami fallback [1] (but

Re: [PATCH] t1304: Set LOGNAME even if USER is unset or null

2014-10-20 Thread W. Trevor King
On Sun, Oct 19, 2014 at 03:49:36PM -0700, Junio C Hamano wrote: > I'll queue this as-is, but it makes me wonder if we want to do this > without if/then/fi, e.g. > > : ${LOGNAME:=${USER:-$(id -u -n)} I'm fine with that too. > Spelling everything out with if/then/fi is obviously at the other

Re: [git] Joining historical repository using grafts or replace

2014-10-30 Thread W. Trevor King
On Thu, Oct 30, 2014 at 06:39:56PM +0300, Dmitry Oksenchuk wrote: > We're in the middle of conversion of a large CVS repository (20 > years, 70K commits, 1K branches, 10K tags) to Git and considering > two separate Git repositories: "historical" with CVS history and > "working" created without hist

Re: [PATCH] tag: add -i and --introduced modifier for --contains

2014-04-21 Thread W. Trevor King
On Mon, Apr 21, 2014 at 05:38:34PM -0700, Luis R. Rodriguez wrote: > [0] mcgrof@ergon ~/linux (git::master)$ git log c5905afb..v3.5| grep > ^commit | wc -l > 24878 > [1] mcgrof@ergon ~/linux (git::master)$ git log c5905afb..v3.4| grep > ^commit | wc -l > 13106 > [2] mcgrof@ergon ~/linux (git::maste

Re: [git] Re: Pull is Evil

2014-05-01 Thread W. Trevor King
On Thu, May 01, 2014 at 11:20:44AM -0400, Marc Branchaud wrote: > On 14-05-01 05:46 AM, brian m. carlson wrote: > > git checkout maintenance-branch > > # Update our maintenance branch to the latest from the main repo. > > git pull --ff-only > > git pull --no-ff developer-remote topic-branch

Re: [git] Re: Pull is Evil

2014-05-01 Thread W. Trevor King
On Thu, May 01, 2014 at 02:16:50PM -0500, Felipe Contreras wrote: > The only problem would be when it's not desirable, however, that's a > problem of the user's ignorance, and the failure of the project's > policity to communicate clearly to him that he should be running > `git merge --no-ff`. Ther

Re: [git] Re: Pull is Evil

2014-05-01 Thread W. Trevor King
On Thu, May 01, 2014 at 02:04:33PM -0400, Marc Branchaud wrote: > On 14-05-01 01:56 PM, W. Trevor King wrote: > > On Thu, May 01, 2014 at 11:20:44AM -0400, Marc Branchaud wrote: > >> On 14-05-01 05:46 AM, brian m. carlson wrote: > >>> git checkout maintenan

Re: [git] Re: Pull is Evil

2014-05-01 Thread W. Trevor King
On Thu, May 01, 2014 at 12:48:46PM -0700, W. Trevor King wrote: > My interest in all of the proposed git-pull-training-wheel patches is > that they give users a way to set a finger-breaking configuration that > makes pull a no-op (or slows it down, like 'rm -i …'). Then folks

Re: Pull is Evil

2014-05-01 Thread W. Trevor King
On Thu, May 01, 2014 at 06:34:06PM -0500, Felipe Contreras wrote: > Nobody ever complained about somebody doing a fast-forward by mistake. Unless they fast-forward merged a feature branch into master, but the project prefers explicitly-merged feature branches with a cover-letter explaination in th

Re: [git] Re: Pull is Evil

2014-05-01 Thread W. Trevor King
On Thu, May 01, 2014 at 06:25:16PM -0500, Felipe Contreras wrote: > W. Trevor King wrote: > > On Thu, May 01, 2014 at 12:48:46PM -0700, W. Trevor King wrote: > > > My interest in all of the proposed git-pull-training-wheel patches is > > > that they give users a w

Re: Pull is Evil

2014-05-01 Thread W. Trevor King
On Thu, May 01, 2014 at 07:37:04PM -0500, Felipe Contreras wrote: > W. Trevor King wrote: > > On Thu, May 01, 2014 at 06:25:16PM -0500, Felipe Contreras wrote: > > > W. Trevor King wrote: > > > > Fast-forward $current_branch by $count commits to $repository > >

Re: [PATCH v6 1/7] pull: rename pull.rebase to pull.mode

2014-05-02 Thread W. Trevor King
On Thu, May 01, 2014 at 07:00:02PM -0500, Felipe Contreras wrote: > Also 'branch..rebase' to 'branch..pullmode'. Perhaps this has already been hashed out in a previous version of this series, but we may want to use pull.update and branch..update to match the existing submodule..update. Both setti

Re: Pull is Evil

2014-05-02 Thread W. Trevor King
On Thu, May 01, 2014 at 08:14:29PM -0500, Felipe Contreras wrote: > W. Trevor King wrote: > > My proposed --prompt behavior is for folks who think “I often run > > this command without thinking it through all the way. I'm also > > not used to reading Git's output an

Re: [PATCH v6 5/7] pull: add merge-ff-only option

2014-05-02 Thread W. Trevor King
On Thu, May 01, 2014 at 07:00:06PM -0500, Felipe Contreras wrote: > It is very typical for Git newcomers to inadvertently create merges and > worst; inadvertently pushing them. This is one of the reasons many > experienced users prefer to avoid 'git pull', and recommend newcomers to > avoid it as w

Re: Pull is Evil

2014-05-02 Thread W. Trevor King
On Fri, May 02, 2014 at 01:55:36PM -0500, Felipe Contreras wrote: > W. Trevor King wrote: > > On Thu, May 01, 2014 at 08:14:29PM -0500, Felipe Contreras wrote: > > > W. Trevor King wrote: > > > > My proposed --prompt behavior is for folks who think “I often ru

Re: Pull is Evil

2014-05-02 Thread W. Trevor King
On Fri, May 02, 2014 at 02:13:25PM -0500, Felipe Contreras wrote: > W. Trevor King wrote [1]: > > On Fri, May 02, 2014 at 01:55:36PM -0500, Felipe Contreras wrote: > > > W. Trevor King wrote: > > > > On Thu, May 01, 2014 at 08:14:29PM -0500, Felipe Contreras wrote:

Re: Pull is Evil

2014-05-02 Thread W. Trevor King
On Fri, May 02, 2014 at 03:34:34PM -0500, Felipe Contreras wrote: > W. Trevor King wrote: > > On Fri, May 02, 2014 at 02:13:25PM -0500, Felipe Contreras wrote: > > > It would matter almost exactly zero. > > > > Some folks have explicit merge policies, and decidin

pull.prompt or other way to slow/disable 'git pull' (was: Pull is Evil)

2014-05-02 Thread W. Trevor King
On Fri, May 02, 2014 at 04:18:57PM -0500, Felipe Contreras wrote: > W. Trevor King wrote: > > On Fri, May 02, 2014 at 03:34:34PM -0500, Felipe Contreras wrote: > > > W. Trevor King wrote: > > > > On Fri, May 02, 2014 at 02:13:25PM -0500, Felipe Contreras wrote: &g

Re: pull.prompt or other way to slow/disable 'git pull'

2014-05-02 Thread W. Trevor King
On Fri, May 02, 2014 at 05:20:11PM -0500, Felipe Contreras wrote: > W. Trevor King wrote: > > > > The 'git pull' (with 'none' mode) explainer just helps retrain folks > > > > that are already using the current 'git pull' incorrec

Re: pull.prompt or other way to slow/disable 'git pull'

2014-05-04 Thread W. Trevor King
the topic at > hand. I'm trying to motivate a way to slow/disable 'git pull', which I see as orthogonal to your push to change the default configuration. I thought describing my workflow in more detail would help clarify why… > W. Trevor King wrote: > > On Fri, May 02, 20

Re: Conforming to pep8

2014-05-09 Thread W. Trevor King
On Fri, May 09, 2014 at 02:44:02AM -0500, William Giokas wrote: > Maybe a time to use something like:: > > from mercurial import foo \ > bar \ > baz \ > ... > > Would make that import into quite a few lines, but would help

[PATCH] Documentation: mention config sources for @{upstream}

2014-05-13 Thread W. Trevor King
pushremote. Signed-off-by: W. Trevor King --- Documentation/revisions.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt index 5a286d0..0796118 100644 --- a/Documentation/revisions.txt +++ b/Documentation/revisions.tx

Re: Submodules with feature branches

2014-06-05 Thread W. Trevor King
On Thu, Jun 05, 2014 at 09:03:25AM -0500, Robert Dailey wrote: > When I work on a feature, I normally create a feature branch. If I > happen to make changes to the submodule that only work with the > changes introduced in my feature branch, that seems to complicate > things. For the purposes of the

Re: Submodules with feature branches

2014-06-05 Thread W. Trevor King
On Thu, Jun 05, 2014 at 10:57:17AM -0500, Robert Dailey wrote: > I was planning on creating a submodule for our third party libs and > store them extracted in there. 3rd party libraries sound loosely-coupled to me ;). In one of my more mature projects I did a similar thing, and just used relative

Re: [git] [PATCH 2/5] implement submodule config cache for lookup of submodule names

2014-06-05 Thread W. Trevor King
On Thu, Jun 05, 2014 at 08:07:50AM +0200, Heiko Voigt wrote: > +The caller can look up information about submodules by using the > +`submodule_from_path()` or `submodule_from_name()` functions. That's for an already-known submodule. Do we need a way to list submodules (e.g. for 'submodule foreach

Re: [git] Re: [RFC PATCH] clone: add clone.recursesubmodules config option

2014-06-05 Thread W. Trevor King
On Thu, Jun 05, 2014 at 11:18:28AM -0700, Junio C Hamano wrote: > Jens Lehmann writes: > > We had two settings in mind,... > > So what if clone would just do an "git submodule init" for now when > > "submodule.autoinit" is set but "submodule.autoupdate" isn't [?] > > ... and a single "submodule.au

Re: Submodules with feature branches

2014-06-05 Thread W. Trevor King
On Thu, Jun 05, 2014 at 01:31:39PM -0500, Robert Dailey wrote: > On Thu, Jun 5, 2014 at 11:23 AM, W. Trevor King wrote: > > 3rd party libraries sound loosely-coupled to me ;). In one of my more > > mature projects I did a similar thing, and just used relative URLs [1] > >

Re: Submodules with feature branches

2014-06-05 Thread W. Trevor King
On Thu, Jun 05, 2014 at 12:00:33PM -0700, W. Trevor King wrote: > On Thu, Jun 05, 2014 at 01:31:39PM -0500, Robert Dailey wrote: > > Instead of just creating my branch and starting to make commits, I > > now have to setup my submodule branch first. Also pull requests > > won&

Re: [git] Re: [RFC PATCH] clone: add clone.recursesubmodules config option

2014-06-09 Thread W. Trevor King
On Mon, Jun 09, 2014 at 03:17:07PM +0200, Jens Lehmann wrote: > And by the way: wouldn't it make more sense to tell the user /what/ > we do automatically? So maybe 'submodule.autoupdate' is a better > name for the new switch? Or autocheckout? No need to preserve submodule-specific jargon when we

Re: [git] Re: Relative submodule URLs, and forks that haven't forked the submodule

2014-06-12 Thread W. Trevor King
On Thu, Jun 12, 2014 at 06:05:10PM +0200, Charles Brossollet wrote: > The two problems I'm pointing are: > > 1. After checkout of a branch that tracks /user/main repo, call git >init submodule motors. Git registers it in .git/config with URL >/user/sub, while it should be /central/sub acco

Re: [git] Re: git-submodule.sh respects submodule.$name.update in .git/config but not .gitmodules

2013-12-11 Thread W. Trevor King
On Wed, Dec 11, 2013 at 11:26:17PM +0100, Jens Lehmann wrote: > Am 10.12.2013 00:40, schrieb Junio C Hamano: > > Heiko Voigt writes: > >> This notion has changed in a way that only the url (by that the > >> name) should be copied on init. The default for everything else > >> should come from .gitm

Re: git-submodule.sh respects submodule.$name.update in .git/config but not .gitmodules

2013-12-12 Thread W. Trevor King
On Thu, Dec 12, 2013 at 07:57:51PM +0100, Jens Lehmann wrote: > Am 12.12.2013 02:16, schrieb Junio C Hamano: > > I think the solution we want is to copy only minimum to the config > > (and that "minimum" may turn out to be "nothing"), and to default > > keys that are only absolutely safe to .gitmod

[PATCH] submodule: Respect reqested branch on all clones

2014-01-03 Thread W. Trevor King
From: "W. Trevor King" The previous code only checked out the requested branch in cmd_add. This commit moves the branch-checkout logic into module_clone, where it can be shared by cmd_add and cmd_update. I also update the initial checkout command to use 'rebase' to pre

[PATCH] Documentation/gitmodules: Only 'update' and 'url' are required

2014-01-03 Thread W. Trevor King
From: "W. Trevor King" Before this commit, all the settings fell under the initial "Each submodule section also contains the following required keys:". The example shows sections with just 'update' and 'url' entries, but we should still make the requir

Re: [PATCH] submodule: Respect reqested branch on all clones

2014-01-04 Thread W. Trevor King
On Sat, Jan 04, 2014 at 11:09:15PM +0100, Heiko Voigt wrote: > On Fri, Jan 03, 2014 at 10:06:11AM -0800, W. Trevor King wrote: > > @@ -306,7 +307,14 @@ module_clone() > > echo "gitdir: $rel/$a" >"$sm_path/.git" > > >

Re: [PATCH] Documentation/gitmodules: Only 'update' and 'url' are required

2014-01-04 Thread W. Trevor King
On Sat, Jan 04, 2014 at 11:17:54PM +0100, Heiko Voigt wrote: > On Fri, Jan 03, 2014 at 10:31:22AM -0800, W. Trevor King wrote: > > Before this commit, all the settings fell under the initial "Each > > submodule section also contains the following required keys:". The &

Re: [PATCH] submodule: Respect reqested branch on all clones

2014-01-04 Thread W. Trevor King
On Sun, Jan 05, 2014 at 01:39:22AM +0100, Heiko Voigt wrote: > On Sat, Jan 04, 2014 at 02:54:01PM -0800, W. Trevor King wrote: > > On Sat, Jan 04, 2014 at 11:09:15PM +0100, Heiko Voigt wrote: > > > On Fri, Jan 03, 2014 at 10:06:11AM -0800, W. Trevor King wrote: > > > &

[RFC v2] submodule: Respect requested branch on all clones

2014-01-05 Thread W. Trevor King
From: "W. Trevor King" The previous code only checked out the requested branch in cmd_add. This commit moves the branch-checkout logic into module_clone, where it can be shared by cmd_add and cmd_update. I also update the initial checkout command to use 'rebase' to pre

Re: [PATCH 1/2] git-submodule.sh: Support 'checkout' as a valid update command

2014-01-05 Thread W. Trevor King
On Sun, Jan 05, 2014 at 03:50:48AM +0100, Francesco Pretto wrote: > + case "$update_module" in > + '') > + ;; # Unset update mode > + checkout | rebase | merge | none) > + ;; # Known

Re: [RFC v2] submodule: Respect requested branch on all clones

2014-01-05 Thread W. Trevor King
On Sun, Jan 05, 2014 at 08:48:50PM +0100, Heiko Voigt wrote: > On Sun, Jan 05, 2014 at 08:17:00AM -0800, W. Trevor King wrote: > > It's not clear if this refers to the initial-clone update, future > > post-clone updates, or both. Ideally, the behavior should be the > >

Re: [RFC v2] submodule: Respect requested branch on all clones

2014-01-05 Thread W. Trevor King
On Sun, Jan 05, 2014 at 10:27:19PM +0100, Francesco Pretto wrote: > 2014/1/5 W. Trevor King: > > Adding a check to only checkout submodule..branch if > > submodule..update was 'rebase', 'merge', or 'none' would be > > easy, but I don't thin

Re: [RFC v2] submodule: Respect requested branch on all clones

2014-01-05 Thread W. Trevor King
On Sun, Jan 05, 2014 at 01:47:52PM -0800, W. Trevor King wrote: > On Sun, Jan 05, 2014 at 10:27:19PM +0100, Francesco Pretto wrote: > > 2014/1/5 W. Trevor King: > > Also it covers: > > - an "autoremote" behavior when the user wants an attached HEAD: > > with

Re: Re: [RFC v2] submodule: Respect requested branch on all clones

2014-01-05 Thread W. Trevor King
On Sun, Jan 05, 2014 at 11:57:33PM +0100, Heiko Voigt wrote: > On Sun, Jan 05, 2014 at 01:24:58PM -0800, W. Trevor King wrote: > > If submodule..branch is set, it *always* creates a new local > > branch of that name pointing to the exact sha1. If > > submodule..branch is not

Re: [RFC v2] submodule: Respect requested branch on all clones

2014-01-05 Thread W. Trevor King
On Sun, Jan 05, 2014 at 03:39:43PM -0800, W. Trevor King wrote: > On Sun, Jan 05, 2014 at 11:57:33PM +0100, Heiko Voigt wrote: > > The reason why one would set a branch option here is to share the > > superproject branch with colleagues. He can make sure they can > > always f

Re: [RFC v2] submodule: Respect requested branch on all clones

2014-01-05 Thread W. Trevor King
On Sun, Jan 05, 2014 at 04:33:14PM -0800, W. Trevor King wrote: > The only people who would need *automatic* rebase recovery would be > superproject devs update-cloning the subproject. That's a small > enough cross-section that I don't think it deserves the ambiguity of >

Re: [PATCH 2/2] Introduce git submodule attached update

2014-01-06 Thread W. Trevor King
On Mon, Jan 06, 2014 at 03:18:05PM +0100, Heiko Voigt wrote: > If you simply want to always checkout the development tip of some > project you could do something like this: > > git submodule foreach 'git fetch && git checkout origin/master' Or (respecting submodule..branch): $ git submod

Re: [RFC v2] submodule: Respect requested branch on all clones

2014-01-06 Thread W. Trevor King
On Mon, Jan 06, 2014 at 04:47:39PM +0100, Heiko Voigt wrote: > On Sun, Jan 05, 2014 at 03:39:43PM -0800, W. Trevor King wrote: > > On Sun, Jan 05, 2014 at 11:57:33PM +0100, Heiko Voigt wrote: > > > On Sun, Jan 05, 2014 at 01:24:58PM -0800, W. Trevor King wrote: > > > &

Re: [RFC v2] submodule: Respect requested branch on all clones

2014-01-06 Thread W. Trevor King
On Mon, Jan 06, 2014 at 08:56:22AM -0800, Junio C Hamano wrote: > Heiko Voigt writes: > > Yes, why would you do a git pull in a submodule? Don't you want to do > > something like > > > > git checkout -t -b dev/my-topic origin/master > > > > to start your development? > > As long as origin/mas

Re: [PATCH 2/2] Introduce git submodule attached update

2014-01-06 Thread W. Trevor King
On Mon, Jan 06, 2014 at 06:47:58PM +0100, Francesco Pretto wrote: > I'm really sorry, I thought this was already clear from the first > patch iteration. I will go more in depth: For me anyway, this extra detail is very helpful. Thanks :). > Maintainer of "project1" also prepares a branch > "proj

Re: [RFC v2] submodule: Respect requested branch on all clones

2014-01-07 Thread W. Trevor King
ugh. It's used to shift the local branch reference from from the (arbitrary) cloned remote branch tip to the explicit submodule $sha1. Otherwise the default method for that operation is a HEAD-detaching 'checkout'. I tried to explain it here [3]. > "W. Trevor King" w

Re: [PATCH 2/2] Introduce git submodule attached update

2014-01-07 Thread W. Trevor King
On Mon, Jan 06, 2014 at 08:21:24PM +0100, David Engster wrote: > +---+ > | master | <-- > +---++---+| Merges to/from master > | CEDET | | done only by CEDET developers > +---+ | > +---

Re: [RFC v2] submodule: Respect requested branch on all clones

2014-01-07 Thread W. Trevor King
On Tue, Jan 07, 2014 at 08:19:49PM +0100, Francesco Pretto wrote: > 2014/1/7 Junio C Hamano : > > It is not immediately obvious to me why anybody who specifies the > > submodule.*.branch variable to say "I want _that_ branch" not to > > want to be on that branch but in a detached state, so from tha

Re: [RFC v2] submodule: Respect requested branch on all clones

2014-01-07 Thread W. Trevor King
On Tue, Jan 07, 2014 at 11:21:28AM -0800, Junio C Hamano wrote: > "W. Trevor King" writes: > > On Tue, Jan 07, 2014 at 10:15:25AM -0800, Junio C Hamano wrote: > >> Having writing all the above and then looking at the patch again, it > >> is not immediatel

Re: [RFC v2] submodule: Respect requested branch on all clones

2014-01-07 Thread W. Trevor King
On Tue, Jan 07, 2014 at 09:09:19PM +0100, Francesco Pretto wrote: > 2014/1/7 W. Trevor King : > >> Trevor, maybe it was not clear. But I wanted to say: > >> > >> " I fully support *Trevor's* patch..." :) > > > > Which I appreciate ;). I st

Preferred local submodule branches (was: Introduce git submodule attached update)

2014-01-07 Thread W. Trevor King
On Tue, Jan 07, 2014 at 10:51:34PM +0100, Francesco Pretto wrote: > 2014/1/7 W. Trevor King : > > > > I'd be happy to hear ideas about superproject-branch-specific local > > overrides to a hypothetical submodule..local-branch, in the > > event that a develop

Re: [PATCH 2/2] Introduce git submodule attached update

2014-01-07 Thread W. Trevor King
On Tue, Jan 07, 2014 at 11:51:28PM +0100, Heiko Voigt wrote: > On Mon, Jan 06, 2014 at 08:10:04PM -0800, W. Trevor King wrote: > > Here's an attempted summary of our desires, and my ideal route > > forward: > > > > * Preferred local submodule branches for each

Re: Preferred local submodule branches (was: Introduce git submodule attached update)

2014-01-07 Thread W. Trevor King
On Tue, Jan 07, 2014 at 02:36:25PM -0800, W. Trevor King wrote: > There are three branches that submodule folks usually care about: > > 1. The linked $sha1 in the superproject (set explicitly for every >superproject commit, and thus for every superproject branch). > 2. The

Re: Re: [RFC v2] submodule: Respect requested branch on all clones

2014-01-07 Thread W. Trevor King
On Wed, Jan 08, 2014 at 01:17:49AM +0100, Francesco Pretto wrote: > # Attach the submodule HEAD to . > # Also set ".git/config" 'submodule..branch' to > $ git submodule head -b --attach I prefer submodule..local-branch for the submodule's local branch name. I also prefer 'checkout' to 'head',

Re: Preferred local submodule branches

2014-01-07 Thread W. Trevor King
On Wed, Jan 08, 2014 at 03:12:44AM +0100, Francesco Pretto wrote: > 2014/1/8 W. Trevor King : > > Note that I've moved away from “submodule..branch > > set means attached” towards “we should set per-superproject-branch > > submodule..local-branch explicitly” [1]. > &

Re: Preferred local submodule branches

2014-01-07 Thread W. Trevor King
On Tue, Jan 07, 2014 at 07:47:08PM -0800, W. Trevor King wrote: > #git checkout --recurse-submodules master > ( # 'git checkout --recurse-submodules' doesn't exist yet [2,3]. > # Even with that patch, 'git checkout' won't respect > # su

Re: [RFC v2] submodule: Respect requested branch on all clones

2014-01-08 Thread W. Trevor King
On Thu, Jan 09, 2014 at 12:07:56AM +0100, Francesco Pretto wrote: > After long thoughts, I think your idea about a local branch with a > differently named remote branch looks interesting but I would be > extremely cautious to add a ' submodule..local-branch' now. Do > we have a similar mechanism on

Re: [RFC v2] submodule: Respect requested branch on all clones

2014-01-08 Thread W. Trevor King
On Thu, Jan 09, 2014 at 12:54:54AM +0100, Francesco Pretto wrote: > 2) Having 'git checkout', 'git checkout --recurse-submodules' and > finally 'git submodule checkout' is too much for me. Agreed. Since 'git checkout' already exists and 'git checkout --recurse-submodules' is close [1,2], I think

Re: [RFC v2] submodule: Respect requested branch on all clones

2014-01-08 Thread W. Trevor King
On Thu, Jan 09, 2014 at 02:09:37AM +0100, Francesco Pretto wrote: > 2014/1/9 W. Trevor King : > > [branch "my-feature"] > > remote = origin > > merge = refs/heads/my-feature > > [submodule "submod"] > >

[RFC v3 0/4] Preferred local submodule branches

2014-01-08 Thread W. Trevor King
From: "W. Trevor King" In another branch of the submodule thread Francesco kicked off, I mentioned that we could store the preferred local submodule branch on a per-superbranch level if we used the .git/modules//config for local overrides [1]. Here's a patch series that greatl

[RFC v3 3/4] submodule: Teach 'add' about a configurable local-branch

2014-01-08 Thread W. Trevor King
From: "W. Trevor King" This patch teaches 'git submodule add' to look for a preferred local-branch, and to checkout that branch after the initial clone. The local branch will always point at the commit checked out by the internal 'git clone' operation. For examp

[RFC v3 1/4] submodule: Add helpers for configurable local branches

2014-01-08 Thread W. Trevor King
From: "W. Trevor King" There are three branches that submodule folks usually care about: 1. The linked $sha1 in the superproject (set explicitly for every superproject commit, and thus for every superproject branch). 2. The remote-tracking submodule..branch that tracks a

[RFC v3 4/4] submodule: Add a new 'checkout' command

2014-01-08 Thread W. Trevor King
From: "W. Trevor King" This borrows a good deal of the cmd_foreach logic to iterate through submodules (potentially recursively), checking out the preferred local branch for each submodule (as appropriate for the current superproject branch). Ideally, this logic would be bundle

[RFC v3 2/4] submodule: Teach 'update' to preserve local branches

2014-01-08 Thread W. Trevor King
From: "W. Trevor King" There's no sense in setting up a local branch if we're just going to go back to a detached HEAD with every checkout-mode update. This commit replaces the checkout with a reset, updating whatever the locally checked out branch (or detached HEAD) happens

Re: [RFC v2] submodule: Respect requested branch on all clones

2014-01-09 Thread W. Trevor King
On Thu, Jan 09, 2014 at 09:31:13AM +0100, Jens Lehmann wrote: > Am 09.01.2014 02:09, schrieb Francesco Pretto: > > 2014/1/9 W. Trevor King : > >> > >> However, submodule..local-branch has nothing to do with remote > >> repositories or tracking branches. > &

Re: [RFC v2] submodule: Respect requested branch on all clones

2014-01-09 Thread W. Trevor King
On Thu, Jan 09, 2014 at 08:23:07PM +0100, Jens Lehmann wrote: > Am 09.01.2014 18:32, schrieb W. Trevor King: > > However, the local-branch setting needs to be both > > per-submodule and per-superproject-branch, so .git/config doesn't work > > very well. I think it'

  1   2   3   4   >