1. 08 Oct, 2010 1 commit
  2. 16 Aug, 2010 1 commit
  3. 22 Feb, 2010 1 commit
    • Linus Torvalds's avatar
      Move 'builtin-*' into a 'builtin/' subdirectory · 81b50f3c
      Linus Torvalds authored
      This shrinks the top-level directory a bit, and makes it much more
      pleasant to use auto-completion on the thing. Instead of
      
      	[torvalds@nehalem git]$ em buil<tab>
      	Display all 180 possibilities? (y or n)
      	[torvalds@nehalem git]$ em builtin-sh
      	builtin-shortlog.c     builtin-show-branch.c  builtin-show-ref.c
      	builtin-shortlog.o     builtin-show-branch.o  builtin-show-ref.o
      	[torvalds@nehalem git]$ em builtin-shor<tab>
      	builtin-shortlog.c  builtin-shortlog.o
      	[torvalds@nehalem git]$ em builtin-shortlog.c
      
      you get
      
      	[torvalds@nehalem git]$ em buil<tab>		[type]
      	builtin/   builtin.h
      	[torvalds@nehalem git]$ em builtin		[auto-completes to]
      	[torvalds@nehalem git]$ em builtin/sh<tab>	[type]
      	shortlog.c     shortlog.o     show-branch.c  show-branch.o  show-ref.c     show-ref.o
      	[torvalds@nehalem git]$ em builtin/sho		[auto-completes to]
      	[torvalds@nehalem git]$ em builtin/shor<tab>	[type]
      	shortlog.c  shortlog.o
      	[torvalds@nehalem git]$ em builtin/shortlog.c
      
      which doesn't seem all that different, but not having that annoying
      break in "Display all 180 possibilities?" is quite a relief.
      
      NOTE! If you do this in a clean tree (no object files etc), or using an
      editor that has auto-completion rules that ignores '*.o' files, you
      won't see that annoying 'Display all 180 possibilities?' message - it
      will just show the choices instead.  I think bash has some cut-off
      around 100 choices or something.
      
      So the reason I see this is that I'm using an odd editory, and thus
      don't have the rules to cut down on auto-completion.  But you can
      simulate that by using 'ls' instead, or something similar.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      81b50f3c
  4. 19 Sep, 2009 1 commit
  5. 30 Aug, 2008 1 commit
  6. 26 Mar, 2008 1 commit
  7. 22 Nov, 2007 1 commit
    • Johannes Schindelin's avatar
      bundle create: keep symbolic refs' names instead of resolving them · c5546e88
      Johannes Schindelin authored
      When creating a bundle, symbolic refs used to be resolved to the
      non-symbolic refs they point to before being written to the list
      of contained refs.  I.e. "git bundle create a1.bundle HEAD master"
      would show something like
      
      388afe7881b33102fada216dd07806728773c011        refs/heads/master
      388afe7881b33102fada216dd07806728773c011        refs/heads/master
      
      instead of
      
      388afe7881b33102fada216dd07806728773c011        HEAD
      388afe7881b33102fada216dd07806728773c011        refs/heads/master
      
      Introduce a special handling so that the symbolic refs are listed
      with the names passed on the command line.
      
      Noticed by Santi Béjar.
      Signed-off-by: Johannes Schindelin's avatarJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      c5546e88
  8. 19 Sep, 2007 1 commit
  9. 13 Aug, 2007 1 commit
  10. 11 Aug, 2007 4 commits
    • Mark Levedahl's avatar
      builtin-bundle - use buffered reads for bundle header · 21a02980
      Mark Levedahl authored
      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: default avatarMark Levedahl <mdl123@verizon.net>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      21a02980
    • Mark Levedahl's avatar
      builtin-bundle.c - use stream buffered input for rev-list · 442b67a5
      Mark Levedahl authored
      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: default avatarMark Levedahl <mdl123@verizon.net>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      442b67a5
    • Junio C Hamano's avatar
      allow git-bundle to create bottomless bundle · c06793a4
      Junio C Hamano 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: default avatarJunio C Hamano <gitster@pobox.com>
      c06793a4
    • Junio C Hamano's avatar
      allow git-bundle to create bottomless bundle · 7fa8254f
      Junio C Hamano 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: default avatarJunio C Hamano <gitster@pobox.com>
      7fa8254f
  11. 15 Jul, 2007 1 commit
  12. 16 May, 2007 1 commit
  13. 31 Mar, 2007 1 commit
    • Theodore Ts'o's avatar
      Rename warn() to warning() to fix symbol conflicts on BSD and Mac OS · 46efd2d9
      Theodore Ts'o authored
      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's avatar"Theodore Ts'o" <tytso@mit.edu>
      Cc: "Randal L. Schwartz" <merlyn@stonehenge.com>
      Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>
      46efd2d9
  14. 13 Mar, 2007 1 commit
  15. 12 Mar, 2007 1 commit
  16. 09 Mar, 2007 3 commits
  17. 08 Mar, 2007 2 commits
    • Johannes Schindelin's avatar
      git-bundle: Make thin packs · 9e64d109
      Johannes Schindelin authored
      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's avatarJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>
      9e64d109
    • Johannes Schindelin's avatar
      git-bundle: avoid packing objects which are in the prerequisites · 18449ab0
      Johannes Schindelin authored
      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's avatarJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>
      18449ab0
  18. 07 Mar, 2007 1 commit
  19. 06 Mar, 2007 4 commits
  20. 24 Feb, 2007 1 commit
  21. 23 Feb, 2007 4 commits
    • Johannes Schindelin's avatar
    • Johannes Schindelin's avatar
      git-bundle: avoid fork() in verify_bundle() · fb9a5415
      Johannes Schindelin authored
      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's avatarJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>
      fb9a5415
    • Johannes Schindelin's avatar
      git-bundle: assorted fixes · fa257b05
      Johannes Schindelin authored
      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's avatarJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>
      fa257b05
    • Johannes Schindelin's avatar
      Add git-bundle: move objects and references by archive · 2e0afafe
      Johannes Schindelin authored
      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's avatarJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>
      2e0afafe