git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Martin Langhoff <martin@catalyst.net.nz>
Cc: git@vger.kernel.org, junkio@cox.net
Subject: Re: [RFC] git-clone: add --track <headname> support
Date: Thu, 12 Apr 2007 03:23:15 -0700	[thread overview]
Message-ID: <7vk5whki24.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <1176372539871-git-send-email-martin@catalyst.net.nz> (Martin Langhoff's message of "Thu, 12 Apr 2007 22:08:59 +1200")

Martin Langhoff <martin@catalyst.net.nz> writes:

> Add support for a simplified workflow where users
> want to clone and start working on a head that is
> different from the HEAD of the repository.
>
> Calling
>
>    git-clone --track maint <repo>
>
> Is equivalent to
>
>    git-clone <repo> mydir
>    cd mydir
>    git-checkout --track -b maint origin/maint
>
> --
>
> Not sure if Junio wants this, but if I am going to migrate
> away from cogito, I'd like these common operations to be
> dead simple. 

I am not interested in moving people away from cogito ;-).

With the talk about making more things built-in, I think the
changes to clone and fetch should be done by first rewriting
git-clone as a very thin shell wrapper that essentially does:

	figure out the directory name to use
        mkdir that directory and cd into it
        run git init with appropriate options
        run git remote add with appropriate options
        run git fetch with appropriate options
        run git checkout with appropriate options (unless -n)

Also you might want to check "branch.autosetupmerge" config.  It
seems to be described in git-branch manual page without being
listed in Documentation/config.txt, which is a bad that happend
some time ago X-<.

It seems that today has been a day to discover many bads that
happened some time ago for me X-<.  I should quit and call it a
day now...

  reply	other threads:[~2007-04-12 10:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-12 10:08 [RFC] git-clone: add --track <headname> support Martin Langhoff
2007-04-12 10:23 ` Junio C Hamano [this message]
2007-04-12 21:32   ` Martin Langhoff
2007-04-12 16:34 ` Carl Worth
2007-04-12 21:46   ` Martin Langhoff
2007-04-12 23:24     ` Carl Worth
2007-04-12 23:50       ` Martin Langhoff
2007-04-13  0:28         ` Junio C Hamano
2007-04-13  3:50       ` Junio C Hamano

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=7vk5whki24.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=martin@catalyst.net.nz \
    /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).