git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: git diff: support "-U" and "--unified" options properly
Date: Sun, 14 May 2006 10:36:03 -0700	[thread overview]
Message-ID: <7v7j4o33wc.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <200605141457.17314.Josef.Weidendorfer@gmx.de> (Josef Weidendorfer's message of "Sun, 14 May 2006 14:57:17 +0200")

Josef Weidendorfer <Josef.Weidendorfer@gmx.de> writes:

> On Saturday 13 May 2006 23:22, you wrote:
>>  * remotes/ information from .git/config (js/fetchconfig)
>> ...
>>    [branch "master"]
>> 	remote = "ko-private"
>
> Why is this line needed? In this example, what is the relationship
> of local "master" with the remote? I think it is enough to specify
> the local upstream branch:
>
>  [branch "master"]
>     origin = "ko-master"

I confused you by not describing the flow. 

There are four repositories involved:

 a. siamese:/git (my local development repo)
 b. x86-64.kernel.org:~/git (my kernel.org build repo)
 c. i386.kernel.org:~/git   (ditto but for i386)
 d. kernel.org:/pub/scm/git/git.git (public distribution point)

The workflow is:

 1. maint/master/next/pu are prepared on a.

 2. maint/master/next/pu are pushed to b. and c. as
    maint/origin/next/pu.  b. and c. always have their "master"
    checked out.

 3. I go to b. and c., and "pull . origin" to start my build
    there on all four branches.

 4. When things go well, I come back to a.

 5. Then maint/master/next/pu are pushed to d. without renaming.

 6. To keep track of what have been pushed, maint/master/next/pu
    from d. are fetched to a., with ko- prefixed.  There is no
    "when on this branch" involved in this step.  Regardless of
    which branch I currently on, the fetch goes fine.  I never
    check out ko-* branches on a, nor merge from ko-* branches.

 7. Go back to step 1 and start the next cycle.  ko-maint, ko-master
    and ko-next reminds me not to rewind maint/master/next while I
    shuffle the changes to discard botched commits beyond them.

> So we need
>
>  [branch "ko-master"]
>     tracksremote = "master of ko-private"
>
> This also would specify that we are not allowed to commit on "ko-master".

For my workflow, it is "master of ko"; your notation expresses
the same constraints more explicitly by being more special
purpose: "This tracks that one so never touch it any way other
than fetching into it" (we may not even allow checking out
"ko-master" -- I dunno).  

One issue you might want to think about is it is far more
efficient to fetch multiple branches from the same git://... URL
is than fetching them one by one.  The push has exactly the same
property.

Another thing is the above talks only about constraints, and the
user has to go all over the config file to find "xxx to
ko-private" in order to figure out what happens when he says
"pull ko-private".

>> ...
>>    [remote "ko"]
>>    	url = "kernel.org:/pub/scm/git/git.git"
>>       push = master:master
>> ...

>> 	fetch = master:ko-master
>

> These specifications more or less are independent from the above,
> as it specifies the defaults when fetching/pushing to the specified remote.

Not really; and what you introduced can conflict with [remote]
specification.  If you have [branch "ko-master"] that says it
tracks remote "master" from "ko" repository, your [remote "ko"]
should have not say "fetch = foobla:ko-master", so in that sense
it is redundant and inviting later inconsistency.  The only
information you added with "tracksremote" is the branch is used
to track what is on remote (implying we'd better not touch it
ourselves), so I'd say this would make sense

	[branch "ko-master"]
        	tracksremote ; bool!
	[remote "ko"]
        	url = git://git.kernel.org/pub/scm/git/git.git
        	fetch = master:ko-master

or alternatively this would:

	[branch "ko-master"]
		tracksremote = "master of ko"
	[remote "ko"]
        	url = git://git.kernel.org/pub/scm/git/git.git

  reply	other threads:[~2006-05-14 17:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-13 20:23 git diff: support "-U" and "--unified" options properly Linus Torvalds
2006-05-13 20:30 ` Junio C Hamano
2006-05-13 20:59 ` Junio C Hamano
2006-05-13 21:05   ` Linus Torvalds
2006-05-13 21:22     ` Junio C Hamano
2006-05-13 22:39       ` Linus Torvalds
2006-05-15  0:39         ` Junio C Hamano
2006-05-15  0:58           ` Linus Torvalds
2006-05-15  1:51             ` Junio C Hamano
2006-05-15  3:49             ` Linus Torvalds
2006-05-14  7:00       ` Martin Langhoff
2006-05-14 12:57       ` Josef Weidendorfer
2006-05-14 17:36         ` Junio C Hamano [this message]
2006-05-14 20:49           ` Branch relationships (was:Re: git diff: support "-U" and "--unified" options properly) Josef Weidendorfer
2006-05-14 21:20             ` Branch relationships Junio C Hamano
2006-05-14 22:01               ` Josef Weidendorfer
2006-05-14 22:19                 ` Junio C Hamano
2006-05-14 23:04                   ` Josef Weidendorfer
2006-05-14 23:55                     ` Junio C Hamano
2006-05-15  1:48                       ` Josef Weidendorfer
2006-05-15  2:11                         ` 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=7v7j4o33wc.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=Josef.Weidendorfer@gmx.de \
    --cc=git@vger.kernel.org \
    /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).