Skip to content
  • Junio C Hamano's avatar
    revision: optionally record matches with pathspec elements · 86829f3f
    Junio C Hamano authored
    Unlike "git add" and other end-user facing commands, where it is
    diagnosed as an error to give a pathspec with an element that does
    not match any path, the diff machinery does not care if some
    elements of the pathspec do not match.  Given that the diff
    machinery is heavily used in pathspec-limited "git log" machinery,
    and it is common for a path to come and go while traversing the
    project history, this is usually a good thing.
    
    However, in some cases we would want to know if all the pathspec
    elements matched.  For example, "git add -u <pathspec>" internally
    uses the machinery used by "git diff-files" to decide contents from
    what paths to add to the index, and as an end-user facing command,
    "git add -u" would want to report an unmatched pathspec element.
    
    Add a new .ps_matched member next to the .prune_data member in
    "struct rev_info" so that we can optionally keep track of the use of
    .prune_data pathspec elements that can be inspected by the calle...
    86829f3f