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

Re: [PATCH] Add git-bundle: move objects and references by archive.

From
Shawn O. Pearce <spearce@spearce.org>
Date
Feb 19, 2007, 07:56 UTC
Message-ID
<20070219075654.GB30030@spearce.org>
In-Reply-To
<Pine.LNX.4.63.0702190126220.22628@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> On Sun, 18 Feb 2007, Mark Levedahl wrote:
> > +    gitrevargs=$(git-rev-parse --symbolic --revs-only $args) || exit 1
> 
> Here, you rely again on the refs not containing spaces.
They cannot.  OK, they can if you avoid any of the Git code:
  git rev-parse HEAD >".git/refs/heads/ref with space"
but a lot of things downstream may get annoyed by doing this.
Spaces are not permitted in ref names.
 
Show 7 quoted lines
> > +    # create refs and pack
> > +    tmp="$GIT_DIR/bundle_tmp$$"
> 
> Should we really rely on $GIT_DIR being writable? For unbundling, yes, but 
> for bundling? Given the great confusion with git-status trying to write 
> into $GIT_DIR, and people _demanding_ that it does not do so, I recommend 
> against that.

I agree. For an application like bundle creation, $GIT_DIR should be strictly read-only. There is no reason for this application to need to create temporary files, as the bundle can be streamed to stdout (or optionally to a file supplied by the user on the command line).

Show 5 quoted lines
> > +    git-rev-list --objects $fullrevargs | cut -b-40 |
> > +        git pack-objects --all-progress --stdout > "$pack" &&
> 
> pack-objects can take rev-list arguments itself these days, using "--revs" 
> and being piped the rev-list arguments.
Uh, actually it can't.  I thought it could too.  It doesn't.
It can only take a ref name or --not.  I'm actually not sure why
we limited it like that, but we did...  It may be a good idea to
change that restriction to not exist.
 
-- 
Shawn.
Previous: Johannes SchindelinNext: Mark Levedahl
Message 5 of 8 in “Add git-bundle: move objects and references by archive.”
  1. Add git-bundle: move objects and references by archive.Mark Levedahl, Feb 18, 2007
  2. Johannes SchindelinFeb 19, 2007
  3. Junio C HamanoFeb 19, 2007
  4. Johannes SchindelinFeb 19, 2007
  5. Shawn O. PearceFeb 19, 2007
  6. Mark LevedahlFeb 19, 2007
  7. Johannes SchindelinFeb 19, 2007
  8. Junio C HamanoFeb 19, 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.