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

Re: [PATCH] revision walker: include a detached HEAD in --all

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 18, 2009, 14:06 UTC
Message-ID
<alpine.DEB.1.00.0901181442370.3586@pacific.mpi-cbg.de>
In-Reply-To
<7v3afh15pi.fsf@gitster.siamese.dyndns.org>
Hi,
On Sat, 17 Jan 2009, Junio C Hamano wrote:
Show 12 quoted lines
> Subject: [PATCH] bundle: allow the same ref to be given more than once
> 
> "git bundle create x master master" used to create a bundle that lists
> the same branch (master) twice.  Cloning from such a bundle resulted in
> a needless warning "warning: Duplicated ref: refs/remotes/origin/master".
> 
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
>  bundle.c |    2 ++
>  object.c |   19 +++++++++++++++++++
>  object.h |    1 +
>  3 files changed, 22 insertions(+), 0 deletions(-)
Yes, that would be good.  You have my ACK on that if you want.
Another thing I am thinking about on and off:

You cannot really use bundles as a replacement for regular transports (e.g. when you administrator does not let you ssh or git:// out, and you do not have an HTTP server available [*1*]).

Suppose you have two branches, 'master' and 'side'. Now you make changes to 'master' and send the complete repository as a bundle to your friend. Now you delete the branch 'side', and send the next bundle (created with --all implying HEAD, and --since=$(stat -c %Y <first-bundle>)).

Then your friend has no idea if 'side' was deleted or untouched.

So I think we'd need some option for "create bundle" to list all specified refs, and if they have not really changed, their SHA-1s as prerequisites, too. Maybe "--full-bundle", or just "--full"?

Another problem: suppose you have a branch, called 'private', that you excluded from your bundles. Now you happened to make changes to it, and by mistake, the branch gets included in the incremental bundle. No problem for you, as your friend lacks the prerequisites to reconstruct it.

But unfortunately, your friend cannot even pull 'master' from it, because of our overzealous verification process which refuses all fetches when some prerequisites are missing locally, even if they are not even needed.

This problem is much harder to solve, I think, and maybe we just want to leave it: as bundles are just fed into index-pack --fix-thin, which has no idea what objects can be skipped. Maybe there is no clean solution to that to begin with.

Ciao, Dscho

[*1*] When people are stuck behind such a stupidly restrictive firewall, often people come with "helpful" suggestions to use a VPN, or to publish your private repository, or get an external machine to HTTP proxy their connections. I find it outright mean to waste the time of people who already have a big problem.

However, I believe that a mail based bundle exchange should be a relatively easy way out for those situations, once it works.

Previous: Junio C HamanoNext: Johannes Schindelin
Message 18 of 46 in “checkout: implement "-" shortcut name for last branch”
  1. checkout: implement "-" shortcut name for last branchThomas Rast, Jan 15, 2009
  2. checkout: implement "-" shortcut name for last branchThomas Rast, Jan 15, 2009
  3. Johannes SixtJan 15, 2009
  4. Johannes SchindelinJan 15, 2009
  5. Thomas RastJan 15, 2009
  6. Johannes SchindelinJan 15, 2009
  7. Johannes SchindelinJan 15, 2009
  8. Junio C HamanoJan 15, 2009
  9. Johannes SchindelinJan 15, 2009
  10. revision walker: include a detached HEAD in --allJohannes Schindelin, Jan 16, 2009
  11. Santi BéjarJan 16, 2009
  12. Johannes SchindelinJan 16, 2009
  13. David KastrupJan 16, 2009
  14. Santi BéjarJan 16, 2009
  15. Santi BéjarJan 16, 2009
  16. Junio C HamanoJan 18, 2009
  17. Junio C HamanoJan 18, 2009
  18. Johannes SchindelinJan 18, 2009
  19. Johannes SchindelinJan 18, 2009
  20. Johan HerlandJan 15, 2009
  21. Johannes SchindelinJan 15, 2009
  22. Junio C HamanoJan 15, 2009
  23. Junio C HamanoJan 15, 2009
  24. Johannes SchindelinJan 16, 2009
  25. Johannes SchindelinJan 15, 2009
  26. Thomas RastJan 15, 2009
  27. Johannes SchindelinJan 15, 2009
  28. Thomas RastJan 15, 2009
  29. Johannes SchindelinJan 15, 2009
  30. Thomas RastJan 16, 2009
  31. Johannes SchindelinJan 16, 2009
  32. git-resurrect: find traces of a branch name and resurrect itThomas Rast, Jan 18, 2009
  33. Johannes SchindelinJan 18, 2009
  34. Thomas RastJan 20, 2009
  35. Boyd Stephen Smith Jr.Jan 20, 2009
  36. Boyd Stephen Smith Jr.Jan 20, 2009
  37. contrib git-resurrect: find traces of a branch name and resurrect itThomas Rast, Jan 23, 2009
  38. Boyd Stephen Smith Jr.Jan 23, 2009
  39. Thomas RastJan 26, 2009
  40. contrib git-resurrect: find traces of a branch name and resurrect itThomas Rast, Jan 26, 2009
  41. Junio C HamanoJan 27, 2009
  42. Thomas RastJan 30, 2009
  43. contrib git-resurrect: find traces of a branch name and resurrect itThomas Rast, Feb 1, 2009
  44. Junio C HamanoFeb 2, 2009
  45. contrib git-resurrect: find traces of a branch name and resurrect itThomas Rast, Feb 4, 2009
  46. Junio C HamanoFeb 5, 2009

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.