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

Re: [PATCH] Add git-unbundle - unpack objects and references for disconnected transfer

From
Mark Levedahl <mdl123@verizon.net>
Date
Feb 17, 2007, 14:40 UTC
Message-ID
<45D713C0.1010401@verizon.net>
In-Reply-To
<7vfy95w9sc.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 7 quoted lines
> I do not think your patch (original or respun) checks if it is
> overwriting the current branch.  Even if it is a fast forward,
> it should check this condition and prevent the end user from
> getting confused.  The above sample command line you quoted from
> my message can potentially have the same problem, but "git
> fetch" checks and refuses.
>   

True. I've been using this to mirror remote/* and tags. Making this just an alternate transport behind fetch and pull is clearly the cleanest way to deal with non-remote branches.

Show 12 quoted lines
> A final note.  A real 'mirror' mode should also remove stale
> refs that do not exist on the remote side anymore, which is a
> different use case as your bundle, which presumably is primarily
> meant to carry not all but only selected set of refs, and most
> likely not the 'master' branch head (and I am guessing that that
> is why you forgot to make sure you are not overwriting the
> current branch in the unbundle script).  A real 'mirror' mode
> would use a separate option to remove a ref that does not exist
> on the remote end anymore, like:
>
> 	$ git fetch --mirror-all git://git.kernel.org/pub/scm/git/git.git
>   

Perhaps "git fetch --mirror --delete" would be more suggestive of the difference to "git fetch --mirror"?

Mark
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 12 in “Re: Re: [PATCH] Add git-unbundle - unpack objects and references for disconnected transfer”
  1. Mark LevedahlFeb 16, 2007
  2. Junio C HamanoFeb 16, 2007
  3. Mark LevedahlFeb 16, 2007
  4. Junio C HamanoFeb 17, 2007
  5. Mark LevedahlFeb 17, 2007
  6. Junio C HamanoFeb 17, 2007
  7. Mark LevedahlFeb 17, 2007
  8. Junio C HamanoFeb 17, 2007
  9. Add git-bundle: move objects and references by archive.Mark Levedahl, Feb 18, 2007
  10. Mark LevedahlFeb 18, 2007
  11. Mark LevedahlFeb 16, 2007
  12. Johannes SchindelinFeb 16, 2007

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.