Skip to content
  • Haaris Mehmood's avatar
    config: add --expiry-date · 5f967424
    Haaris Mehmood authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    Add --expiry-date as a data-type for config files when
    'git config --get' is used. This will return any relative
    or fixed dates from config files as timestamps.
    
    This is useful for scripts (e.g. gc.reflogexpire) that work
    with timestamps so that '2.weeks' can be converted to a format
    acceptable by those scripts/functions.
    
    Following the convention of git_config_pathname(), move
    the helper function required for this feature from
    builtin/reflog.c to builtin/config.c where other similar
    functions exist (e.g. for --bool or --path), and match
    the order of parameters with other functions (i.e. output
    pointer as first parameter).
    
    Signed-off-by: default avatarHaaris Mehmood <hsed@unimetic.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    5f967424