1. 27 4月, 2012 3 次提交
  2. 26 4月, 2012 1 次提交
    • J
      bundle: remove stray single-quote from error message · 97afde15
      Jonathan Nieder 提交于
      After running rev-list --boundary to retrieve the list of boundary
      commits, "git bundle create" runs its own revision walk.  If in this
      stage git encounters an unfamiliar option, it writes a message with an
      unbalanced quotation mark:
      
      	error: unrecognized argument: --foo'
      
      Drop the stray quote to match the "unrecognized argument: %s" message
      used elsewhere and save translators some work.
      
      This is mostly a futureproofing measure: for now, the "rev-list
      --boundary" command catches most strange arguments on its own and the
      above message is not seen unless you try something esoteric like "git
      bundle create test.bundle --header HEAD".
      Reported-by: NJunio C Hamano <gitster@pobox.com>
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      97afde15
  3. 10 4月, 2012 8 次提交
  4. 24 3月, 2012 1 次提交
  5. 21 3月, 2012 3 次提交
  6. 16 3月, 2012 1 次提交
    • J
      fetch/receive: remove over-pessimistic connectivity check · d21c463d
      Junio C Hamano 提交于
      Git 1.7.8 introduced an object and history re-validation step after
      "fetch" or "push" causes new history to be added to a receiving
      repository. This is to protect a malicious server or pushing client from
      corrupting the repository by taking advantage of an existing corrupt
      object that is unconnected to existing history.
      
      But this check is way over-pessimistic.  During "fetch" or "receive-pack"
      (the server side of "push"), unpack-objects and index-pack already
      validate individual objects that are received, and the only thing we would
      want to catch are corrupted objects that already happen to exist in our
      repository but are not referenced from our refs.  Such objects must have
      been written by an earlier run of our codepaths that write out loose
      objects or packfiles, and they must have done the validation of individual
      objects when they did so.  The only thing left to worry about is the
      connectivity integrity, which can be checked with "rev-list --objects",
      which is much cheaper.  We have been paying the 5x to 8x runtime overhead
      the --verify-objects often adds for no real gain.
      
      Revert check_everything_connected() not to use this over-pessimistic
      check.
      
      Credit goes to Nguyễn Thái Ngọc Duy, who originally identified the
      performance regression and endured multiple rounds of reviews to fix it.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d21c463d
  7. 09 3月, 2012 1 次提交
  8. 07 3月, 2012 2 次提交
  9. 02 3月, 2012 3 次提交
  10. 29 2月, 2012 1 次提交
  11. 27 2月, 2012 5 次提交
  12. 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
  13. 23 2月, 2012 1 次提交
  14. 14 2月, 2012 1 次提交
  15. 06 2月, 2012 4 次提交
  16. 23 1月, 2012 1 次提交
    • K
      t/Makefile: Use $(sort ...) explicitly where needed · aae5239b
      Kirill Smelkov 提交于
      Starting from GNU Make 3.82 $(wildcard ...) no longer sorts the result
      (from NEWS):
      
          * WARNING: Backward-incompatibility!
            Wildcards were not documented as returning sorted values, but the results
            have been sorted up until this release..  If your makefiles require sorted
            results from wildcard expansions, use the $(sort ...)  function to request
            it explicitly.
      
          http://repo.or.cz/w/make.git/commitdiff/2a59dc32aaf0681dec569f32a9d7ab88a379d34f
      
      I usually watch test progress visually, and if tests are sorted, even
      with make -j4 they go more or less incrementally by their t number. On
      the other side, without sorting, tests are executed in seemingly random
      order even for -j1. Let's please maintain sane tests order for perceived
      prettyness.
      
      Another note is that in GNU Make sort also works as uniq, so after sort
      being removed, we might expect e.g. $(wildcard *.sh a.*) to produce
      duplicates for e.g. "a.sh". From this point of view, adding sort could
      be seen as hardening t/Makefile from accidentally introduced dups.
      
      It turned out that prevous releases of GNU Make did not perform full
      sort in $(wildcard), only sorting results for each pattern, that's why
      explicit sort-as-uniq is relevant even for older makes.
      Signed-off-by: NKirill Smelkov <kirr@navytux.spb.ru>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      aae5239b
  17. 21 1月, 2012 1 次提交
    • S
      remote-curl: Fix push status report when all branches fail · 5238cbf6
      Shawn O. Pearce 提交于
      The protocol between transport-helper.c and remote-curl requires
      remote-curl to always print a blank line after the push command
      has run. If the blank line is ommitted, transport-helper kills its
      container process (the git push the user started) with exit(128)
      and no message indicating a problem, assuming the helper already
      printed reasonable error text to the console.
      
      However if the remote rejects all branches with "ng" commands in the
      report-status reply, send-pack terminates with non-zero status, and
      in turn remote-curl exited with non-zero status before outputting
      the blank line after the helper status printed by send-pack. No
      error messages reach the user.
      
      This caused users to see the following from git push over HTTP
      when the remote side's update hook rejected the branch:
      
        $ git push http://... master
        Counting objects: 4, done.
        Delta compression using up to 6 threads.
        Compressing objects: 100% (2/2), done.
        Writing objects: 100% (3/3), 301 bytes, done.
        Total 3 (delta 0), reused 0 (delta 0)
        $
      
      Always print a blank line after the send-pack process terminates,
      ensuring the helper status report (if it was output) will be
      correctly parsed by the calling transport-helper.c. This ensures
      the helper doesn't abort before the status report can be shown to
      the user.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      5238cbf6