1. 20 6月, 2006 5 次提交
    • 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
  2. 19 6月, 2006 7 次提交
  3. 18 6月, 2006 17 次提交
  4. 17 6月, 2006 11 次提交
    • L
      gitweb.cgi history not shown · 9202434c
      Linus Torvalds 提交于
      This does:
      
       - add a "rev.simplify_history" flag which defaults to on
       - it turns it off for "git whatchanged" (which thus now has real
         semantics outside of "git log")
       - it adds a command line flag ("--full-history") to turn it off for
         others (ie you can make "git log" and "gitk" etc get the semantics if
         you want to.
      
      Now, just as an example of _why_ you really really really want to simplify
      history by default, apply this patch, install it, and try these two
      command lines:
      
      	gitk --full-history -- git.c
      	gitk -- git.c
      
      and compare the output.
      
      So with this, you can also now do
      
      	git whatchanged -p -- gitweb.cgi
      	git log -p --full-history -- gitweb.cgi
      
      and it will show the old history of gitweb.cgi, even though it's not
      relevant to the _current_ state of the name "gitweb.cgi"
      
      NOTE NOTE NOTE! It will still actually simplify away merges that didn't
      change anything at all into either child. That creates these bogus strange
      discontinuities if you look at it with "gitk" (look at the --full-history
      gitk output for git.c, and you'll see a few strange cases).
      
      So the whole "--parent" thing ends up somewhat bogus with --full-history
      because of this, but I'm not sure it's worth even worrying about. I don't
      think you'd ever want to really use "--full-history" with the graphical
      representation, I just give it as an example exactly to show _why_ doing
      so would be insane.
      
      I think this is trivial enough and useful enough to be worth merging into
      the stable branch.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      9202434c
    • P
      bfbd0bb6
    • F
      gitweb: Make the `blame' interface in gitweb optional. · 5996ca08
      Florian Forster 提交于
      Since `git-annotate' is an expensive operation to run it may be
      desirable to deactivate this functionality. This patch introduces
      the `gitweb.blame' option to git-repo-config and disables the blame
      support by default.
      Signed-off-by: NFlorian Forster <octo@verplant.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      5996ca08
    • F
      gitweb: Adding a `blame' interface. · e34ef621
      Florian Forster 提交于
      This patch adds an interface for `git-blame' to `gitweb.cgi'.
      Links to it are placed in `git_blob'.
      
      Internally the code uses `git-annotate' because `git-blame's output
      differs for files that have been renamed in the past. However, I like
      the term `blame' better.
      
      [jc: blame can be told to produce the compatible format btw...]
      Signed-off-by: NFlorian Forster <octo@verplant.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      e34ef621
    • M
      cvsimport: keep one index per branch during import · 8f732649
      Martin Langhoff 提交于
      With this patch we have a speedup and much lower IO when
      importing trees with many branches. Instead of forcing
      index re-population for each branch switch, we keep
      many index files around, one per branch.
      Signed-off-by: NMartin Langhoff <martin@catalyst.net.nz>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      8f732649
    • M
      cvsimport: complete the cvsps run before starting the import · 2f57c697
      Martin Langhoff 提交于
      We now capture the output of cvsps to a tempfile, and then read it in.
      cvsps 2.1 works quite a bit "in memory", and only prints its patchset
      info once it has finished talking with cvs, but apparently retaining
      all that memory allocation. With this patch, cvsps is finished and
      reaped before cvsimport start working (and growing). So the footprint
      of the whole process is much lower.
      Signed-off-by: NMartin Langhoff <martin@catalyst.net.nz>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      2f57c697
    • M
      cvsimport: ignore CVSPS_NO_BRANCH and impossible branches · 71b08148
      Martin Langhoff 提交于
      cvsps output often contains references to CVSPS_NO_BRANCH, commits
      that it could not trace to a branch. Ignore that branch.
      
      Additionally, cvsps will sometimes draw circular relationships
      between branches -- where two branches are recorded as opening
      from the other.  In those cases, and where the ancestor branch
      hasn't been seen, ignore it.
      Signed-off-by: NMartin Langhoff <martin@catalyst.net.nz>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      71b08148
    • F
      blame: Add --time to produce raw timestamps · b19ee24b
      Fredrik Kuivinen 提交于
      fix the usage string and clean up the docs while we are at it
      Signed-off-by: NFredrik Kuivinen <freku045@student.liu.se>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      b19ee24b
    • J
      fix git alias · d8498500
      Junio C Hamano 提交于
      When extra command line arguments are given to a command that
      was alias-expanded, the code generated a wrong argument list,
      leaving the original alias in the result, and forgetting to
      terminate the new argv list.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      d8498500
    • S
      Add a "--notags" option for git-p4import. · ada7781d
      Sean 提交于
      P4import currently creates a git tag for every commit it imports.
      When importing from a large repository too many tags can be created
      for git to manage, so this provides an option to shut that feature
      off if necessary.
      Signed-off-by: NSean Estabrooks <seanlkml@sympatico.ca>
      ada7781d
    • J
      Merge git://git.bogomips.org/git-svn · 5b139a66
      Junio C Hamano 提交于
      * git://git.bogomips.org/git-svn: (25 commits)
        git-svn: rebuild convenience and bugfixes
        git-svn: svn (command-line) 1.0.x compatibility
        git-svn: tests no longer fail if LC_ALL is not a UTF-8 locale
        git-svn: bugfix and optimize the 'log' command
        git-svn: Eliminate temp file usage in libsvn_get_file()
        git-svn: fix several small bugs, enable branch optimization
        git-svn: avoid creating some small files
        git-svn: make the $GIT_DIR/svn/*/revs directory obsolete
        git-svn: add support for Perl SVN::* libraries
        git-svn: add 'log' command, a facsimile of basic `svn log'
        git-svn: add UTF-8 message test
        git-svn: add some functionality to better support branches in svn
        git-svn: add --shared and --template= options to pass to init-db
        git-svn: add --repack and --repack-flags= options
        git-svn: minor cleanups, extra error-checking
        git-svn: Move all git-svn-related paths into $GIT_DIR/svn
        git-svn: support manually placed initial trees from fetch
        git-svn: optimize --branch and --branch-all-ref
        git-svn: --branch-all-refs / -B support
        git-svn: support -C<num> passing to git-diff-tree
        ...
      5b139a66