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

Re: git bundle bug?

From
Avery Pennarun <apenwarr@gmail.com>
Date
Jul 26, 2010, 06:55 UTC
Message-ID
<AANLkTincXfdZehvVjVjtfvbuM-Jim5Tvtm9Yy=s8-fMR@mail.gmail.com>
In-Reply-To
<i2jaue$f7a$1@dough.gmane.org>
On Mon, Jul 26, 2010 at 2:45 AM, SungHyun Nam <goweol@gmail.com> wrote:
Show 8 quoted lines
> In a current 'git' source tree, next command does not includes
> refs/tags/v1.7.2.
>    $ git bundle create ~/git.bundle v1.7.1..master
>
> After applying the git.bundle, now 'git version' does not
> show 1.7.2, but...
>    $ git version
>    git version 1.7.1.772.g64fdc

'git bundle' only includes the tags that you specifically tell it to. It's kind of like 'git push' that way. If you do:

   git tag -s mytag
   git push origin master
You don't expect origin to contain 'mytag' just because you pushed 'master'.
Show 6 quoted lines
> I hope the 'git bundle' includes all the tags when I use 'master'
> or 'HEAD'.
>
> Well, I could use v1.7.1..v1.7.2.  But want to use simple script like:
>    $ git bundle create ~/git.bundle lastbundle..master
>    $ git tag -f lastbundle master

That kind of magic would require 'git bundle' to look at all your tags and see which ones lie in the range lastbundle..master. And even that isn't perfect, since you might have added a new tag that points before lastbundle but was added *after* lastbundle. So every bundle you created would need to include *all* your previous tags.

Nevertheless, if you wanted to create a bundle that includes *all* your tags, but not any of the objects leading up to lastbundle, this works:

   git bundle create ~/git.bundle --tags lastbundle..master

Note however that it will include tags even if they *aren't* part of master. That is, if you have tags pointing at branch 'next', all the objects for those tags will *also* be included.

Have fun,
Avery
Previous: SungHyun NamNext: SungHyun Nam
Message 2 of 4 in “git bundle bug?”
  1. SungHyun NamJul 26, 2010
  2. Avery PennarunJul 26, 2010
  3. SungHyun NamJul 26, 2010
  4. bash completion for 'git version'? (Re: git bundle bug?)SungHyun Nam, Jul 26, 2010

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.