1. 22 6月, 2006 7 次提交
  2. 21 6月, 2006 4 次提交
  3. 20 6月, 2006 10 次提交
    • 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
      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
  4. 19 6月, 2006 8 次提交
  5. 18 6月, 2006 11 次提交
    • R
      git-tar-tree: no more void pointer arithmetic · 6698060c
      Rene Scharfe 提交于
      Noticed by Florian Forster: Use a char pointer when adding offsets,
      because void pointer arithmetic is a GNU extension.   Const'ify the
      function arguments while we're at it.
      Signed-off-by: NRene Scharfe <rene.scharfe@lsrfire.ath.cx>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      6698060c
    • R
      git-tar-tree: documentation update · 9236cdd4
      Rene Scharfe 提交于
       * add example on how to avoid adding a global extended pax header
       * don't mention linux anymore, use git itself as an example instead
       * update to v1.4.0 ;-)
       * append missing :: to the examples
      Signed-off-by: NRene Scharfe <rene.scharfe@lsrfire.ath.cx>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      9236cdd4
    • R
      git-tar-tree: Simplify write_trailer() · 37958be7
      Rene Scharfe 提交于
      We can write the trailer in one or at most two steps; it will always
      fit within two blocks.  With the last caller of get_record() gone we
      can get rid of it.
      Signed-off-by: NRene Scharfe <rene.scharfe@lsrfire.ath.cx>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      37958be7
    • Y
      auto-detect changed prefix and/or changed build flags · ca3bcabf
      Yakov Lerner 提交于
      Detect changed prefix and/or changed build flags in the middle
      of the build (or between 'make' and 'make install'), and if change
      is detected, make sure all objects are compiled with same build
      flags and same prefix, thus avoiding inconsistent/broken build.
      
      [jc: removed otherwise unnecessary Makefile target to test the
       change this patch introduces. ]
      Signed-off-by: NYakov Lerner <iler.ml@gmail.com>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      ca3bcabf
    • E
      Fix git-format-patch -s · 6c4cca1c
      Eric W. Biederman 提交于
      When git-format-patch was converted to a builtin an appropriate call
      to setup_ident was missed and thus git-format-patch -s fails because
      it doesn't look up anything in the password file.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      6c4cca1c
    • L
      Some more memory leak avoidance · cb115748
      Linus Torvalds 提交于
      This is really the dregs of my effort to not waste memory in git-rev-list,
      and makes barely one percent of a difference in the memory footprint, but
      hey, it's also a pretty small patch.
      
      It discards the parent lists and the commit buffer after the commit has
      been shown by git-rev-list (and "git log" - which already did the commit
      buffer part), and frees the commit list entry that was used by the
      revision walker.
      
      The big win would be to get rid of the "refs" pointer in the object
      structure (another 5%), because it's only used by fsck. That would require
      some pretty major surgery to fsck, though, so I'm timid and did the less
      interesting but much easier part instead.
      
      This (percentually) makes a bigger difference to "git log" and friends,
      since those are walking _just_ commits, and thus the list entries tend to
      be a bigger percentage of the memory use. But the "list all objects" case
      does improve too.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      cb115748
    • L
      Move "void *util" from "struct object" into "struct commit" · d3ff6f55
      Linus Torvalds 提交于
      Every single user actually wanted this only for commit objects, and we
      have no reason to waste space on it for other object types. So just move
      the structure member from the low-level "struct object" into the "struct
      commit".
      
      This leaves the commit object the same size, and removes one unnecessary
      pointer from all other object allocations.
      
      This shrinks memory usage (still at a fairly hefty half-gig, admittedly)
      of "git-rev-list --all --objects" on the mozilla repo by another 5% in my
      tests.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      d3ff6f55
    • L
      Shrink "struct object" a bit · 885a86ab
      Linus Torvalds 提交于
      This shrinks "struct object" by a small amount, by getting rid of the
      "struct type *" pointer and replacing it with a 3-bit bitfield instead.
      
      In addition, we merge the bitfields and the "flags" field, which
      incidentally should also remove a useless 4-byte padding from the object
      when in 64-bit mode.
      
      Now, our "struct object" is still too damn large, but it's now less
      obviously bloated, and of the remaining fields, only the "util" (which is
      not used by most things) is clearly something that should be eventually
      discarded.
      
      This shrinks the "git-rev-list --all" memory use by about 2.5% on the
      kernel archive (and, perhaps more importantly, on the larger mozilla
      archive). That may not sound like much, but I suspect it's more on a
      64-bit platform.
      
      There are other remaining inefficiencies (the parent lists, for example,
      probably have horrible malloc overhead), but this was pretty obvious.
      
      Most of the patch is just changing the comparison of the "type" pointer
      from one of the constant string pointers to the appropriate new TYPE_xxx
      small integer constant.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      885a86ab
    • J
      Merge early part of branch 'jc/fetchupload' · 210a0be5
      Junio C Hamano 提交于
      210a0be5
    • J
      Merge branch 'jc/rw-prefix' · 75c3a5cc
      Junio C Hamano 提交于
      * jc/rw-prefix:
        read-tree: reorganize bind_merge code.
        write-tree: --prefix=<path>
        read-tree: --prefix=<path>/ option.
      75c3a5cc
    • J
      Merge branch 'pe/date' · 8c278abc
      Junio C Hamano 提交于
      * pe/date:
        date.c: improve guess between timezone offset and year.
      8c278abc