Skip to content
  • Jeff King's avatar
    stash: prefer plumbing over git-diff · 9d4e28ea
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    When creating a stash, we need to look at the diff between
    the working tree and HEAD, and do so using the git-diff
    porcelain.  Because git-diff enables porcelain config like
    renames by default, this causes at least one problem. The
    --name-only format will not mention the source side of a
    rename, meaning we will fail to stash a deletion that is
    part of a rename.
    
    We could fix that case by passing --no-renames, but this is
    a symptom of a larger problem. We should be using the
    diff-index plumbing here, which does not have renames
    enabled by default, and also does not respect any
    potentially confusing config options.
    
    Reported-by: default avatarMatthew Patey <matthew.patey2167@gmail.com>
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    9d4e28ea