1. 16 9月, 2005 13 次提交
    • L
      [PATCH] Re-organize "git-rev-list --objects" logic · 5bdbaaa4
      Linus Torvalds 提交于
      The logic to calculate the full object list used to be very inter-twined
      with the logic that looked up the commits.
      
      For no good reason - it's actually a lot simpler to just do that logic
      as a separate pass.
      
      This improves performance a bit, and uses slightly less memory in my
      tests, but more importantly it makes the code simpler to work with and
      follow what it does.
      
      The performance win is less than I had hoped for, but I get:
      
      Before:
      
      	[torvalds@g5 linux]$ /usr/bin/time git-rev-list --objects v2.6.12..HEAD | wc -l
      	13.64user 0.42system 0:14.13elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
      	0inputs+0outputs (0major+47947minor)pagefaults 0swaps
      	58945
      
      After:
      
      	[torvalds@g5 linux]$ /usr/bin/time git-rev-list --objects v2.6.12..HEAD | wc -l
      	11.80user 0.36system 0:12.16elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
      	0inputs+0outputs (0major+42684minor)pagefaults 0swaps
      	58945
      
      ie it improved by 2 seconds, and took a 5000+ fewer pages (hey, that's
      20MB out of 174MB to go). And got the same number of objects (in theory,
      the more expensive one might find some more shared objects to avoid. In
      practice it obviously doesn't).
      
      I know how to make it use _lots_ less memory, which will probably speed it
      up. But that's for another time, and I'd prefer to see this go in first.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      5bdbaaa4
    • J
      Plug diff leaks. · 5098bafb
      Junio C Hamano 提交于
      It is a bit embarrassing that it took this long for a fix since the
      problem was first reported on Aug 13th.
      
          Message-ID: <87y876gl1r.wl@mail2.atmark-techno.com>
          From: Yasushi SHOJI <yashi@atmark-techno.com>
          Newsgroups: gmane.comp.version-control.git
          Subject: [patch] possible memory leak in diff.c::diff_free_filepair()
          Date: Sat, 13 Aug 2005 19:58:56 +0900
      
      This time I used valgrind to make sure that it does not overeagerly
      discard memory that is still being used.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      5098bafb
    • J
    • L
      [PATCH] Avoid wasting memory in git-rev-list · 60ab26de
      Linus Torvalds 提交于
      As pointed out on the list, git-rev-list can use a lot of memory.
      
      One low-hanging fruit is to free the commit buffer for commits that we
      parse. By default, parse_commit() will save away the buffer, since a lot
      of cases do want it, and re-reading it continually would be unnecessary.
      However, in many cases the buffer isn't actually necessary and saving it
      just wastes memory.
      
      We could just free the buffer ourselves, but especially in git-rev-list,
      we actually end up using the helper functions that automatically add
      parent commits to the commit lists, so we don't actually control the
      commit parsing directly.
      
      Instead, just make this behaviour of "parse_commit()" a global flag.
      Maybe this is a bit tasteless, but it's very simple, and it makes a
      noticable difference in memory usage.
      
      Before the change:
      
      	[torvalds@g5 linux]$ /usr/bin/time git-rev-list v2.6.12..HEAD > /dev/null
      	0.26user 0.02system 0:00.28elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
      	0inputs+0outputs (0major+3714minor)pagefaults 0swaps
      
      after the change:
      
      	[torvalds@g5 linux]$ /usr/bin/time git-rev-list v2.6.12..HEAD > /dev/null
      	0.26user 0.00system 0:00.27elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
      	0inputs+0outputs (0major+2433minor)pagefaults 0swaps
      
      note how the minor faults have decreased from 3714 pages to 2433 pages.
      That's all due to the fewer anonymous pages allocated to hold the comment
      buffers and their metadata.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      60ab26de
    • J
      Be more backward compatible with git-ssh-{push,pull}. · f71a69ab
      Junio C Hamano 提交于
      HPA reminded me that these programs knows about the name of the
      counterpart on the other end and simply symlinking the old name to
      new name locally would not be enough.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      f71a69ab
    • H
      [PATCH] rsh.c env and quoting cleanup, take 2 · 0de68d28
      H. Peter Anvin 提交于
      This patch does proper quoting, and uses "env" to be compatible with
      tcsh.  As a side benefit, I believe the code is a lot cleaner to read.
      
      [jc: I am accepting this not because I necessarily agree with the
       quoting approach taken by it, but because (1) the code is only used
       by ssh-fetch/ssh-upload pair which I do not care much about (if you
       have ssh account on the remote end you should be using git-send-pack
       git-fetch-pack pair over ssh anyway), and (2) HPA is one of the more
       important customers belonging to the Linux kernel community and I
       want to help his workflow -- which includes not wasting his time by
       asking him to switch to git-send-pack/git-fetch-pack pair, nor to use
       a better shell ;-).  I might not have taken this patch if it mucked
       with git_connect in connect.c in its current form.]
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      0de68d28
    • D
      [PATCH] Fix fetch completeness assumptions · 22c6e1d0
      Daniel Barkalow 提交于
      Don't assume that any commit we have is complete; assume that any ref
      we have is complete.
      Signed-off-by: NDaniel Barkalow <barkalow@iabervon.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      22c6e1d0
    • S
      [PATCH] Document git-fetch options · 61420a2c
      Sergey Vlasov 提交于
      Add documentation for git-fetch options
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      61420a2c
    • J
      Unoptimize info/refs creation. · 60d0526a
      Junio C Hamano 提交于
      The code did not catch the case where you removed an existing ref
      without changing anything else.  We are not talking about hundreds of
      refs anyway, so remove that optimization.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      60d0526a
    • J
      Retire info/rev-cache · 0f56479d
      Junio C Hamano 提交于
      It was one of those things that were well intentioned but did not turn
      out to be useful in practice.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      0f56479d
    • P
      [PATCH] Use '-d' as the first flag to 'install' · 53764ee4
      Peter Eriksen 提交于
      ... in order to please Solaris 'install'.  GNU install is not harmed
      with this.
      
      [jc: Documentation/Makefile also fixed.]
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      53764ee4
    • S
      [PATCH] git-http-fetch: Allow caching of retrieved objects by proxy servers · 1db69b57
      Sergey Vlasov 提交于
      By default the curl library adds "Pragma: no-cache" header to all
      requests, which disables caching by proxy servers.  However, most
      files in a GIT repository are immutable, and caching them is safe and
      could be useful.
      
      This patch removes the "Pragma: no-cache" header from requests for all
      files except the pack list (objects/info/packs) and references
      (refs/*), which are really mutable and should not be cached.
      Signed-off-by: NSergey Vlasov <vsu@altlinux.ru>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      (cherry picked from 3b2a4c46fd5093ec79fb60e1b14b8d4a58c74612 commit)
      1db69b57
    • J
      git-branch -d <branch>: delete unused branch. · ba65af9c
      Junio C Hamano 提交于
      The new flag '-d' lets you delete a branch.  For safety, it does not
      lets you delete the branch you are currently on, nor a branch that
      has been fully merged into your current branch.
      
      The credit for the safety check idea goes to Daniel Barkalow.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      ba65af9c
  2. 15 9月, 2005 2 次提交
  3. 14 9月, 2005 10 次提交
  4. 13 9月, 2005 15 次提交