1. 22 6月, 2009 5 次提交
  2. 21 6月, 2009 6 次提交
  3. 19 6月, 2009 5 次提交
    • M
      http.c: fix compiling with libcurl 7.9.2 · ef52aafa
      Mark Lodato 提交于
      Change the minimimum required libcurl version for the http.sslKey option
      to 7.9.3.  Previously, preprocessor macros checked for >= 7.9.2, which
      is incorrect because CURLOPT_SSLKEY was introduced in 7.9.3.  This now
      allows git to compile with libcurl 7.9.2.
      Signed-off-by: NMark Lodato <lodatom@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ef52aafa
    • J
      import-tars: support symlinks · 6fb37f86
      Johannes Schindelin 提交于
      Without this patch, symbolic links are turned into empty files.
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6fb37f86
    • R
      upload-archive: fix infinite loop on Cygwin · 1b19fa46
      René Scharfe 提交于
      On Cygwin, poll() reports POLLIN even for file descriptors that have
      reached their end.  This caused git upload-archive to be stuck in an
      infinite loop, as it only looked at the POLLIN flag.
      
      In addition to POLLIN, check if read() returned 0, which indicates
      end-of-file, and keep looping only as long as at least one of the file
      descriptors has input.  This lets the following command finish on its
      own when run in a git repository on Cygwin, instead of it getting stuck
      after printing all file names:
      
      	$ git archive -v --remote . HEAD >/dev/null
      Reported-by: NBob Kagy <bobkagy@gmail.com>
      Signed-off-by: NRene Scharfe <rene.scharfe@lsrfire.ath.cx>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1b19fa46
    • P
      avoid exponential regex match for java and objc function names · 959e2e64
      Paolo Bonzini 提交于
      In the old regex
      
      ^[ \t]*(([ \t]*[A-Za-z_][A-Za-z_0-9]*){2,}[ \t]*\([^;]*)$
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      
      you can backtrack arbitrarily from [A-Za-z_0-9]* into [A-Za-z_], thus
      causing an exponential number of backtracks.  Ironically it also causes
      the regex not to work as intended; for example "catch" can match the
      underlined part of the regex, the first repetition matching "c" and
      the second matching "atch".
      
      The replacement regex avoids this problem, because it makes sure that
      at least a space/tab is eaten on each repetition.  In other words,
      a suffix of a repetition can never be a prefix of the next repetition.
      Signed-off-by: NPaolo Bonzini <bonzini@gnu.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      959e2e64
    • L
      Fix big left-shifts of unsigned char · 48fb7deb
      Linus Torvalds 提交于
      Shifting 'unsigned char' or 'unsigned short' left can result in sign
      extension errors, since the C integer promotion rules means that the
      unsigned char/short will get implicitly promoted to a signed 'int' due to
      the shift (or due to other operations).
      
      This normally doesn't matter, but if you shift things up sufficiently, it
      will now set the sign bit in 'int', and a subsequent cast to a bigger type
      (eg 'long' or 'unsigned long') will now sign-extend the value despite the
      original expression being unsigned.
      
      One example of this would be something like
      
      	unsigned long size;
      	unsigned char c;
      
      	size += c << 24;
      
      where despite all the variables being unsigned, 'c << 24' ends up being a
      signed entity, and will get sign-extended when then doing the addition in
      an 'unsigned long' type.
      
      Since git uses 'unsigned char' pointers extensively, we actually have this
      bug in a couple of places.
      
      I may have missed some, but this is the result of looking at
      
      	git grep '[^0-9 	][ 	]*<<[ 	][a-z]' -- '*.c' '*.h'
      	git grep '<<[   ]*24'
      
      which catches at least the common byte cases (shifting variables by a
      variable amount, and shifting by 24 bits).
      
      I also grepped for just 'unsigned char' variables in general, and
      converted the ones that most obviously ended up getting implicitly cast
      immediately anyway (eg hash_name(), encode_85()).
      
      In addition to just avoiding 'unsigned char', this patch also tries to use
      a common idiom for the delta header size thing. We had three different
      variations on it: "& 0x7fUL" in one place (getting the sign extension
      right), and "& ~0x80" and "& 0x7f" in two other places (not getting it
      right). Apart from making them all just avoid using "unsigned char" at
      all, I also unified them to then use a simple "& 0x7f".
      
      I considered making a sparse extension which warns about doing implicit
      casts from unsigned types to signed types, but it gets rather complex very
      quickly, so this is just a hack.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      48fb7deb
  4. 15 6月, 2009 2 次提交
  5. 14 6月, 2009 4 次提交
  6. 12 6月, 2009 3 次提交
  7. 09 6月, 2009 4 次提交
  8. 07 6月, 2009 2 次提交
    • T
      Documentation: refer to gitworkflows(7) from tutorial and git(1) · 801a011d
      Thomas Rast 提交于
      Add references to the gitworkflows(7) manpage added in f948dd89
      (Documentation: add manpage about workflows, 2008-10-19) to both
      gittutorial(1) and git(1), so that new users might actually discover
      and read it.
      
      Noticed by Randal L. Schwartz.
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      801a011d
    • S
      daemon: Strictly parse the "extra arg" part of the command · 73bb33a9
      Shawn O. Pearce 提交于
      Since 1.4.4.5 (49ba83fb "Add virtualization support to git-daemon")
      git daemon enters an infinite loop and never terminates if a client
      hides any extra arguments in the initial request line which is not
      exactly "\0host=blah\0".
      
      Since that change, a client must never insert additional extra
      arguments, or attempt to use any argument other than "host=", as
      any daemon will get stuck parsing the request line and will never
      complete the request.
      
      Since the client can't tell if the daemon is patched or not, it
      is not possible to know if additional extra args might actually be
      able to be safely requested.
      
      If we ever need to extend the git daemon protocol to support a new
      feature, we may have to do something like this to the exchange:
      
        # If both support git:// v2
        #
        C: 000cgit://v2
        S: 0010ok host user
        C: 0018host git.kernel.org
        C: 0027git-upload-pack /pub/linux-2.6.git
        S: ...git-upload-pack header...
      
        # If client supports git:// v2, server does not:
        #
        C: 000cgit://v2
        S: <EOF>
      
        C: 003bgit-upload-pack /pub/linux-2.6.git\0host=git.kernel.org\0
        S: ...git-upload-pack header...
      
      This requires the client to create two TCP connections to talk to
      an older git daemon, however all daemons since the introduction of
      daemon.c will safely reject the unknown "git://v2" command request,
      so the client can quite easily determine the server supports an
      older protocol.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      73bb33a9
  9. 04 6月, 2009 2 次提交
  10. 03 6月, 2009 2 次提交
    • J
      blame: correctly handle a path that used to be a directory · a9b2d424
      Junio C Hamano 提交于
      When trying to see if the same path exists in the parent, we ran
      "diff-tree" with pathspec set to the path we are interested in with the
      parent, and expect either to have exactly one resulting filepair (either
      "changed from the parent", "created when there was none") or nothing (when
      there is no change from the parent).
      
      If the path used to be a directory, however, we will also see unbounded
      number of entries that talk about the files that used to exist underneath
      the directory in question.  Correctly pick only the entry that describes
      the path we are interested in in such a case (namely, the creation of the
      path as a regular file).
      
      Noticed by Ben Willard.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a9b2d424
    • T
      add -i: do not dump patch during application · 8dc3a47c
      Thomas Rast 提交于
      Remove a debugging print that snuck in at 7a26e653 (Revert
      "git-add--interactive: remove hunk coalescing", 2009-05-16).
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8dc3a47c
  11. 02 6月, 2009 5 次提交