1. 02 3月, 2012 2 次提交
  2. 24 2月, 2012 3 次提交
    • T
      t5704: match tests to modern style · 8a557bb7
      Thomas Rast 提交于
      The test did not adhere to the current style on several counts:
      
       . empty lines around the test blocks, but within the test string
       . ': > file' or even just '> file' with an extra space
       . inconsistent indentation
       . hand-rolled commits instead of using test_commit
      
      Fix all of them.
      
      There's a catch to the last point: test_commit creates a tag, which the
      original test did not create.  We still change it to test_commit, and
      explicitly delete the tags, so as to highlight that the test relies on not
      having them.
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8a557bb7
    • T
      strbuf: improve strbuf_get*line documentation · 1c5f93b9
      Thomas Rast 提交于
      Clarify strbuf_getline() documentation, and add the missing documentation
      for strbuf_getwholeline() and strbuf_getwholeline_fd().
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1c5f93b9
    • T
      bundle: use a strbuf to scan the log for boundary commits · bc2fed49
      Thomas Rast 提交于
      The first part of the bundle header contains the boundary commits, and
      could be approximated by
      
        # v2 git bundle
        $(git rev-list --pretty=oneline --boundary <ARGS> | grep ^-)
      
      git-bundle actually spawns exactly this rev-list invocation, and does
      the grepping internally.
      
      There was a subtle bug in the latter step: it used fgets() with a
      1024-byte buffer.  If the user has sufficiently long subjects (e.g.,
      by not adhering to the git oneline-subject convention in the first
      place), the 'oneline' format can easily overflow the buffer.  fgets()
      then returns the rest of the line in the next call(s).  If one of
      these remaining parts started with '-', git-bundle would mistakenly
      insert it into the bundle thinking it was a boundary commit.
      
      Fix it by using strbuf_getwholeline() instead, which handles arbitrary
      line lengths correctly.
      
      Note that on the receiving side in parse_bundle_header() we were
      already using strbuf_getwholeline_fd(), so that part is safe.
      Reported-by: NJannis Pohlmann <jannis.pohlmann@codethink.co.uk>
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      bc2fed49
  3. 23 2月, 2012 1 次提交
  4. 06 2月, 2012 4 次提交
  5. 19 1月, 2012 4 次提交
  6. 13 1月, 2012 6 次提交
    • J
      Update draft release notes to 1.7.8.4 · ab8a7808
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ab8a7808
    • J
      Merge branch 'maint-1.7.7' into maint · 5a6a9394
      Junio C Hamano 提交于
      * maint-1.7.7:
        Update draft release notes to 1.7.7.6
        Update draft release notes to 1.7.6.6
        thin-pack: try harder to use preferred base objects as base
      5a6a9394
    • J
      Update draft release notes to 1.7.7.6 · 8f83acf7
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8f83acf7
    • J
      Merge branch 'maint-1.7.6' into maint-1.7.7 · 901c907d
      Junio C Hamano 提交于
      * maint-1.7.6:
        Update draft release notes to 1.7.6.6
        thin-pack: try harder to use preferred base objects as base
      901c907d
    • J
      Update draft release notes to 1.7.6.6 · 04f6785a
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      04f6785a
    • J
      thin-pack: try harder to use preferred base objects as base · 15f07e06
      Jeff King 提交于
      When creating a pack using objects that reside in existing packs, we try
      to avoid recomputing futile delta between an object (trg) and a candidate
      for its base object (src) if they are stored in the same packfile, and trg
      is not recorded as a delta already. This heuristics makes sense because it
      is likely that we tried to express trg as a delta based on src but it did
      not produce a good delta when we created the existing pack.
      
      As the pack heuristics prefer producing delta to remove data, and Linus's
      law dictates that the size of a file grows over time, we tend to record
      the newest version of the file as inflated, and older ones as delta
      against it.
      
      When creating a thin-pack to transfer recent history, it is likely that we
      will try to send an object that is recorded in full, as it is newer.  But
      the heuristics to avoid recomputing futile delta effectively forbids us
      from attempting to express such an object as a delta based on another
      object. Sending an object in full is often more expensive than sending a
      suboptimal delta based on other objects, and it is even more so if we
      could use an object we know the receiving end already has (i.e. preferred
      base object) as the delta base.
      
      Tweak the recomputation avoidance logic, so that we do not punt on
      computing delta against a preferred base object.
      
      The effect of this change can be seen on two simulated upload-pack
      workloads. The first is based on 44 reflog entries from my git.git
      origin/master reflog, and represents the packs that kernel.org sent me git
      updates for the past month or two. The second workload represents much
      larger fetches, going from git's v1.0.0 tag to v1.1.0, then v1.1.0 to
      v1.2.0, and so on.
      
      The table below shows the average generated pack size and the average CPU
      time consumed for each dataset, both before and after the patch:
      
                        dataset
                  | reflog | tags
      ---------------------------------
           before | 53358  | 2750977
      size  after | 32398  | 2668479
           change |   -39% |      -3%
      ---------------------------------
           before |  0.18  | 1.12
      CPU   after |  0.18  | 1.15
           change |    +0% |      +3%
      
      This patch makes a much bigger difference for packs with a shorter slice
      of history (since its effect is seen at the boundaries of the pack) though
      it has some benefit even for larger packs.
      Signed-off-by: NJeff King <peff@peff.net>
      Acked-by: NNicolas Pitre <nico@fluxnic.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      15f07e06
  7. 12 1月, 2012 3 次提交
  8. 11 1月, 2012 11 次提交
  9. 10 1月, 2012 1 次提交
  10. 07 1月, 2012 5 次提交