• Show log

    Commit

  • Hash : 452bf57c
    Author : Richard Ipsum
    Date : 2016-08-27T13:42:53

    Make symbolic ref target validation optional
    
    Introduce GIT_OPT_ENABLE_SYMBOLIC_REF_TARGET_VALIDATION option.
    Setting this option to 0 allows
    validation of a symbolic ref's target to be bypassed.
    This option is enabled by default.
    
    This mechanism is added primarily to address a discrepancy between git
    behaviour and libgit2 behaviour, whereby the former allows the symbolic
    ref target to carry an arbitrary string and the latter does not, so:
    
        $ git symbolic-ref refs/heads/foo bar
        $ cat .git/refs/heads/foo
        ref: bar
    
    where as attempting the same via libgit2 raises an error:
    
        The given reference name 'bar' is not valid
    
    this mechanism also allows those that might want to make use of
    git's more lenient treatment of symbolic ref targets to do so.