From: Carl Worth Subject: Re: [RFC] git-remote Date: Mon, 08 Jan 2007 14:52:52 -0800 Message-ID: <87lkkdyvuj.wl%cworth@cworth.org> References: <7vfyarokk7.fsf@assigned-by-dhcp.cox.net> <8aa486160701050459p4da586cdk2c2ddaabda5b4ca7@mail.gmail.com> <8aa486160701051153h52a93c16k2b190f58e652cb2e@mail.gmail.com> <87ac0xgp12.wl%cworth@cworth.org> <7vvejkap9j.fsf@assigned-by-dhcp.cox.net> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Mon_Jan__8_14:52:45_2007-1"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Cc: git@vger.kernel.org X-From: git-owner@vger.kernel.org Mon Jan 08 23:55:19 2007 Return-path: Envelope-to: gcvg-git@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1H43OW-0004Jl-3O for gcvg-git@gmane.org; Mon, 08 Jan 2007 23:55:08 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030190AbXAHWys (ORCPT ); Mon, 8 Jan 2007 17:54:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030443AbXAHWys (ORCPT ); Mon, 8 Jan 2007 17:54:48 -0500 Received: from mx1.redhat.com ([66.187.233.31]:49344 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030190AbXAHWyr (ORCPT ); Mon, 8 Jan 2007 17:54:47 -0500 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l08MsjOh007801; Mon, 8 Jan 2007 17:54:45 -0500 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l08MsioS012339; Mon, 8 Jan 2007 17:54:44 -0500 Received: from raht.cworth.org (sebastian-int.corp.redhat.com [172.16.52.221]) by mail.boston.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l08MshMX018918; Mon, 8 Jan 2007 17:54:44 -0500 To: Junio C Hamano In-Reply-To: <7vvejkap9j.fsf@assigned-by-dhcp.cox.net> User-Agent: Wanderlust/2.14.0 (Africa) Emacs/21.4 Mule/5.0 (SAKAKI) Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: --pgp-sign-Multipart_Mon_Jan__8_14:52:45_2007-1 Content-Type: text/plain; charset=US-ASCII On Fri, 05 Jan 2007 17:59:52 -0800, Junio C Hamano wrote: > > git init-db > > git remote add $url > > git pull $name > > you could say "git remote add $name $url" here, having computed > $name already. Though I guess clone would actually be doing the equivalent of: git remote add origin $url correct? So that undercuts my argument a bit. If clone is always just using "origin" for the remote that it creates then it's harder to justify making "remote add" use part of the URL for the name. It would seem convenient to be able to do: git remote add git://hosting.org/$project/$maintainer1 git remote add git://hosting.org/$project/$maintainer2 but I guess that wouldn't help much if the project were organized such that what's need is actually: git remote add $maintainer1 git://hosting.org/~$maintainer1/$project git remote add $maintainer2 git://hosting.org/~$maintainer2/$project But the other piece is that clone does one thing more than setting up a remote. It also creates a local branch "master" that is configured with "remote" and "merge" entries. There's still no simple command that sets this up that could be added to make the above list of steps for a "manual clone" complete is there? And by "simple" I mean something other than: git repo-config branch.master.remote origin git repo-config branch.master.merge refs/heads/master It seems we're still missing a simple command that would create this commonly desired arrangement. The only real input here is a local branch name and a corresponding remote-tracking branch, (from which the values for remote and merge could be determined). We've mentioned before that "git checkout newbranch remote-tracking-branch" already accepts those two pieces of information, so maybe we just want an option there to create this extra configuration for further tracking/merging. -Carl PS. It's probably too late, since "remote" already appears in .git/remotes and in branch.*.remote entries in .git/config, but I do have to say that "git remote add" looks really odd. The most natural way to parse that is with "remote" as an adjective---so perhaps interpreting this as a variant of "git add" that does something on the remote side? Previously, when I've wanted the functionality of what is now "remote add" I've imagined it as a variant of "git clone" that would clone "into" my existing repository (with a new "remote" name) rather than creating a new repository. Or maybe this could be some new verb, (I'd like something like "git track url [name]" perhaps. Though using a verb would make it harder to add other actions beyond creation. Anyway, there's some naming feedback, but like I said, it might be too late to be used at all. --pgp-sign-Multipart_Mon_Jan__8_14:52:45_2007-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQBFostE6JDdNq8qSWgRAvjzAJ9cK9CXAnu8GH8PClDhvY8cgbbJRACcD40b LfjW6H3CD4JRlYuaW3PlAlY= =XmB5 -----END PGP SIGNATURE----- --pgp-sign-Multipart_Mon_Jan__8_14:52:45_2007-1--