git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: push branch descriptions

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 14, 2012, 17:58 UTC
Message-ID
<7vbof0awxo.fsf@alter.siamese.dyndns.org>
In-Reply-To
<871B6C10EBEFE342A772D1159D13208537AABCCA@umechphj.easf.csd.disa.mil>
"Pyeron, Jason J CTR (US)" <jason.j.pyeron.ctr@mail.mil> writes:
Show 12 quoted lines
>> > Imagine the project creates a branch "magic" to enhance its system
>> > with magic words.  The description for the "magic" branch in the
>> > project may say "support magic words" or something.
>> >
>> > You and your friend are tasked to add a handful of magic words,
>> > e.g. "xyzzy", "frotz" and "nitfol".  You may start your work like so
>> > on your "magic-xyzzy" branch:
>> >
>> >     $ git clone git://example.com/zork.git/
>> >     $ git checkout -b magic-xyzzy -t origin/magic
>
> And here the branch description should copy from origin/magic.

I doubt it should. The purpose of the "magic" branch at the remote in my example were to "support magic words" (without limiting which magic words the project wants to support) and that is what the description over there may say, while the purpose of the local "magic-xyzzy" branch you create in order to add the support for "xyzzy" magic is just one small subtask of it.

That is what I meant by "the inherently local nature of the branches and branch descriptions". Git as a distributed system works well exactly because what each repository has is inherently local, and people can do whatever they want in their own repositories, while allowing collaboration among participants by pulling and pushing histories that share compatible (note: not necessarily "identical") goals. "support magic words" being a superset of "add xyzzy magic" is an example of this principle. They have different goals (and that is why propagating the description of your "magic-xyzzy" to the project global "magic" is a wrong thing to do), but from the point of view of the project global "magic" branch, what your "magic-xyzzy" branch wanted to do is compatible with its larger goal (and that is why merging to "magic" from "magic-xyzzy" is a good thing, while merging the other way is frowned upon in general).

Previous: Pyeron, Jason J CTR (US)
Message 7 of 7 in “push branch descriptions”
  1. Angelo BorsottiNov 14, 2012
  2. Ramkumar RamachandraNov 14, 2012
  3. Michael J GruberNov 14, 2012
  4. Junio C HamanoNov 14, 2012
  5. Angelo BorsottiNov 14, 2012
  6. Pyeron, Jason J CTR (US)Nov 14, 2012
  7. Junio C HamanoNov 14, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.