• Show log

    Commit

  • Hash : 01740607
    Author : Stefan Sperling
    Date : 2020-11-04T20:18:53

    avoid got_repo_map_path() in 'got blame'
    
    'got blame' does not need access to the work tree. So far the work tree
    was completely hidden with unveil(). We must now expose the work tree
    while resolving the path, so unveil() calls are shuffled around slightly.
    Failing realpath() calls would mess with path resolution otherwise.
    
    There's a bug in got_worktree_resolve_path() where it failed to canonicalize
    a path constructed from a user-specified path that does not exist on disk.
    Note that this path falls into strncmp() a few lines down. I am fixing this
    by adding canonicalization. Generally, joining paths with asprintf() and
    comparing paths with strncmp() is fragile. A more general solution might be
    needed but I am leaving that for another day.
    
    ok naddy