Re: git diff: support "-U" and "--unified" options properly
- From
- Josef Weidendorfer <josef.weidendorfer@gmx.de>
- Date
- May 14, 2006, 12:57 UTC
- Message-ID
- <200605141457.17314.Josef.Weidendorfer@gmx.de>
- In-Reply-To
- <7vpsihsjq6.fsf@assigned-by-dhcp.cox.net>
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"For the default pull action when on "master", we would have to look up for remotes with a fetch line fetching into "ko-master", which could be cumbersome. Besides, the fetch lines specify default actions when fetching from a given remote, and there is no garantuee that we want fetching into "ko-master" as any default action.
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".
If we do not want to have a local tracking branch at all, we would have
[branch "master"]
origin = "master of ko-private"or
[branch "master"]
origin = "master of kernel.org:/pub/scm/git/git.git"For a default push action when on master, I would add
[branch "master"]
push = "master of ko-private"or alternatively
[branch "master"]
push = "master of kernel.org:/pub/scm/git/git.git"Show 6 quoted lines
> ... > [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.
Josef
PS: Patch pending...