• brian m. carlson's avatar
    gitweb: make hash size independent · cfb04911
    brian m. carlson authored
    Gitweb has several hard-coded 40 values throughout it to check for
    values that are passed in or acquired from Git.  To simplify the code,
    introduce a regex variable that matches either exactly 40 or exactly 64
    hex characters, and use this variable anywhere we would have previously
    hard-coded a 40 in a regex.
    
    Add some helper functions which allow us to write tighter regexes that
    match exactly the number of hex characters we're expecting.
    
    Similarly, switch the code that looks for deleted diffinfo information
    to look for either 40 or 64 zeros, and update one piece of code to use
    this function.  Finally, when formatting a log line, allow an
    abbreviated describe output to contain up to 64 characters.
    Helped-by: Ævar Arnfjörð Bjarmason's avatarÆvar Arnfjörð Bjarmason <avarab@gmail.com>
    Signed-off-by: brian m. carlson's avatarbrian m. carlson <sandals@crustytoothpaste.net>
    Signed-off-by: 's avatarJunio C Hamano <gitster@pobox.com>
    cfb04911
Name
Last commit
Last update
..
static Loading commit data...
INSTALL Loading commit data...
Makefile Loading commit data...
README Loading commit data...
gitweb.perl Loading commit data...