1. 16 9月, 2005 10 次提交
    • 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 17 次提交
  5. 12 9月, 2005 1 次提交
    • J
      Use int instead of socklen_t · 7fa09084
      Junio C Hamano 提交于
      This should work around the compilation problem Johannes Schindelin
      and others had on Mac OS/X.
      
      Quoting Linus:
      
          Any operating system where socklen_t is anything else than "int" is
          terminally broken. The people who introduced that typedef were confused,
          and I actually had to argue with them that it was fundamentally wrong:
          there is no other valid type than "int" that makes sense for it.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      7fa09084