Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Sep 19, 2009
  1. @gitster

    Update the usage bundle string.

    Thiago Farina authored gitster committed
    "git bundle -h" gives a single long line that is hard to read.  Rewrite it
    into a multi-line format similar to the one used by other commands, e.g
    "git stash -h".
    
    Signed-off-by: Thiago Farina <tfransosi@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 30, 2008
  1. @heikkiorsila @gitster

    Start conforming code to "git subcmd" style

    heikkiorsila authored gitster committed
    User notifications are presented as 'git cmd', and code comments
    are presented as '"cmd"' or 'git's cmd', rather than 'git-cmd'.
    
    Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 26, 2008
  1. @szeder @gitster

    Always set *nongit_ok in setup_git_directory_gently()

    szeder authored gitster committed
    setup_git_directory_gently() only modified the value of its *nongit_ok
    argument if we were not in a git repository.  Now it will always set it
    to 0 when we are inside a repository.
    
    Also remove now unnecessary initializations in the callers of this
    function.
    
    Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Sep 19, 2007
  1. @dscho @gitster

    Move bundle specific stuff into bundle.[ch]

    dscho authored gitster committed
    The transport specific stuff was moved into libgit.a, and the
    bundle specific stuff will not be left behind.
    
    This is a big code move, with one exception: the function
    unbundle() no longer outputs the list of refs.  You have to call
    list_bundle_refs() yourself for that.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 13, 2007
  1. @gitster

    builtin-bundle create - use lock_file

    gitster authored
    "git bundle create" left an invalid, partially written bundle if
    an error occured during creation.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 11, 2007
  1. @mark987 @gitster

    builtin-bundle - use buffered reads for bundle header

    mark987 authored gitster committed
    This eliminates all use of byte-at-a-time reading of data in this
    function: as Junio noted, a bundle file is seekable so we can
    reset the file position to the first part of the pack-file using lseek
    after reading the header.
    
    Signed-off-by: Mark Levedahl <mdl123@verizon.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @mark987 @gitster

    builtin-bundle.c - use stream buffered input for rev-list

    mark987 authored gitster committed
    git-bundle create on cygwin was nearly unusable due to 1 character
    at a time (unbuffered) reading from an exec'ed process. Fix by using
    fdopen to get a buffered stream.
    
    Results for "time git bundle create test.bdl v1.0.3..v1.5.2" are:
    
    before this patch:
             cygwin         linux
    real    1m38.828s      0m3.578s
    user    0m12.122s      0m2.896s
    sys     1m28.215s      0m0.692s
    
    after this patch:
    real    0m3.688s       0m2.835s
    user    0m3.075s       0m2.731s
    sys     0m1.075s       0m0.149s
    
    Signed-off-by: Mark Levedahl <mdl123@verizon.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @gitster

    allow git-bundle to create bottomless bundle

    gitster authored
    Mark Levedahl <mlevedahl@gmail.com> writes:
    
    > Junio C Hamano wrote:
    >> While "git bundle" was a useful way to sneakernet incremental
    >> changes, we did not allow:
    >>
    > Thanks - I've been thinking for months I could fix this bug, never
    > figured it out and didn't want to nag Dscho one more time. I confirm
    > that this allows creation of bundles with arbitrary refs, not just
    > those under refs/heads. Yahoo!
    
    Actually, there is another bug nearby.
    
    If you do:
    
    	git bundle create v2.6-20-v2.6.22.bndl v2.6.20..v2.6.22
    
    the bundle records that it requires v2.6.20^0 commit (correct)
    and gives you tag v2.6.22 (incorrect); the bug is that the
    object it lists in fact is the commit v2.6.22^0, not the tag.
    
    This is because the revision range operation .. is always about
    set of commits, but the code near where my patch touches does
    not validate that the sha1 value obtained from dwim_ref()
    against the commit object name e->item->sha1 before placing the
    head information in the commit.
    
    The attached patch attempts to fix this problem.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. @gitster

    allow git-bundle to create bottomless bundle

    gitster authored
    While "git bundle" was a useful way to sneakernet incremental
    changes, we did not allow:
    
    	$ git bundle create v2.6.20.bndl v2.6.20
    
    to create a bundle that contains the whole history to a
    well-known good revision.  Such a bundle can be mirrored
    everywhere, and people can prime their repository with it to
    reduce the load on the repository that serves near the tip of
    the development.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 15, 2007
  1. @gitster

    Make every builtin-*.c file #include "builtin.h"

    Peter Hagervall authored gitster committed
    Make every builtin-*.c file #include "builtin.h".
    
    Also takes care of some declaration/definition mismatches.
    
    Signed-off-by: Peter Hagervall <hager@cs.umu.se>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on May 16, 2007
  1. @jherland

    Ensure return value from xread() is always stored into an ssize_t

    jherland authored Junio C Hamano committed
    This patch fixes all calls to xread() where the return value is not
    stored into an ssize_t. The patch should not have any effect whatsoever,
    other than putting better/more appropriate type names on variables.
    
    Signed-off-by: Johan Herland <johan@herland.net>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Mar 31, 2007
  1. @tytso

    Rename warn() to warning() to fix symbol conflicts on BSD and Mac OS

    tytso authored Junio C Hamano committed
    This fixes a problem reported by Randal Schwartz:
    
    >I finally tracked down all the (albeit inconsequential) errors I was getting
    >on both OpenBSD and OSX.  It's the warn() function in usage.c.  There's
    >warn(3) in BSD-style distros.  It'd take a "great rename" to change it, but if
    >someone with better C skills than I have could do that, my linker and I would
    >appreciate it.
    
    It was annoying to me, too, when I was doing some mergetool testing on
    Mac OS X, so here's a fix.
    
    Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
    Cc: "Randal L. Schwartz" <merlyn@stonehenge.com>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Mar 13, 2007
  1. @spearce

    Replace fork_with_pipe in bundle with run_command

    spearce authored Junio C Hamano committed
    Now that the run_command family supports all of the redirection
    modes needed by builtin-bundle, we can use those functions rather
    than the underlying POSIX primitives.  This should help to make the
    bundle command slightly more portable to other systems, like Windows.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Mar 12, 2007
  1. @dscho

    git-bundle: only die if pack would be empty, warn if ref is skipped

    dscho authored Junio C Hamano committed
    A use case for git-bundle expected to be quite common is this:
    
    	$ git bundle create daily.bundle --since=10.days.ago --all
    
    The expected outcome is _not_ to error out if only a couple of the
    refs were not changed during the last 10 days.
    
    This patch complains loudly about refs which are skipped due to the
    pack not containing the corresponding objects, but dies only if
    no objects would be in the pack _at all_.
    
    Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Mar 9, 2007
  1. @dscho

    git-bundle: prevent overwriting existing bundles

    dscho authored Junio C Hamano committed
    Not only does it prevent accidentally losing older bundles, but it
    also fixes a subtle bug: when writing into an existing bundle,
    git-pack-objects would not truncate the bundle. Therefore,
    fetching from the bundle would trigger an error in unpack-objects:
    "fatal: pack has junk at the end".
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  2. @dscho

    git-bundle: die if a given ref is not included in bundle

    dscho authored Junio C Hamano committed
    The earlier patch tried to be nice by just warning, but it seems
    more likely that the user wants to adjust the parameters.
    
    Also, it prevents a bundle containing _all_ revisions in the case
    when the user only gave one ref, but also rev-list options which
    excluded the ref.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  3. @dscho

    git-bundle: handle thin packs in subcommand "unbundle"

    dscho authored Junio C Hamano committed
    The patch to make the packs in a bundle thin forgot the receiving side.
    D'oh.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Mar 8, 2007
  1. @dscho

    git-bundle: Make thin packs

    dscho authored Junio C Hamano committed
    Thin packs are way smaller, but they rely on the receiving end to have the
    base objects. However, Git's pack protocol also uses thin packs by
    default. So make the packs contained in bundles thin, since bundles are
    just another transport.
    
    The patch looks a bit bigger than intended, mainly because --thin
    _implies_ that pack-objects should run its own rev-list. Therefore, this
    patch removes all the stuff we used to roll rev-list ourselves.
    
    This commit also changes behaviour slightly: since we now know early
    enough if a specified ref is _not_ contained in the pack, we can avoid
    putting that ref into the pack. So, we don't die() here, but warn()
    instead, and skip that ref.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  2. @dscho

    git-bundle: avoid packing objects which are in the prerequisites

    dscho authored Junio C Hamano committed
    When saying something like "--since=1.day.ago" or "--max-count=5",
    git-bundle finds the boundary commits which are recorded as
    prerequisites. However, it failed to tell pack-objects _not_ to
    pack the objects which are in these.
    
    Fix that. And add a test for that.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Mar 7, 2007
  1. @dscho

    bundle: fix wrong check of read_header()'s return value & add tests

    dscho authored Junio C Hamano committed
    If read_header() fails, it returns <0, not 0. Further, an open(/dev/null)
    was not checked for errors.
    
    Also, this adds two tests to make sure that the bundle file looks
    correct, by checking if it has the header has the expected form, and that
    the pack contains the right amount of objects.
    
    Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Mar 6, 2007
  1. git-bundle: make verify a bit more chatty.

    Junio C Hamano authored
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  2. git-bundle: various fixups

    Junio C Hamano authored
    verify_bundle() returned with an error early only when all
    prerequisite commits were missing.  It should error out much
    earlier when some are missing.
    
    When the rev-list is limited in ways other than revision range
    (e.g. --max-count or --max-age), create_bundle() listed all
    positive refs given from the command line as if they are
    available, but resulting pack may not have some of them.  Add a
    logic to make sure all of them are included, and error out
    otherwise.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  3. revision traversal: retire BOUNDARY_SHOW

    Junio C Hamano authored
    This removes the flag internally used by revision traversal to
    decide which commits are indeed boundaries and renames it to
    CHILD_SHOWN.  builtin-bundle uses the symbol for its
    verification, but I think the logic it uses it is wrong.  The
    flag is still useful but it is local to the git-bundle, so it is
    renamed to PREREQ_MARK.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  4. git-bundle: fix pack generation.

    Junio C Hamano authored
    The handcrafted built-in rev-list lookalike forgot to mark the trees
    and blobs contained in the boundary commits uninteresting, resulting
    in unnecessary objects in the pack.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Feb 24, 2007
  1. bundle: reword missing prerequisite error message

    Junio C Hamano authored
    As suggested by Mark Levedahl.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Feb 23, 2007
  1. @dscho

    git-bundle: record commit summary in the prerequisite data

    dscho authored Junio C Hamano committed
  2. @dscho

    git-bundle: avoid fork() in verify_bundle()

    dscho authored Junio C Hamano committed
    We can use the revision walker easily for checking if the
    prerequisites are met, instead of fork()ing off a rev-list,
    which would list only the first unmet prerequisite.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  3. @dscho

    git-bundle: assorted fixes

    dscho authored Junio C Hamano committed
    This patch fixes issues mentioned by Junio, Nico and Simon:
    
    - I forgot to convert the usage string when removing the "--" from
      the subcommands,
    - a style fix in the bundle_header,
    - use xread() instead of read(),
    - use write_or_die() instead of write(),
    - make the bundle header extensible,
    - fail if the whitespace after a sha1 of a reference is missing,
    - close() the fds passed to a subprocess,
    - in verify_bundle(), do not use "rev-list --stdin", but rather
      pass the revs directly (avoiding a fork()),
    - fix a corrupted comment in show_object(), and
    - fix the size check in index_pack.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  4. @dscho

    Add git-bundle: move objects and references by archive

    dscho authored Junio C Hamano committed
    Some workflows require use of repositories on machines that cannot be
    connected, preventing use of git-fetch / git-push to transport objects and
    references between the repositories.
    
    git-bundle provides an alternate transport mechanism, effectively allowing
    git-fetch and git-pull to operate using sneakernet transport. `git-bundle
    create` allows the user to create a bundle containing one or more branches
    or tags, but with specified basis assumed to exist on the target
    repository. At the receiving end, git-bundle acts like git-fetch-pack,
    allowing the user to invoke git-fetch or git-pull using the bundle file as
    the URL. git-fetch and git-ls-remote determine they have a bundle URL by
    checking that the URL points to a file, but are otherwise unchanged in
    operation with bundles.
    
    The original patch was done by Mark Levedahl <mdl123@verizon.net>.
    
    It was updated to make git-bundle a builtin, and get rid of the tar
    format: now, the first line is supposed to say "# v2 git bundle", the next
    lines either contain a prerequisite ("-" followed by the hash of the
    needed commit), or a ref (the hash of a commit, followed by the name of
    the ref), and finally the pack. As a result, the bundle argument can be
    "-" now.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Something went wrong with that request. Please try again.