1. 23 6月, 2006 1 次提交
    • J
      Merge branch 'jc/upload-corrupt' · 16bf4e1f
      Junio C Hamano 提交于
      * jc/upload-corrupt:
        daemon: send stderr to /dev/null instead of closing.
        upload-pack/fetch-pack: support side-band communication
        Retire git-clone-pack
        upload-pack: prepare for sideband message support.
        upload-pack: avoid sending an incomplete pack upon failure
      16bf4e1f
  2. 22 6月, 2006 10 次提交
  3. 21 6月, 2006 8 次提交
  4. 20 6月, 2006 12 次提交
    • F
      Remove all void-pointer arithmetic. · 1d7f171c
      Florian Forster 提交于
      ANSI C99 doesn't allow void-pointer arithmetic. This patch fixes this in
      various ways. Usually the strategy that required the least changes was used.
      Signed-off-by: NFlorian Forster <octo@verplant.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      1d7f171c
    • E
      git-svn: fix --rmdir when using SVN:: libraries · c07eee1f
      Eric Wong 提交于
      When tracking directories with nearly all of its files at
      the most nested levels, --rmdir would accidentally go too
      far when deleting.
      
      Of course, we'll add a test for this condition, too.
      
      Makefile: automatically run new tests as they appear in t/
      Signed-off-by: NEric Wong <normalperson@yhbt.net>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      c07eee1f
    • J
      git_config: access() returns 0 on success, not > 0 · e33d0611
      Johannes Schindelin 提交于
      Another late-night bug. Sorry again.
      Signed-off-by: NJohannes Schindelin <Johannes.Schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      e33d0611
    • J
      repo-config: Fix late-night bug · 92a28be0
      Johannes Schindelin 提交于
      This bug was hidden by the "future-proofing" of the test. Sigh.
      
      When neither GIT_CONFIG nor GIT_CONFIG_LOCAL is set, do not use NULL,
      but $GIT_DIR/config. Instead of using $GIT_DIR/config when only
      GIT_CONFIG_LOCAL is set. Sorry.
      Signed-off-by: NJohannes Schindelin <Johannes.Schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      92a28be0
    • L
      Add "named object array" concept · 1f1e895f
      Linus Torvalds 提交于
      We've had this notion of a "object_list" for a long time, which eventually
      grew a "name" member because some users (notably git-rev-list) wanted to
      name each object as it is generated.
      
      That object_list is great for some things, but it isn't all that wonderful
      for others, and the "name" member is generally not used by everybody.
      
      This patch splits the users of the object_list array up into two: the
      traditional list users, who want the list-like format, and who don't
      actually use or want the name. And another class of users that really used
      the list as an extensible array, and generally wanted to name the objects.
      
      The patch is fairly straightforward, but it's also biggish. Most of it
      really just cleans things up: switching the revision parsing and listing
      over to the array makes things like the builtin-diff usage much simpler
      (we now see exactly how many members the array has, and we don't get the
      objects reversed from the order they were on the command line).
      
      One of the main reasons for doing this at all is that the malloc overhead
      of the simple object list was actually pretty high, and the array is just
      a lot denser. So this patch brings down memory usage by git-rev-list by
      just under 3% (on top of all the other memory use optimizations) on the
      mozilla archive.
      
      It does add more lines than it removes, and more importantly, it adds a
      whole new infrastructure for maintaining lists of objects, but on the
      other hand, the new dynamic array code is pretty obvious. The change to
      builtin-diff-tree.c shows a fairly good example of why an array interface
      is sometimes more natural, and just much simpler for everybody.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      1f1e895f
    • J
      Restore SIGCHLD to SIG_DFL where we care about waitpid(). · f0b7367c
      Junio C Hamano 提交于
      It was reported that under one implementation of socks client
      "git clone" fails with "error: waitpid failed (No child processes)",
      because "git" is spawned after setting SIGCHLD to SIG_IGN.
      
      Arguably it may be a broken setting, but we should protect
      ourselves so that we can get reliable results from waitpid() for
      the children we care about.
      
      This patch resets SIGCHLD to SIG_DFL in three places:
      
       - connect.c::git_connect() - initiators of git native
         protocol transfer are covered with this.
      
       - daemon.c::main() - obviously.
      
       - merge-index.c::main() - obviously.
      
      There are other programs that do fork() but do not waitpid():
      http-push, imap-send.  upload-pack does not either, but in the
      case of that program, each of the forked halves runs exec()
      another program, so this change would not have much effect
      there.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      f0b7367c
    • J
      xdiff: minor changes to match libxdiff-0.21 · d281786f
      Junio C Hamano 提交于
      This reformats the change 621c53cc
      introduced to match what upstream author implemented in libxdiff-0.21
      without changing any logic (hopefully ;-).  This is to help keep
      us in sync with the upstream.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      d281786f
    • J
      fix rfc2047 formatter. · 0da46771
      Junio C Hamano 提交于
      Running git-format-patch on patches from Lukas destroyed
      the From: line.  This fixes it.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      0da46771
    • D
      Fix t8001-annotate and t8002-blame for ActiveState Perl · 0e26f7a1
      Dennis Stosberg 提交于
      There seems to be at least one implementation of Perl which requires the
      user to specify an extension for backup files.
      
      Reported by Alex Riesen.
      Signed-off-by: NDennis Stosberg <dennis@stosberg.net>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      0e26f7a1
    • L
      Add specialized object allocator · 855419f7
      Linus Torvalds 提交于
      This creates a simple specialized object allocator for basic
      objects.
      
      This avoids wasting space with malloc overhead (metadata and
      extra alignment), since the specialized allocator knows the
      alignment, and that objects, once allocated, are never freed.
      
      It also allows us to track some basic statistics about object
      allocations. For example, for the mozilla import, it shows
      object usage as follows:
      
           blobs:   627629 (14710 kB)
           trees:  1119035 (34969 kB)
         commits:   196423  (8440 kB)
            tags:     1336    (46 kB)
      
      and the simpler allocator shaves off about 2.5% off the memory
      footprint off a "git-rev-list --all --objects", and is a bit
      faster too.
      
      [ Side note: this concludes the series of "save memory in object storage".
        The thing is, there simply isn't much more to be saved on the objects.
      
        Doing "git-rev-list --all --objects" on the mozilla archive has a final
        total RSS of 131498 pages for me: that's about 513MB. Of that, the
        object overhead is now just 56MB, the rest is going somewhere else (put
        another way: the fact that this patch shaves off 2.5% of the total
        memory overhead, considering that objects are now not much more than 10%
        of the total shows how big the wasted space really was: this makes
        object allocations much more memory- and time-efficient).
      
        I haven't looked at where the rest is, but I suspect the bulk of it is
        just the pack-file loading. It may be that we should pack the tree
        objects separately from the blob objects: for git-rev-list --objects, we
        don't actually ever need to even look at the blobs, but since trees and
        blobs are interspersed in the pack-file, we end up not being dense in
        the tree accesses, so we end up looking at more pages than we strictly
        need to.
      
        So with a 535MB pack-file, it's entirely possible - even likely - that
        most of the remaining RSS is just the mmap of the pack-file itself. We
        don't need to map in _all_ of it, but we do end up mapping a fair
        amount. ]
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      855419f7
    • J
      Read configuration also from $HOME/.gitconfig · 5f1a63e0
      Johannes Schindelin 提交于
      This patch is based on Pasky's, with three notable differences:
      
      - I did not yet update the documentation
      - I named it .gitconfig, not .gitrc
      - git-repo-config does not barf when a unique key is overridden locally
      
      The last means that if you have something like
      
      	[alias]
      		l = log --stat -M
      
      in ~/.gitconfig, and
      
      	[alias]
      		l = log --stat -M next..
      
      in $GIT_DIR/config, then
      
      	git-repo-config alias.l
      
      returns only one value, namely the value from $GIT_DIR/config.
      
      If you set the environment variable GIT_CONFIG, $HOME/.gitconfig is not
      read, and neither $GIT_DIR/config, but $GIT_CONFIG instead.
      
      If you set GIT_CONFIG_LOCAL instead, it is interpreted instead of
      $GIT_DIR/config, but $HOME/.gitconfig is still read.
      Signed-off-by: NJohannes Schindelin <Johannes.Schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      5f1a63e0
    • J
      Fix setting config variables with an alternative GIT_CONFIG · 9c3796fc
      Johannes Schindelin 提交于
      When setting a config variable, git_config_set() ignored the variables
      GIT_CONFIG and GIT_CONFIG_LOCAL. Now, when GIT_CONFIG_LOCAL is set, it
      will write to that file. If not, GIT_CONFIG is checked, and only as a
      fallback, the change is written to $GIT_DIR/config.
      
      Add a test for it, and also future-proof the test for the upcoming
      $HOME/.gitconfig support.
      Signed-off-by: NJohannes Schindelin <Johannes.Schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      9c3796fc
  5. 19 6月, 2006 9 次提交