Skip to content
Commits on Sep 25, 2014
  1. @Benabik @gitster

    receive-pack::hmac_sha1(): copy the entire SHA-1 hash out

    Benabik committed with gitster Sep 25, 2014
    clang gives the following warning:
    
    builtin/receive-pack.c:327:35: error: sizeof on array function
    parameter will return size of 'unsigned char *' instead of 'unsigned
    char [20]' [-Werror,-Wsizeof-array-argument]
            git_SHA1_Update(&ctx, out, sizeof(out));
                                             ^
    builtin/receive-pack.c:292:37: note: declared here
    static void hmac_sha1(unsigned char out[20],
                                       ^
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Oct 30, 2013
  1. @Benabik @gitster

    t5570: Update for clone-progress-to-stderr branch

    Benabik committed with gitster Oct 21, 2013
    git clone now reports its progress to standard error, which throws off
    t5570.  Using test_i18ngrep instead of test_cmp allows the test to be
    more flexible by only looking for the expected error and ignoring any
    other output from the program.
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Oct 22, 2013
  1. @Benabik @gitster

    t5570: Update for clone-progress-to-stderr branch

    Benabik committed with gitster Oct 21, 2013
    git clone now reports its progress to standard error, which throws off
    t5570.  Using test_i18ngrep instead of test_cmp allows the test to be
    more flexible by only looking for the expected error and ignoring any
    other output from the program.
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @Benabik @gitster

    t5570: Update for symref capability

    Benabik committed with gitster Oct 21, 2013
    git-daemon now uses the symref capability to send the correct HEAD
    reference, so the test for that in t5570 now passes.
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 5, 2013
  1. @Benabik @gitster

    t5551: Remove header from curl cookie file

    Benabik committed with gitster Aug 5, 2013
    The URL included in the header appears to vary from curl version to
    curl version.  Since we only care about the final few lines, only test
    them.  However, make sure the blank line after the header is still
    included to make sure there are no extra cookie lines.
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @Benabik @gitster

    OS X: Fix redeclaration of die warning

    Benabik committed with gitster Aug 5, 2013
    compat/apple-common-crypto.h uses die() in one of its macros, but was
    included in git-compat-util.h before the definition of die.
    
    Fix by simply moving the relevant block after the die/error/warning
    declarations.
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @Benabik @gitster

    Makefile: Fix APPLE_COMMON_CRYPTO with BLK_SHA1

    Benabik committed with gitster Aug 5, 2013
    It used to be that APPLE_COMMON_CRYPTO did nothing when BLK_SHA1 was
    set.  But APPLE_COMMON_CRYPTO is now used for more than just SHA1 (see
    3ef2bca) so make sure that the appropriate libraries are always set.
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 1, 2013
  1. @Benabik @gitster

    t4205: replace .\+ with ..* in sed commands

    Benabik committed with gitster Jul 1, 2013
    OS X's sed only accepts basic regular expressions, which does not
    allow the + quantifier.  However '..*' (anything, followed by zero or
    more anything) is the same as '.\+' (one or more anything) and valid
    in any regular expression language.
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Apr 3, 2013
  1. @Benabik @gitster

    t5570: do not assume the "matching" push is the default

    Benabik committed with gitster Jan 15, 2013
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @Benabik @gitster

    t5551: do not assume the "matching" push is the default

    Benabik committed with gitster Jan 15, 2013
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @Benabik @gitster

    t5550: do not assume the "matching" push is the default

    Benabik committed with gitster Jan 15, 2013
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 29, 2011
  1. @Benabik @gitster

    t5540-http-test: shorten grep pattern

    Benabik committed with gitster Aug 29, 2011
    On OS X, the grep pattern
    
        "\"OP .*/objects/$x2/X38_X40 HTTP/[.0-9]*\" 20[0-9] "
    
    is too long ($x38 and $x40 represent 38 and 40 copies of [0-9a-f]) for
    grep to handle.  In order to still be able to match this, use the sed
    invocation to replace what we're looking for with a token.
    
    Improved-by: Junio C Hamano <gitster@pobox.com>
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on May 5, 2011
  1. @Benabik @gitster

    t/annotate-tests: Use echo & cat instead of sed

    Benabik committed with gitster May 5, 2011
    The use of the sed command "1i No robots allowed" caused the version
    of sed in OS X to die with
    
       sed: 1: "1i "No robots allowed"\n": command i expects \ followed by
       text
    
    Since this command was just trying to add a single line to the
    beginning of the file, do the same with "echo" followed by "cat".
    
    Unbreaks t8001 and t8002 on OS X 10.6.7
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Nov 17, 2010
  1. @Benabik @gitster

    t6022: Use -eq not = to test output of wc -l

    Benabik committed with gitster Nov 8, 2010
    When comparing numbers such as "3" to "$(wc -l)", we should check for
    numerical equality using -eq instead of string equality using = because
    some implementations of wc output extra whitespace.
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Oct 20, 2010
  1. @Benabik @gitster

    t/gitweb-lib: Don't pass constant to decode_utf8

    Benabik committed with gitster Oct 20, 2010
    Encode.pm started updating the string to decode in-place when a second
    argument is passed in version 2.40.
    
    This causes 'decode_utf8("", Encode::FB_CROAK)' to die with a message
    like:
    
      Modification of a read-only value attempted at .../Encode.pm line 216.
    
    Work around this by passing an empty variable instead of a constant
    string.
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Acked-by: Jakub Narebski <jnareb@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Sep 27, 2010
  1. @Benabik @gitster

    git-stash: fix flag parsing

    Benabik committed with gitster Sep 24, 2010
    Currently git-stash uses `git rev-parse --no-revs -- "$@"` to set its
    FLAGS variable.  This is the same as `FLAGS="-- $@"`.  It should use
    `git rev-parse --no-revs --flags "$@"`, but that eats any "-q" or
    "--quiet" argument.  So move the check for quiet before rev-parse.
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Sep 13, 2010
  1. @Benabik @gitster

    t7003: Use test_commit instead of custom function

    Benabik committed with gitster Sep 10, 2010
    t7003-filter-branch.sh had a make_commit() function that was identical
    to test_commit() in test-lib.sh except that it used tr to create a
    lowercase file name from the uppercase branch name instead of
    appending ".t".
    
    Not only is this unneeded code duplication, it also was something
    simply waiting to fail on case-insensitive file systems.  So replace
    all uses of make_commit with test_commit.
    
    While we're editing the setup, chain it together with && so that
    failures early in the sequence don't get lost and add a commit graph.
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 24, 2010
  1. @Benabik @gitster

    t7606: Avoid using head as a file name

    Benabik committed with gitster Aug 23, 2010
    A file named 'head' gets confused with the HEAD ref on
    case-insensitive file systems.  Replace '>head' with '>head.new' to
    match the '>head.old' files they are compared to.
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Acked-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @Benabik @gitster

    t7610: cd inside subshell instead of around

    Benabik committed with gitster Aug 23, 2010
    Instead of using `cd dir && (...) && cd..` use `(cd dir && ...)`
    
    This ensures that the test doesn't get caught in the subdirectory if
    there is an error in the subshell.
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Apr 10, 2010
  1. @Benabik @gitster

    send-email: Cleanup smtp-domain and add config

    Benabik committed with gitster Apr 10, 2010
    The way the code stored --smtp-domain was unlike its handling of other
    similar options.  Bring it in line with the others by:
    
    - Renaming $mail_domain to $smtp_domain to match the command line
      option. Also move its declaration from near the top of the file to
      near other option variables.
    
    - Removing $mail_domain_default.  The variable was used once and only
      served to move the default away from where it gets used.
    
    - Adding a sendemail.smtpdomain config option.  smtp-domain was the
      only SMTP configuration option that couldn't be set in the user's
      .gitconfig.
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @Benabik @gitster

    Document send-email --smtp-domain

    Benabik committed with gitster Apr 10, 2010
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @Benabik @gitster

    send-email: Don't use FQDNs without a '.'

    Benabik committed with gitster Apr 10, 2010
    Although Net::Domain::domainname attempts to be very thorough, the
    host's configuration can still refuse to give a FQDN.  Check to see if
    what we receive contains a dot as a basic sanity check.
    
    Since the same condition is used twice and getting complex, let's move
    it to a new function.
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. @Benabik @gitster

    send-email: Cleanup { style

    Benabik committed with gitster Apr 10, 2010
    As Jakub Narebski pointed out on the list, Perl code usually prefers
    
      sub func {
      }
    
    over
    
      sub func
      {
      }
    
    git-send-email.perl is somewhat inconsistent in its style, with 23
    subroutines using the first style and 6 using the second.  Convert the
    few odd subroutines so that the code matches normal Perl style.
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  5. @Benabik @gitster

    Makefile: Simplify handling of python scripts

    Benabik committed with gitster Apr 9, 2010
    The sed script intended to add a standard opening to python scripts
    was non-compatible and overly complex.  Simplifying it down to a set
    of one-liners removes the compatibility issues of newlines.  Moving
    the environment alterations from the Makefile to the python scripts
    makes also makes the scripts easier to run in-place.
    
    Specifically, the new sed script:
    
     - Alters the shebang line to use the configured Python.
     - Alters any os.getenv("GITPYTHONLIB") calls to use @@INSTLIBDIR@@ as the
       default.  This will replace any existing default or add a default if
       none is provided.
     - Replaces the @@INSTLIBDIR@@ placeholder with the directory git installs
       its python libraries to.
    
    The last two steps could be combined into a single step, but is left
    separate in case someone has another need for @@INSTLIBDIR@@ in their
    script.
    
    Suggested-by: Junio C Hamano <gitster@pobox.com>
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 20, 2010
  1. @Benabik @gitster

    Use test_expect_success for test setups

    Benabik committed with gitster Mar 20, 2010
    Several tests did not use test_expect_success for their setup
    commands.  Putting these start commands into the testing framework
    means both that errors during setup will be caught quickly and that
    non-error text will be suppressed without -v.
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 9, 2010
  1. @Benabik @gitster

    t3902: Protect against OS X normalization

    Benabik committed with gitster Feb 8, 2010
    8424981: "Fix invalid read in quote_c_style_counted" introduced a test
    that used "caractère spécial" as a directory name.
    
    Git creates it as "caract\303\250re sp\303\251cial"
    OS X stores it as "caracte\314\200re spe\314\201cial"
    
    To work around this problem, use the already introduced $FN as the
    directory name.
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 6, 2010
  1. @Benabik @gitster

    t9501: Re-fix max load test

    Benabik committed with gitster Feb 6, 2010
    Revert the previous attempt to skip this test on platforms where we
    currently cannot determine the system load.  We want to make sure that
    the max-load-limit codepath produces results cleanly, when gitweb is
    updated and becomes capable of reading the load average by some other
    method.
    
    The code to check for load returns 0 if it doesn't know how to find
    load.  It also checks to see if the current load is higher than the
    max load.  So to force the script to quit early by setting the maxload
    variable negative which should work for systems where we can detect
    load (which should be a positive number) and systems where we can't
    (where detected load is 0)
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @Benabik @gitster

    t9501: Skip testing load if we can't detect it

    Benabik committed with gitster Feb 6, 2010
    Currently gitweb only knows how to check for load using /proc/loadavg,
    which isn't available on all systems.  We shouldn't fail the test just
    because we don't know how to check the system load.
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Nov 24, 2009
  1. @Benabik @gitster

    t/gitweb-lib: Split HTTP response with non-GNU sed

    Benabik committed with gitster Nov 23, 2009
    Recognizing \r in a regex is something GNU sed will do, but other sed
    implementation's won't (e.g. BSD sed on OS X).  Instead of two sed
    invocations, use a single Perl script to split output into headers
    and body.
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Sep 11, 2009
  1. @Benabik @gitster

    INSTALL: Describe dependency knobs from Makefile

    Benabik committed with gitster Sep 10, 2009
    We said that some of our dependencies were optional, but didn't say
    how to turn them off.  Add information for that and mention where to
    save the options close to the top of the file.
    
    Also, standardize on both using quotes for the names of the dependencies
    and tabs for indentation of the list.
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @Benabik @gitster

    INSTALL: Reorder dependencies, split shell and Perl

    Benabik committed with gitster Sep 8, 2009
    The most important and non-optional dependencies should go first, so put
    them there.  While we're moving them, the descriptions for shell and perl
    were archaic, referring to "bare-bones Porcelainish scripts" that have
    become powerful and essential.
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Sep 10, 2009
  1. @Benabik @gitster

    Makefile: Add NEEDS_CRYPTO_WITH_SSL

    Benabik committed with gitster Sep 8, 2009
    The Makefile comment for NEEDS_SSL_WITH_CRYPTO says to define it "if
    you need -lcrypto with -lssl (Darwin)."  However, what it actually
    does is add -lssl when you use -lcrypto and not the other way around.
    However, libcrypto contains a majority of the ERR_* functions from
    OpenSSL (at least on OS X) so we need it both ways.
    
    So, add NEEDS_CRYPTO_WITH_SSL which adds -lcrypto to the OpenSSL link
    flags and clarify the difference between it and NEEDS_SSL_WITH_CRYPTO.
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Sep 9, 2009
  1. @Benabik @gitster

    INSTALL: Update description of our SHA-1 code

    Benabik committed with gitster Sep 8, 2009
    We haven't had Mozilla's code or an ARM optimized algorithm since
    30ae47b.  Reword the paragraph to give credit but not authorship to
    Mozilla.
    
    Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 8, 2009
  1. @Benabik @gitster

    Makefile: Set compiler switch for USE_NSEC

    Benabik committed with gitster Mar 8, 2009
    The comments indicated that setting a Makefile variable USE_NSEC would
    enable the code for sub-second [cm]times.  However, the Makefile
    variable was never turned into a compiler switch so the code was never
    enabled.  This patch allows USE_NSEC to be noticed by the compiler.
    
    Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @Benabik @gitster

    Create USE_ST_TIMESPEC and turn it on for Darwin

    Benabik committed with gitster Mar 8, 2009
    Not all OSes use st_ctim and st_mtim in their struct stat.  In
    particular, it appears that OS X uses st_*timespec instead.  So add a
    Makefile variable and #define called USE_ST_TIMESPEC to switch the
    USE_NSEC defines to use st_*timespec.
    
    This also turns it on by default for OS X (Darwin) machines.  Likely
    this is a sane default for other BSD kernels as well, but I don't have
    any to test that assumption on.
    
    Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Something went wrong with that request. Please try again.