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

Re: [PATCH] Make git-clone --use-separate-remote the default

From
Junio C Hamano <junkio@cox.net>
Date
Nov 25, 2006, 00:04 UTC
Message-ID
<7v3b889ysd.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<ek7v61$k89$1@sea.gmane.org>
Salikh Zakirov <salikh@gmail.com> writes:
> I think that remote matching semantics is confusing, and the following change
> would make understanding easier.
Hmm.  I think this is somewhat wrong.
Have you tested the patch with repositories with existing refs?

You do not seem to check if that fabricated matched_dst exists on the other side, so matched_dst lacks "where was this ref initially" information (aka old_sha1), if I am reading your patch correctly. Wouldn't that mean that you would confuse the fast-forward check logic?

One setup I have that would be broken with this change is that the remote end has refs/heads/up/obsd and no refs/heads/obsd, and local end has refs/heads/obsd. This is to work on portability fix for OpenBSD. With the current git-push, I think

	git push $remote_openbsd_box obsd

would correctly update the remote refs/heads/up/obsd with the local tip of the obsd branch, so that then I can ssh into the remote and say "git merge up/obsd" to continue on that OpenBSD machine from where I left off on the local, non-OpenBSD machine.

I am not sure if people would mind breaking existing setups like this.

By the way, there are other glitches with the current git-push (rather, git-send-pack) that we need to tighten. For example:

	git push $remote HEAD~6

does not error out as it should. 'HEAD~6' is expanded to 'HEAD~6:HEAD~6'; its left hand side is valid (6 revs before the tip is used to update the remote side) but its right hand side is not checked for validity ("HEAD~6" is not a valid refname) and creates .git/HEAD~6 at the remote end which is completely bogus.

Previous: Salikh ZakirovNext: Sergey Vlasov
Message 13 of 17 in “Make git-clone --use-separate-remote the default”
  1. Make git-clone --use-separate-remote the defaultPetr Baudis, Nov 23, 2006
  2. Junio C HamanoNov 23, 2006
  3. Andy WhitcroftNov 23, 2006
  4. Petr BaudisNov 23, 2006
  5. J. Bruce FieldsNov 23, 2006
  6. Junio C HamanoNov 24, 2006
  7. Junio C HamanoNov 24, 2006
  8. Junio C HamanoNov 24, 2006
  9. Salikh ZakirovNov 24, 2006
  10. Junio C HamanoNov 24, 2006
  11. Salikh ZakirovNov 24, 2006
  12. Salikh ZakirovNov 24, 2006
  13. Junio C HamanoNov 25, 2006
  14. Sergey VlasovNov 24, 2006
  15. Junio C HamanoNov 24, 2006
  16. Jakub NarebskiNov 24, 2006
  17. Salikh ZakirovNov 24, 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.