From: Masaya Suzuki <email@example.com> To: Junio C Hamano <firstname.lastname@example.org> Cc: Git Mailing List <email@example.com> Subject: Re: [PATCH v3] doc: describe Git bundle format Date: Fri, 7 Feb 2020 14:21:37 -0800 Message-ID: <CAJB1erVZ5E6FxtD8gJXXpzJjquvksLxpz+h1TzG52Yr9DFmDRQ@mail.gmail.com> (raw) In-Reply-To: <firstname.lastname@example.org> On Fri, Feb 7, 2020 at 12:59 PM Junio C Hamano <email@example.com> wrote: > > Masaya Suzuki <firstname.lastname@example.org> writes: > > > On Fri, Feb 7, 2020 at 12:42 PM Masaya Suzuki <email@example.com> wrote: > >> +=== Note on the shallow clone and a Git bundle > >> + > >> +Note that the prerequisites does not represent a shallow-clone boundary. The > > > > the prerequisites do not > > Grammo aside, I am not sure if that particular Note is beneficial to > begin with. I would imagine that you can get a bundle that holds > all the objects in a shallow repository by specifying the range that > match the shallow-clone boundary when you run "git bundle create" > while disabling thin-pack generation. Yes. The reason that I've been trying to check the semantics of the prerequisites is that I DO recognize that this is possible format-wise. I'm not sure if this Git implementation can create such bundles, but format-wise such bundles can be created. When writing a Git bundle parser in other implementations (like JGit), it's not clear whether, as a library, I should support such use cases. If such usage is supported in the format, then the semantics of the prerequisites changes. Currently the prerequisites are defined as the objects that are NOT included in the bundle, and the reader of the bundle MUST already have, in order to use the data in the bundle. If the format supports shallow-cloned repository, this will be defined as the objects that are NOT included in the bundle. If the reader wants to read this bundle as if it's a non-shallow clone, the reader of the bundle MUST have the objects that are reachable from these prerequisites. If the reader wants to read this bundle as if it's a shallow clone, the reader MUST treat these as a shallow boundary. Also, this change will put further restrictions on the pack. "Pack" is the pack data stream "git fetch" would send. If the writer of a bundle wants to write as a shallow-clone pack, the pack MUST NOT reference objects outside of the shallow boundary from the pack file as a delta base. The writer MAY reference the commit objects outside of the shallow boundary as a parent. The readers and the writers of bundles MUST communicate whether a bundle represents a shallow clone repository in other means. The bundle file does not have any indicator whether it's a shallow clone bundle or not. > The support of shallow-clone by Git may be incomplete and it may not > be easy to form such a range, and "git bundle create" command may > not have a knob to disable thin-pack generation, but that does not > mean that the bundle *format* cannot be used to represent the > shallow boundary. As I wrote above, if this bundle format supports the shallow clone state, the semantics will change and writers and readers have different constraints on the packs. In order to do so, the readers and the writers have to agree whether it's a shallow clone or not in other mean since the bundle file doesn't have such indicators. I think it's better to prohibit such use cases (or at least make it as unintended usage), and then create a different bundle format version that supports shallow clone boundary (so that the bundle file can be more close to the frozen git-fetch response).
next prev parent reply other threads:[~2020-02-07 22:21 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-01-30 22:58 [PATCH] " Masaya Suzuki 2020-01-31 13:56 ` Johannes Schindelin 2020-01-31 20:38 ` Junio C Hamano 2020-01-31 21:49 ` Masaya Suzuki 2020-01-31 23:01 ` Junio C Hamano 2020-01-31 23:57 ` Masaya Suzuki 2020-02-04 18:20 ` Junio C Hamano 2020-01-31 22:18 ` [PATCH v2] " Masaya Suzuki 2020-01-31 23:06 ` Junio C Hamano 2020-02-07 20:42 ` [PATCH v3] " Masaya Suzuki 2020-02-07 20:44 ` Masaya Suzuki 2020-02-07 20:59 ` Junio C Hamano 2020-02-07 22:21 ` Masaya Suzuki [this message] 2020-02-08 1:49 ` Junio C Hamano 2020-02-12 22:13 ` Masaya Suzuki 2020-02-12 22:43 ` Junio C Hamano
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: http://vger.kernel.org/majordomo-info.html * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CAJB1erVZ5E6FxtD8gJXXpzJjquvksLxpz+h1TzG52Yr9DFmDRQ@mail.gmail.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
email@example.com list mirror (unofficial, one of many) This inbox may be cloned and mirrored by anyone: git clone --mirror https://public-inbox.org/git git clone --mirror http://ou63pmih66umazou.onion/git git clone --mirror http://czquwvybam4bgbro.onion/git git clone --mirror http://hjrcffqmbrq6wope.onion/git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V1 git git/ https://public-inbox.org/git \ firstname.lastname@example.org public-inbox-index git Example config snippet for mirrors. Newsgroups are available over NNTP: nntp://news.public-inbox.org/inbox.comp.version-control.git nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git nntp://news.gmane.io/gmane.comp.version-control.git note: .onion URLs require Tor: https://www.torproject.org/ code repositories for the project(s) associated with this inbox: https://80x24.org/mirrors/git.git AGPL code for this site: git clone https://public-inbox.org/public-inbox.git