1. 21 9月, 2009 1 次提交
  2. 04 9月, 2009 1 次提交
  3. 03 9月, 2009 1 次提交
  4. 25 8月, 2009 1 次提交
    • N
      fix simple deepening of a repo · 86386829
      Nicolas Pitre 提交于
      If all refs sent by the remote repo during a fetch are reachable
      locally, then no further conversation is performed with the remote. This
      check is skipped when the --depth argument is provided to allow the
      deepening of a shallow clone which corresponding remote repo has no
      changed.
      
      However, some additional filtering was added in commit c29727d5 to
      remove those refs which are equal on both sides.  If the remote repo has
      not changed, then the list of refs to give the remote process becomes
      empty and simply attempting to deepen a shallow repo always fails.
      
      Let's stop being smart in that case and simply send the whole list over
      when that condition is met.  The remote will do the right thing anyways.
      
      Test cases for this issue are also provided.
      Signed-off-by: NNicolas Pitre <nico@cam.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      86386829
  5. 13 8月, 2009 1 次提交
  6. 06 8月, 2009 3 次提交
  7. 06 7月, 2009 2 次提交
    • J
      run_command: report failure to execute the program, but optionally don't · c024beb5
      Johannes Sixt 提交于
      In the case where a program was not found, it was still the task of the
      caller to report an error to the user. Usually, this is an interesting case
      but only few callers actually reported a specific error (though many call
      sites report a generic error message regardless of the cause).
      
      With this change the error is reported by run_command, but since there is
      one call site in git.c that does not want that, an option is added to
      struct child_process, which is used to turn the error off.
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c024beb5
    • J
      run_command: report system call errors instead of returning error codes · 0ac77ec3
      Johannes Sixt 提交于
      The motivation for this change is that system call failures are serious
      errors that should be reported to the user, but only few callers took the
      burden to decode the error codes that the functions returned into error
      messages.
      
      If at all, then only an unspecific error message was given. A prominent
      example is this:
      
         $ git upload-pack . | :
         fatal: unable to run 'git-upload-pack'
      
      In this example, git-upload-pack, the external command invoked through the
      git wrapper, dies due to SIGPIPE, but the git wrapper does not bother to
      report the real cause. In fact, this very error message is copied to the
      syslog if git-daemon's client aborts the connection early.
      
      With this change, system call failures are reported immediately after the
      failure and only a generic failure code is returned to the caller. In the
      above example the error is now to the point:
      
         $ git upload-pack . | :
         error: git-upload-pack died of signal
      
      Note that there is no error report if the invoked program terminated with
      a non-zero exit code, because it is reasonable to expect that the invoked
      program has already reported an error. (But many run_command call sites
      nevertheless write a generic error message.)
      
      There was one special return code that was used to identify the case where
      run_command failed because the requested program could not be exec'd. This
      special case is now treated like a system call failure with errno set to
      ENOENT. No error is reported in this case, because the call site in git.c
      expects this as a normal result. Therefore, the callers that carefully
      decoded the return value still check for this condition.
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0ac77ec3
  8. 28 6月, 2009 2 次提交
    • L
      add --porcelain option to git-push · 1965ff74
      Larry D'Anna 提交于
      If --porcelain is used git-push will produce machine-readable output.  The
      output status line for each ref will be tab-separated and sent to stdout instead
      of stderr.  The full symbolic names of the refs will be given.  For example
      
      $ git push --dry-run --porcelain master :foobar 2>/dev/null \
        | perl -pe 's/\t/ TAB /g'
      
      = TAB refs/heads/master:refs/heads/master TAB [up to date]
      - TAB :refs/heads/foobar TAB [deleted]
      Signed-off-by: NLarry D'Anna <larry@elder-gods.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1965ff74
    • T
      Use die_errno() instead of die() when checking syscalls · 0721c314
      Thomas Rast 提交于
      Lots of die() calls did not actually report the kind of error, which
      can leave the user confused as to the real problem.  Use die_errno()
      where we check a system/library call that sets errno on failure, or
      one of the following that wrap such calls:
      
        Function              Passes on error from
        --------              --------------------
        odb_pack_keep         open
        read_ancestry         fopen
        read_in_full          xread
        strbuf_read           xread
        strbuf_read_file      open or strbuf_read_file
        strbuf_readlink       readlink
        write_in_full         xwrite
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0721c314
  9. 07 6月, 2009 2 次提交
  10. 02 6月, 2009 1 次提交
  11. 14 5月, 2009 1 次提交
  12. 30 4月, 2009 1 次提交
    • A
      replace direct calls to unlink(2) with unlink_or_warn · 691f1a28
      Alex Riesen 提交于
      This helps to notice when something's going wrong, especially on
      systems which lock open files.
      
      I used the following criteria when selecting the code for replacement:
      - it was already printing a warning for the unlink failures
      - it is in a function which already printing something or is
        called from such a function
      - it is in a static function, returning void and the function is only
        called from a builtin main function (cmd_)
      - it is in a function which handles emergency exit (signal handlers)
      - it is in a function which is obvously cleaning up the lockfiles
      Signed-off-by: NAlex Riesen <raa.lkml@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      691f1a28
  13. 21 4月, 2009 1 次提交
    • A
      fetch: Strip usernames from url's before storing them · 47abd85b
      Andreas Ericsson 提交于
      When pulling from a remote, the full URL including username
      is by default added to the commit message. Since it adds
      very little value but could be used by malicious people to
      glean valid usernames (with matching hostnames), we're far
      better off just stripping the username before storing the
      remote URL locally.
      
      Note that this patch has no lasting visible effect when
      "git pull" does not create a merge commit. It simply
      alters what gets written to .git/FETCH_HEAD, which is used
      by "git merge" to automagically create its messages.
      Signed-off-by: NAndreas Ericsson <ae@op5.se>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      47abd85b
  14. 11 3月, 2009 1 次提交
  15. 10 3月, 2009 1 次提交
  16. 12 1月, 2009 1 次提交
  17. 18 10月, 2008 2 次提交
  18. 10 10月, 2008 1 次提交
  19. 06 10月, 2008 1 次提交
  20. 10 9月, 2008 1 次提交
    • J
      push: prepare sender to receive extended ref information from the receiver · 40c155ff
      Junio C Hamano 提交于
      "git push" enhancement allows the receiving end to report not only its own
      refs but refs in repositories it borrows from via the alternate object
      store mechanism.  By telling the sender that objects reachable from these
      extra refs are already complete in the receiving end, the number of
      objects that need to be transfered can be cut down.
      
      These entries are sent over the wire with string ".have", instead of the
      actual names of the refs.  This string was chosen so that they are ignored
      by older programs at the sending end.  If we sent some random but valid
      looking refnames for these entries, "matching refs" rule (triggered when
      running "git push" without explicit refspecs, where the sender learns what
      refs the receiver has, and updates only the ones with the names of the
      refs the sender also has) and "delete missing" rule (triggered when "git
      push --mirror" is used, where the sender tells the receiver to delete the
      refs it itself does not have) would try to update/delete them, which is
      not what we want.
      
      This prepares the send-pack (and "push" that runs native protocol) to
      accept extended existing ref information and make use of it.  The ".have"
      entries are excluded from ref matching rules, and are exempt from deletion
      rule while pushing with --mirror option, but are still used for pack
      generation purposes by providing more "bottom" range commits.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      40c155ff
  21. 08 8月, 2008 1 次提交
    • P
      Fail properly when cloning from invalid HTTP URL · fd35e426
      Petr Baudis 提交于
      Currently, when cloning from invalid HTTP URL, git clone will possibly
      return curl error, then a confusing message about remote HEAD and then
      return success and leave an empty repository behind, confusing either
      the end-user or the automated service calling it (think repo.or.cz).
      
      This patch changes the error() calls in get_refs_via_curl() to die()s,
      akin to the other get_refs_*() functions.
      
      Cc: Daniel Barkalow <barkalow@iabervon.org>
      Signed-off-by: NPetr Baudis <pasky@suse.cz>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      fd35e426
  22. 06 7月, 2008 1 次提交
  23. 26 6月, 2008 1 次提交
  24. 12 5月, 2008 1 次提交
  25. 05 5月, 2008 1 次提交
  26. 27 4月, 2008 1 次提交
  27. 05 3月, 2008 1 次提交
    • S
      Teach git-fetch to exploit server side automatic tag following · 41fa7d2e
      Shawn O. Pearce 提交于
      If the remote peer upload-pack process supports the include-tag
      protocol extension then we can avoid running a second fetch cycle
      on the client side by letting the server send us the annotated tags
      along with the objects it is packing for us.  In the following graph
      we can now fetch both "tag1" and "tag2" on the same connection that
      we fetched "master" from the remote when we only have L available
      on the local side:
      
               T - tag1          S - tag2
              /                 /
         L - o ------ o ------ B
          \                     \
           \                     \
            origin/master         master
      
      The objects for "tag1" are implicitly downloaded without our direct
      knowledge.  The existing "quickfetch" optimization within git-fetch
      discovers that tag1 is complete after the first connection and does
      not open a second connection.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      41fa7d2e
  28. 29 2月, 2008 1 次提交
  29. 28 2月, 2008 1 次提交
    • M
      Set proxy override with http_init() · 9fc6440d
      Mike Hommey 提交于
      In transport.c, proxy setting (the one from the remote conf) was set through
      curl_easy_setopt() call, while http.c already does the same with the
      http.proxy setting. We now just use this infrastructure instead, and make
      http_init() now take the struct remote as argument so that it can take the
      http_proxy setting from there, and any other property that would be added
      later.
      
      At the same time, we make get_http_walker() take a struct remote argument
      too, and pass it to http_init(), which makes remote defined proxy be used
      for more than get_refs_via_curl().
      
      We leave out http-fetch and http-push, which don't use remotes for the
      moment, purposefully.
      Signed-off-by: NMike Hommey <mh@glandium.org>
      Acked-by: NDaniel Barkalow <barkalow@iabervon.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9fc6440d
  30. 12 2月, 2008 1 次提交
    • M
      Work around curl-gnutls not liking to be reinitialized · b26768e2
      Mike Hommey 提交于
      curl versions 7.16.3 to 7.18.0 included had a regression in which https
      requests following curl_global_cleanup/init sequence would fail with ASN1
      parser errors with curl-gnutls. Such sequences happen in some cases such
      as git fetch.
      
      We work around this by removing the http_init and http_cleanup calls from
      get_refs_via_curl, replacing them with a transport->data initialization
      with the http_walker (which does http_init).
      
      While the http_walker is not currently used in get_refs_via_curl, http
      and walker code refactor will make it use it.
      Signed-off-by: NMike Hommey <mh@glandium.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b26768e2
  31. 10 2月, 2008 1 次提交
    • M
      Work around curl-gnutls not liking to be reinitialized · 9fd9279b
      Mike Hommey 提交于
      curl versions 7.16.3 to 7.18.0 included had a regression in which https
      requests following curl_global_cleanup/init sequence would fail with ASN1
      parser errors with curl-gnutls. Such sequences happen in some cases such
      as git fetch.
      
      We work around this by removing the http_init and http_cleanup calls from
      get_refs_via_curl, replacing them with a transport->data initialization
      with the http_walker (which does http_init).
      
      While the http_walker is not currently used in get_refs_via_curl, http
      and walker code refactor will make it use it.
      Signed-off-by: NMike Hommey <mh@glandium.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9fd9279b
  32. 05 2月, 2008 1 次提交
    • D
      Reduce the number of connects when fetching · ba227857
      Daniel Barkalow 提交于
      This shares the connection between getting the remote ref list and
      getting objects in the first batch. (A second connection is still used
      to follow tags).
      
      When we do not fetch objects (i.e. either ls-remote disconnects after
      getting list of refs, or we decide we are already up-to-date), we
      clean up the connection properly; otherwise the connection is left
      open in need of cleaning up to avoid getting an error message from
      the remote end when ssh is used.
      Signed-off-by: NDaniel Barkalow <barkalow@iabervon.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ba227857
  33. 05 1月, 2008 1 次提交
  34. 15 12月, 2007 1 次提交