{"thread":{"id":"54255","subject":"Apply git bundle to source tree?","startedAt":"2020-09-18T11:14:06Z","lastAt":"2020-09-19T19:29:10Z","messageCount":14,"participants":["Andreas Grünbacher","Taylor Blau","Andreas Schwab","Junio C Hamano","Konstantin Ryabitsev","Thomas Guyot-Sionnest","brian m. carlson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"405846","messageId":"CAHpGcMJqmUmCR_u3fxSVppzwBo8_6RJG5-WLrXAWXm+OQ6_3bA@mail.gmail.com","threadId":"54255","inReplyTo":null,"subject":"Apply git bundle to source tree?","fromName":"Andreas Grünbacher","fromEmail":"andreas.gruenbacher@gmail.com","sentAt":"2020-09-18T11:13:52Z","receivedAt":"2020-09-18T11:14:06Z","isPatch":false,"sender":{"key":"andreas.gruenbacher@gmail.com","avatar":null},"body":"Hi,\n\nI'm wondering if there's a way to apply a particular head in a bundle\nto a source tree, for example:\n\n  $ git bundle create v5.9-rc1.bundle v5.8..v5.9-rc1\n  $ cd linux-5.8\n  $ git bundle APPLY ../5.9-rc1.bundle v5.9-rc1\n\nThat would allow to reconstruct either the original repository or just\nthe underlying source tree, so the bundle could be used as a kind of\nsuper diff.\n\nThanks,\nAndreas\n"},{"id":"405861","messageId":"20200918140236.GA1602321@nand.local","threadId":"54255","inReplyTo":"CAHpGcMJqmUmCR_u3fxSVppzwBo8_6RJG5-WLrXAWXm+OQ6_3bA@mail.gmail.com","subject":"Re: Apply git bundle to source tree?","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2020-09-18T14:02:36Z","receivedAt":"2020-09-18T14:02:41Z","isPatch":false,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"Hi Andreas,\n\nOn Fri, Sep 18, 2020 at 01:13:52PM +0200, Andreas Grünbacher wrote:\n> Hi,\n>\n> I'm wondering if there's a way to apply a particular head in a bundle\n> to a source tree, for example:\n>\n>   $ git bundle create v5.9-rc1.bundle v5.8..v5.9-rc1\n>   $ cd linux-5.8\n>   $ git bundle APPLY ../5.9-rc1.bundle v5.9-rc1\n\nSort of. You can specify a refspec when fetching from the bundle to\nfetch only the objects you care about, like:\n\n  cd linux-5.8\n  git fetch /path/to/bundle 'refs/tags/v5.9-rc1:refs/tags/v5.9-rc1'\n\n(or if you prefer, \"git fetch /path/to/bundle 'tag v5.9-rc1'\"). Then\nonce you have the objects locally, you can merge it into your HEAD. You\ncan do all of that in one step with:\n\n  git pull /path/to/bundle 'refs/tags/v5.9-rc1'\n\nThere's no such thing as 'git bundle apply' though, although I suspect\n'git pull' is what you wanted anyway.\n\nThanks,\nTaylor\n"},{"id":"405863","messageId":"CAHpGcML=EFRngwjgaXNE53OOPoEBz+4Qi1v354gAv_vHNYS_gQ@mail.gmail.com","threadId":"54255","inReplyTo":"20200918140236.GA1602321@nand.local","subject":"Re: Apply git bundle to source tree?","fromName":"Andreas Grünbacher","fromEmail":"andreas.gruenbacher@gmail.com","sentAt":"2020-09-18T14:12:09Z","receivedAt":"2020-09-18T14:12:22Z","isPatch":false,"sender":{"key":"andreas.gruenbacher@gmail.com","avatar":null},"body":"Hi Taylor,\n\nAm Fr., 18. Sept. 2020 um 16:02 Uhr schrieb Taylor Blau <me@ttaylorr.com>:\n>\n> Hi Andreas,\n>\n> On Fri, Sep 18, 2020 at 01:13:52PM +0200, Andreas Grünbacher wrote:\n> > Hi,\n> >\n> > I'm wondering if there's a way to apply a particular head in a bundle\n> > to a source tree, for example:\n> >\n> >   $ git bundle create v5.9-rc1.bundle v5.8..v5.9-rc1\n> >   $ cd linux-5.8\n> >   $ git bundle APPLY ../5.9-rc1.bundle v5.9-rc1\n>\n> Sort of. You can specify a refspec when fetching from the bundle to\n> fetch only the objects you care about, like:\n>\n>   cd linux-5.8\n>   git fetch /path/to/bundle 'refs/tags/v5.9-rc1:refs/tags/v5.9-rc1'\n>\n> (or if you prefer, \"git fetch /path/to/bundle 'tag v5.9-rc1'\"). Then\n> once you have the objects locally, you can merge it into your HEAD. You\n> can do all of that in one step with:\n>\n>   git pull /path/to/bundle 'refs/tags/v5.9-rc1'\n>\n> There's no such thing as 'git bundle apply' though, although I suspect\n> 'git pull' is what you wanted anyway.\n\nI was actually looking for a way to apply a bundle to an actual source\ntree, not a git repository. Fetching stuff from a bundle into a\nrepository seems to be reasonably well documented.\n\nThanks,\nAndreas\n"},{"id":"405865","messageId":"20200918141725.GA1606445@nand.local","threadId":"54255","inReplyTo":"CAHpGcML=EFRngwjgaXNE53OOPoEBz+4Qi1v354gAv_vHNYS_gQ@mail.gmail.com","subject":"Re: Apply git bundle to source tree?","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2020-09-18T14:17:25Z","receivedAt":"2020-09-18T14:17:30Z","isPatch":false,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Fri, Sep 18, 2020 at 04:12:09PM +0200, Andreas Grünbacher wrote:\n> I was actually looking for a way to apply a bundle to an actual source\n> tree, not a git repository. Fetching stuff from a bundle into a\n> repository seems to be reasonably well documented.\n\nUnfortunately I don't think such a thing is possible, or at least if it\nis, I can't think of how to do it.\n\nThanks,\nTaylor\n"},{"id":"405868","messageId":"CAHpGcMJXZ++t0UtyCRSh=cB8uzy51hJTNxaF1Zd8Z-AQs4w+QQ@mail.gmail.com","threadId":"54255","inReplyTo":"20200918141725.GA1606445@nand.local","subject":"Re: Apply git bundle to source tree?","fromName":"Andreas Grünbacher","fromEmail":"andreas.gruenbacher@gmail.com","sentAt":"2020-09-18T14:50:47Z","receivedAt":"2020-09-18T14:51:01Z","isPatch":false,"sender":{"key":"andreas.gruenbacher@gmail.com","avatar":null},"body":"Am Fr., 18. Sept. 2020 um 16:17 Uhr schrieb Taylor Blau <me@ttaylorr.com>:\n> On Fri, Sep 18, 2020 at 04:12:09PM +0200, Andreas Grünbacher wrote:\n> > I was actually looking for a way to apply a bundle to an actual source\n> > tree, not a git repository. Fetching stuff from a bundle into a\n> > repository seems to be reasonably well documented.\n>\n> Unfortunately I don't think such a thing is possible, or at least if it\n> is, I can't think of how to do it.\n\nYes, maybe someone familiar with the bundle file format can tell\nwhether it's at least theoretically possible. Is there a way to figure\nout which hashes the original files are supposed to have? Am I right\nin assuming that v5.8^{tree} isn't included in a v5.8..v5.9-rc1\nbundle?\n\nThanks,\nAndreas\n"},{"id":"405870","messageId":"871rizglfv.fsf@igel.home","threadId":"54255","inReplyTo":"CAHpGcMJXZ++t0UtyCRSh=cB8uzy51hJTNxaF1Zd8Z-AQs4w+QQ@mail.gmail.com","subject":"Re: Apply git bundle to source tree?","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2020-09-18T15:21:24Z","receivedAt":"2020-09-18T15:21:31Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"On Sep 18 2020, Andreas Grünbacher wrote:\n\n> Am I right in assuming that v5.8^{tree} isn't included in a\n> v5.8..v5.9-rc1 bundle?\n\nFrom git-bundle(1):\n\n       As no direct connection between the repositories exists, the user must\n       specify a basis for the bundle that is held by the destination\n       repository: the bundle assumes that all objects in the basis are\n       already in the destination repository.\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1\n\"And now for something completely different.\"\n"},{"id":"405872","messageId":"CAHpGcMJhp7Z6YnuTKRXadiOOUYV=tFPRE-_-rAri1iHDPk-C=A@mail.gmail.com","threadId":"54255","inReplyTo":"871rizglfv.fsf@igel.home","subject":"Re: Apply git bundle to source tree?","fromName":"Andreas Grünbacher","fromEmail":"andreas.gruenbacher@gmail.com","sentAt":"2020-09-18T15:32:45Z","receivedAt":"2020-09-18T15:32:59Z","isPatch":false,"sender":{"key":"andreas.gruenbacher@gmail.com","avatar":null},"body":"Am Fr., 18. Sept. 2020 um 17:21 Uhr schrieb Andreas Schwab\n<schwab@linux-m68k.org>:\n> On Sep 18 2020, Andreas Grünbacher wrote:\n> > Am I right in assuming that v5.8^{tree} isn't included in a\n> > v5.8..v5.9-rc1 bundle?\n>\n> From git-bundle(1):\n>\n>        As no direct connection between the repositories exists, the user must\n>        specify a basis for the bundle that is held by the destination\n>        repository: the bundle assumes that all objects in the basis are\n>        already in the destination repository.\n\nIt's pretty clear that the original objects are needed when trying to\nreconnect the objects in the bundle to them. That wasn't my question,\nthough.\n\nThanks,\nAndreas\n"},{"id":"405873","messageId":"xmqqbli3nlda.fsf@gitster.c.googlers.com","threadId":"54255","inReplyTo":"CAHpGcMJqmUmCR_u3fxSVppzwBo8_6RJG5-WLrXAWXm+OQ6_3bA@mail.gmail.com","subject":"Re: Apply git bundle to source tree?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-09-18T15:41:05Z","receivedAt":"2020-09-18T15:41:13Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andreas Grünbacher <andreas.gruenbacher@gmail.com> writes:\n\n> I'm wondering if there's a way to apply a particular head in a bundle\n> to a source tree, for example:\n>\n>   $ git bundle create v5.9-rc1.bundle v5.8..v5.9-rc1\n>   $ cd linux-5.8\n>   $ git bundle APPLY ../5.9-rc1.bundle v5.9-rc1\n>\n> That would allow to reconstruct either the original repository or just\n> the underlying source tree, so the bundle could be used as a kind of\n> super diff.\n\nThere seem to be a bit of misconception.\n\nDo not think that a bundle is like a patch.  When you created the\nbundle in the above example, you did not create a \"super diff\"\nbetween v5.8 and v5.9-rc1 that you can apply to a working tree files\nthat correspond to v5.8 release.  That is not what you did.\n\nWhat you created is an equivalent of a (shallow) repository, that\ncontains everything needed to get v5.9-rc1 by those who have a Git\nrepository that has v5.8 to fetch/pull from.  It is OK to have more,\nbut you MUST have v5.8 for the bundle in the example to be usable.\n\nSo assuming that your 'linux-5.8' is not just a tarball extract but\na Linux repository with v5.8 tag in it (i.e. \"git log v5.8\" gives\nyou sensible output) then the command to use is not apply but fetch,\ne.g.\n\n    $ git bundle fetch ../5.9-rc1.bundle v5.9-rc1\n\nwhich will give you v5.9-rc1 tag.  What you can fetch from the bundle\ncan be listed by using the list-heads subcommand on the bundle.\n\nAnd starting from that point, you would be able to do things like\n\n    $ git checkout -b my-fork-of-5.9-rc1 v5.9-rc1\n\nNow, assuming that your original question indeed came from thinking\nof a bundle like a patch and not like a repository, we have a\nquestion for you.  What in\n\n    $ git bundle --help\n\ngave such an incorrect impression?  The documentation must be at\nfault here, and we need to clarify so that future readers of it will\nnot be confused into the same misconception.\n\nThanks.\n"},{"id":"405875","messageId":"87v9gbf5fi.fsf@igel.home","threadId":"54255","inReplyTo":"CAHpGcMJhp7Z6YnuTKRXadiOOUYV=tFPRE-_-rAri1iHDPk-C=A@mail.gmail.com","subject":"Re: Apply git bundle to source tree?","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2020-09-18T15:52:33Z","receivedAt":"2020-09-18T15:52:38Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"On Sep 18 2020, Andreas Grünbacher wrote:\n\n> Am Fr., 18. Sept. 2020 um 17:21 Uhr schrieb Andreas Schwab\n> <schwab@linux-m68k.org>:\n>> On Sep 18 2020, Andreas Grünbacher wrote:\n>> > Am I right in assuming that v5.8^{tree} isn't included in a\n>> > v5.8..v5.9-rc1 bundle?\n>>\n>> From git-bundle(1):\n>>\n>>        As no direct connection between the repositories exists, the user must\n>>        specify a basis for the bundle that is held by the destination\n>>        repository: the bundle assumes that all objects in the basis are\n>>        already in the destination repository.\n>\n> It's pretty clear that the original objects are needed when trying to\n> reconnect the objects in the bundle to them. That wasn't my question,\n> though.\n\nYour question was whether v5.8^{tree} is included, and I think that\nsentence gives the answer.\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1\n\"And now for something completely different.\"\n"},{"id":"405910","messageId":"CAHpGcMLEtuKAi1xeaAaC0pMi+mn3wuYVtg0zT4VqJuRHtVHVoA@mail.gmail.com","threadId":"54255","inReplyTo":"xmqqbli3nlda.fsf@gitster.c.googlers.com","subject":"Re: Apply git bundle to source tree?","fromName":"Andreas Grünbacher","fromEmail":"andreas.gruenbacher@gmail.com","sentAt":"2020-09-18T20:00:14Z","receivedAt":"2020-09-18T20:00:29Z","isPatch":false,"sender":{"key":"andreas.gruenbacher@gmail.com","avatar":null},"body":"Am Fr., 18. Sept. 2020 um 17:41 Uhr schrieb Junio C Hamano <gitster@pobox.com>:\n> Andreas Grünbacher <andreas.gruenbacher@gmail.com> writes:\n> > I'm wondering if there's a way to apply a particular head in a bundle\n> > to a source tree, for example:\n> >\n> >   $ git bundle create v5.9-rc1.bundle v5.8..v5.9-rc1\n> >   $ cd linux-5.8\n> >   $ git bundle APPLY ../5.9-rc1.bundle v5.9-rc1\n> >\n> > That would allow to reconstruct either the original repository or just\n> > the underlying source tree, so the bundle could be used as a kind of\n> > super diff.\n>\n> There seem to be a bit of misconception.\n>\n> Do not think that a bundle is like a patch.  When you created the\n> bundle in the above example, you did not create a \"super diff\"\n> between v5.8 and v5.9-rc1 that you can apply to a working tree files\n> that correspond to v5.8 release.  That is not what you did.\n>\n> What you created is an equivalent of a (shallow) repository, that\n> contains everything needed to get v5.9-rc1 by those who have a Git\n> repository that has v5.8 to fetch/pull from.  It is OK to have more,\n> but you MUST have v5.8 for the bundle in the example to be usable.\n>\n> So assuming that your 'linux-5.8' is not just a tarball extract but\n> a Linux repository with v5.8 tag in it (i.e. \"git log v5.8\" gives\n> you sensible output) then the command to use is not apply but fetch,\n> e.g.\n>\n>     $ git bundle fetch ../5.9-rc1.bundle v5.9-rc1\n>\n> which will give you v5.9-rc1 tag.  What you can fetch from the bundle\n> can be listed by using the list-heads subcommand on the bundle.\n>\n> And starting from that point, you would be able to do things like\n>\n>     $ git checkout -b my-fork-of-5.9-rc1 v5.9-rc1\n\nYes thanks, that's roughly what I could infer from the man page.\n\n> Now, assuming that your original question indeed came from thinking\n> of a bundle like a patch and not like a repository, we have a\n> question for you.  What in\n>\n>     $ git bundle --help\n>\n> gave such an incorrect impression? The documentation must be at\n> fault here, and we need to clarify so that future readers of it will\n> not be confused into the same misconception.\n\nI think the documentation is fine, nothing in it indicates that what\nI'm looking for is supported. That's why I was asking if it's possible\nto reconstruct the v5.9-rc1 source tree from the v5.8 source tree plus\na v5.8..v5.9-rc1 bundle at least theoretically.\n\nPoking a little further, I see that the bundle depends on v5.8 and all\nthe ancestor commits of v5.8 that were merged into v5.9-rc1, which\nonly makes sense now. The bundle doesn't contain any of the objects\ncoming from those commits, so there's simply not enough information\nthere for what I was trying to achieve.\n\nThanks,\nAndreas\n"},{"id":"405911","messageId":"CAMwyc-RCiEREpPsTb76LjhLc43Zr2qw-uxYVVPfuznexTTB+Tg@mail.gmail.com","threadId":"54255","inReplyTo":"CAHpGcMJqmUmCR_u3fxSVppzwBo8_6RJG5-WLrXAWXm+OQ6_3bA@mail.gmail.com","subject":"Re: Apply git bundle to source tree?","fromName":"Konstantin Ryabitsev","fromEmail":"konstantin@linuxfoundation.org","sentAt":"2020-09-18T20:18:24Z","receivedAt":"2020-09-18T20:18:37Z","isPatch":false,"sender":{"key":"konstantin@linuxfoundation.org","avatar":"https://gravatar.com/avatar/7cb8827c6de56e1bd2dea16508c6708aa43feed3bf3813bcdacecdf96ceadd79?d=mp&s=160"},"body":"On Fri, 18 Sep 2020 at 07:14, Andreas Grünbacher\n<andreas.gruenbacher@gmail.com> wrote:\n>\n> Hi,\n>\n> I'm wondering if there's a way to apply a particular head in a bundle\n> to a source tree, for example:\n>\n>   $ git bundle create v5.9-rc1.bundle v5.8..v5.9-rc1\n>   $ cd linux-5.8\n>   $ git bundle APPLY ../5.9-rc1.bundle v5.9-rc1\n\nI know this is not what you are asking, but since you used the kernel\nas your example, you can use the following to achieve the result\nyou're looking for:\ncurl --header 'Accept-Encoding: gzip' -L\nhttps://git.kernel.org/torvalds/p/v5.9-rc1/v5.8 | gunzip - | git apply\n\n-K\n"},{"id":"405914","messageId":"CAHpGcMJy=0deaByZ=jXHRiHgHH7utHc0JTG=BMq9Yf1DOKvuGw@mail.gmail.com","threadId":"54255","inReplyTo":"CAMwyc-RCiEREpPsTb76LjhLc43Zr2qw-uxYVVPfuznexTTB+Tg@mail.gmail.com","subject":"Re: Apply git bundle to source tree?","fromName":"Andreas Grünbacher","fromEmail":"andreas.gruenbacher@gmail.com","sentAt":"2020-09-18T21:45:01Z","receivedAt":"2020-09-18T21:45:14Z","isPatch":false,"sender":{"key":"andreas.gruenbacher@gmail.com","avatar":null},"body":"Am Fr., 18. Sept. 2020 um 22:18 Uhr schrieb Konstantin Ryabitsev\n<konstantin@linuxfoundation.org>:\n> On Fri, 18 Sep 2020 at 07:14, Andreas Grünbacher\n> <andreas.gruenbacher@gmail.com> wrote:\n> >\n> > Hi,\n> >\n> > I'm wondering if there's a way to apply a particular head in a bundle\n> > to a source tree, for example:\n> >\n> >   $ git bundle create v5.9-rc1.bundle v5.8..v5.9-rc1\n> >   $ cd linux-5.8\n> >   $ git bundle APPLY ../5.9-rc1.bundle v5.9-rc1\n>\n> I know this is not what you are asking, but since you used the kernel\n> as your example, you can use the following to achieve the result\n> you're looking for:\n> curl --header 'Accept-Encoding: gzip' -L\n> https://git.kernel.org/torvalds/p/v5.9-rc1/v5.8 | gunzip - | git apply\n\nOh, that's neat.\n\nWhat I had in mind were actually distro packages: most projects\nnowadays live somewhere in git repositories. When they're packaged,\nthis usually results in a source package with a diff on top of a\nbaseline release, so the commit history is lost. Friendly packagers\ninclude the commit hashes and point users to a suitable git\nrepository, but that's not enforced or consistent. Including the\nactual git history in packages would be much nicer (i.e., a git\nbundle), but if that can't replace the patch as well, it's rather\nunlikely to happen.\n\nThanks,\nAndreas\n"},{"id":"405935","messageId":"CALqVohesf8WA_+_EaZiheoQ=-JL2Lnh_P1GF4MOZV2usVM=-jQ@mail.gmail.com","threadId":"54255","inReplyTo":"CAHpGcMJy=0deaByZ=jXHRiHgHH7utHc0JTG=BMq9Yf1DOKvuGw@mail.gmail.com","subject":"Re: Apply git bundle to source tree?","fromName":"Thomas Guyot-Sionnest","fromEmail":"tguyot@gmail.com","sentAt":"2020-09-19T12:06:01Z","receivedAt":"2020-09-19T12:08:07Z","isPatch":false,"sender":{"key":"tguyot@gmail.com","avatar":"https://avatars.githubusercontent.com/u/403890?v=4"},"body":"On Fri, 18 Sep 2020 at 17:45, Andreas Grünbacher\n<andreas.gruenbacher@gmail.com> wrote:\n>\n> Am Fr., 18. Sept. 2020 um 22:18 Uhr schrieb Konstantin Ryabitsev\n> >\n> > I know this is not what you are asking, but since you used the kernel\n> > as your example, you can use the following to achieve the result\n> > you're looking for:\n> > curl --header 'Accept-Encoding: gzip' -L\n> > https://git.kernel.org/torvalds/p/v5.9-rc1/v5.8 | gunzip - | git apply\n>\n> Oh, that's neat.\n>\n> What I had in mind were actually distro packages: most projects\n> nowadays live somewhere in git repositories. When they're packaged,\n> this usually results in a source package with a diff on top of a\n> baseline release, so the commit history is lost. Friendly packagers\n> include the commit hashes and point users to a suitable git\n> repository, but that's not enforced or consistent. Including the\n> actual git history in packages would be much nicer (i.e., a git\n> bundle), but if that can't replace the patch as well, it's rather\n> unlikely to happen.\n\nAfaik a git bundle can do all that, and it's actually a neat idea. It\nwill be bigger initially than a single release, especially if the\nproject has not been good at keeping history tidy, but bundles could\nbe used for both the base release *and* patches, and actually when you\nneed the next version old bundles could also help downloading just the\nadditional bits you need.\n\nSince you mentioned it, patches that are maintained by packagers are\nbest maintained in git already, so the patchset could be available in\na bundle (you can have a single bundle with multiple refs; the\nrelease, the patchset head (each parent back to release HEAD is a\npatch) or even each individual patches is that suits you). If you\nmaintain them as separate bundles, you will always need the release\none for the rest to become useful, but in the end it's easy to convert\nbetween bundles and patches.\n\nFWIW I've been using bundles since the very beginning - my use case\nthough was backups. I figured it was an efficient way to archive an\nentire bare repo into a single file and ship it offsite. I don't think\nI kept the script but it's quite simple; bundle just needs the\nheads/tags - without a range it goes all the way through history. For\nthe restore, I would list the heads from the bundle then fetch each\nback into the right head/tag in an empty repo.\n\n--\nThomas\n"},{"id":"405948","messageId":"20200919192852.GG67496@camp.crustytoothpaste.net","threadId":"54255","inReplyTo":"CAHpGcMJy=0deaByZ=jXHRiHgHH7utHc0JTG=BMq9Yf1DOKvuGw@mail.gmail.com","subject":"Re: Apply git bundle to source tree?","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-09-19T19:28:52Z","receivedAt":"2020-09-19T19:29:10Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2020-09-18 at 21:45:01, Andreas Grünbacher wrote:\n> What I had in mind were actually distro packages: most projects\n> nowadays live somewhere in git repositories. When they're packaged,\n> this usually results in a source package with a diff on top of a\n> baseline release, so the commit history is lost. Friendly packagers\n> include the commit hashes and point users to a suitable git\n> repository, but that's not enforced or consistent. Including the\n> actual git history in packages would be much nicer (i.e., a git\n> bundle), but if that can't replace the patch as well, it's rather\n> unlikely to happen.\n\nDebian considered using Git as part of the 3.0 (git) format, but the\nproblem with that is that some upstreams include non-free or\nundistributable material in their repositories, and obviously Debian\ncan't distribute such software in main.  Tarballs can be repacked, but\nit's harder to rewrite Git history to exclude objects.\n\nI do think the idea is cool and it would be a neat application, but\ndistributing the source history of an upstream project is tricky for\nfor packagers for practical reasons.\n-- \nbrian m. carlson: Houston, Texas, US\n"}]}