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

Re: [RFD] making separate-remote layout easier to use

From
Junio C Hamano <junkio@cox.net>
Date
Nov 27, 2006, 01:21 UTC
Message-ID
<7virh1r8f1.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<200611270159.14925.Josef.Weidendorfer@gmx.de>
Josef Weidendorfer <Josef.Weidendorfer@gmx.de> writes:
> I am not so sure about this. IMHO, any user expects to see "pu" branch
> cloned too after cloning git.git (at least me, and a newbie probably too).

I think you are right that we can keep our sanity without omitting rewinding ones from the tracked set of branches. In fact, remotes/origin/* hierarchy are not to be checked out directly anyway, even after we do the "bare SHA-1 stored in $GIT_DIR/HEAD" update -- that should give you a read-only checkout that you cannot commit on top of. As long as we warn users who try to merge from these rewinding branches, there is no reason not to track them.

Show 5 quoted lines
> As said, the real problem begins when the user tries to branch off her
> own local branch from "pu". At this point, "git branch" or
> "git checkout -b ..." should warn the user that he has to expect troubles
> when branching off from such a branch, and only allow it with a
> "--force" option.

That is true if you make "git branch my-pu remotes/origin/pu" to somehow set up the default merge source of "my-pu" branch to be remotes/origin/pu to encourage merging from it.

I am still not convinced it is a valid assumption that a branch often want to merge from the branch it was forked off of, and even less so that "git branch" and "git checkout -b" are the places to do that configuration.

But for the sake of discussion let's pretend for now that it were a good idea. If we know remotes/origin/pu is expected to be rewound, the logic that configures "my-pu" to merge from the fork origin should be able to notice that situation, and refrain from doing the configuration, to prevent the user from issuing "git pull" without saying "from where", which can be done with your merge.stopsansdefault option in your other message.

Previous: Josef WeidendorferNext: Jon Loeliger
Message 17 of 22 in “[RFD] making separate-remote layout easier to use”
  1. Junio C HamanoNov 25, 2006
  2. Jakub NarebskiNov 25, 2006
  3. Junio C HamanoNov 25, 2006
  4. Jakub NarebskiNov 25, 2006
  5. Junio C HamanoNov 26, 2006
  6. Junio C HamanoNov 26, 2006
  7. Shawn PearceNov 26, 2006
  8. Junio C HamanoNov 26, 2006
  9. Shawn PearceNov 26, 2006
  10. Junio C HamanoNov 26, 2006
  11. Shawn PearceNov 26, 2006
  12. Junio C HamanoNov 26, 2006
  13. Shawn PearceNov 26, 2006
  14. Junio C HamanoNov 26, 2006
  15. Jakub NarebskiNov 26, 2006
  16. Josef WeidendorferNov 27, 2006
  17. Junio C HamanoNov 27, 2006
  18. Jon LoeligerNov 30, 2006
  19. Junio C HamanoNov 30, 2006
  20. Jakub NarebskiNov 26, 2006
  21. Josef WeidendorferNov 27, 2006
  22. Jon LoeligerNov 29, 2006

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.