1. 27 12月, 2008 3 次提交
  2. 24 11月, 2008 3 次提交
  3. 25 10月, 2008 1 次提交
    • J
      git-daemon: set REMOTE_ADDR to client address · 53ffb878
      Joey Hess 提交于
      This allows hooks like pre-receive to look at the client's IP
      address.
      
      Of course the IP address can't be used to get strong security;
      git-daemon isn't the right thing to use if you need that. However,
      basic IP address checking can be good enough in some situations.
      
      REMOTE_ADDR is the same environment variable used to communicate the
      client's address to CGI scripts.
      Signed-off-by: NJoey Hess <joey@kitenet.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      53ffb878
  4. 10 9月, 2008 1 次提交
  5. 07 9月, 2008 1 次提交
    • J
      daemon.c: avoid setlinebuf() · 48196afd
      Junio C Hamano 提交于
      This function is outside POSIX (Linux and recent BSD have it).  Replace it
      with setvbuf() which is POSIX.
      
      I am not sure about the value this patch passes as size argument to
      setvbuf(), though.  I know the call this patch makes is equivalent to
      calling setlinebuf() with GNU libc, but POSIX itself leaves what happens
      to the size argument quite vague, saying only "otherwise [i.e. when buf is
      a null pointer], size _may_ determine the size of a buffer allocated by
      the setvbuf() function."  If passing size=0 causes stdio to allocate very
      small buffer, and while stdio tries to line buffer the output, it might
      make it to fail to buffer an entire line, causing early flushing of the
      stream.
      
      Even if that turns out to be a problem on minorority platforms, we won't
      know it until the issue actually hurts them, so let's push this change out
      and see what happens.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      48196afd
  6. 01 9月, 2008 1 次提交
  7. 26 8月, 2008 1 次提交
    • J
      daemon.c: minor style fixup · 460c2010
      Junio C Hamano 提交于
      * "else" on the same line as "}" that closes corresponding "if (...) {";
      
       * multi-line comments begin with "/*\n";
      
       * sizeof, even it is not a function, is written as "sizeof(...)";
      
       * no need to check x?alloc() return value -- it would have died;
      
       * "if (...) { ... }" that covers the whole function body can be dedented
         by returning from the function early with "if (!...) return;";
      
       * SP on each side of an operator, i.e. "a > 0", not "a>0";
      
      Also removes stale comment describing how remove_child() used to do its
      thing.
      
      Signed-off-by: Junio C Hamano <gitster@pobox.com>:
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      460c2010
  8. 18 8月, 2008 4 次提交
  9. 13 8月, 2008 1 次提交
  10. 24 7月, 2008 1 次提交
  11. 14 7月, 2008 1 次提交
    • S
      Make usage strings dash-less · 1b1dd23f
      Stephan Beyer 提交于
      When you misuse a git command, you are shown the usage string.
      But this is currently shown in the dashed form.  So if you just
      copy what you see, it will not work, when the dashed form
      is no longer supported.
      
      This patch makes git commands show the dash-less version.
      
      For shell scripts that do not specify OPTIONS_SPEC, git-sh-setup.sh
      generates a dash-less usage string now.
      Signed-off-by: NStephan Beyer <s-beyer@gmx.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1b1dd23f
  12. 07 7月, 2008 1 次提交
  13. 15 5月, 2008 1 次提交
  14. 28 2月, 2008 2 次提交
  15. 09 11月, 2007 1 次提交
  16. 06 11月, 2007 1 次提交
  17. 19 10月, 2007 1 次提交
  18. 01 8月, 2007 1 次提交
  19. 08 6月, 2007 1 次提交
  20. 07 6月, 2007 1 次提交
    • J
      War on whitespace · a6080a0a
      Junio C Hamano 提交于
      This uses "git-apply --whitespace=strip" to fix whitespace errors that have
      crept in to our source files over time.  There are a few files that need
      to have trailing whitespaces (most notably, test vectors).  The results
      still passes the test, and build result in Documentation/ area is unchanged.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a6080a0a
  21. 22 5月, 2007 1 次提交
  22. 21 2月, 2007 2 次提交
    • J
      prefixcmp(): fix-up mechanical conversion. · 599065a3
      Junio C Hamano 提交于
      Previous step converted use of strncmp() with literal string
      mechanically even when the result is only used as a boolean:
      
          if (!strncmp("foo", arg, 3)) ==> if (!(-prefixcmp(arg, "foo")))
      
      This step manually cleans them up to read:
      
          if (!prefixcmp(arg, "foo"))
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      599065a3
    • J
      Mechanical conversion to use prefixcmp() · cc44c765
      Junio C Hamano 提交于
      This mechanically converts strncmp() to use prefixcmp(), but only when
      the parameters match specific patterns, so that they can be verified
      easily.  Leftover from this will be fixed in a separate step, including
      idiotic conversions like
      
          if (!strncmp("foo", arg, 3))
      
        =>
      
          if (!(-prefixcmp(arg, "foo")))
      
      This was done by using this script in px.perl
      
         #!/usr/bin/perl -i.bak -p
         if (/strncmp\(([^,]+), "([^\\"]*)", (\d+)\)/ && (length($2) == $3)) {
                 s|strncmp\(([^,]+), "([^\\"]*)", (\d+)\)|prefixcmp($1, "$2")|;
         }
         if (/strncmp\("([^\\"]*)", ([^,]+), (\d+)\)/ && (length($1) == $3)) {
                 s|strncmp\("([^\\"]*)", ([^,]+), (\d+)\)|(-prefixcmp($2, "$1"))|;
         }
      
      and running:
      
         $ git grep -l strncmp -- '*.c' | xargs perl px.perl
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      cc44c765
  23. 15 2月, 2007 1 次提交
  24. 04 2月, 2007 1 次提交
  25. 29 1月, 2007 1 次提交
    • L
      git-push through git protocol · 4b3b1e1e
      Linus Torvalds 提交于
      This allows pushing over the git:// protocol, and while it's not
      authenticated, it could make sense from within a firewalled
      setup where nobody but trusted internal people can reach the git
      port.  git-daemon is possibly easier and faster to set up in the
      kind of situation where you set up git instead of CVS inside a
      company.
      
      "git-receive-pack" is disabled by default, so you need to enable it
      explicitly by starting git-daemon with the "--enable=receive-pack"
      command line argument, or by having your config enable it automatically.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      4b3b1e1e
  26. 09 1月, 2007 1 次提交
  27. 21 12月, 2006 1 次提交
    • J
      simplify inclusion of system header files. · 85023577
      Junio C Hamano 提交于
      This is a mechanical clean-up of the way *.c files include
      system header files.
      
       (1) sources under compat/, platform sha-1 implementations, and
           xdelta code are exempt from the following rules;
      
       (2) the first #include must be "git-compat-util.h" or one of
           our own header file that includes it first (e.g. config.h,
           builtin.h, pkt-line.h);
      
       (3) system headers that are included in "git-compat-util.h"
           need not be included in individual C source files.
      
       (4) "git-compat-util.h" does not have to include subsystem
           specific header files (e.g. expat.h).
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      85023577
  28. 24 10月, 2006 1 次提交
  29. 29 9月, 2006 2 次提交
  30. 28 9月, 2006 1 次提交