• Kyle Meyer's avatar
    magit-reverse-files: Extend binary file check · 6cf97f5c
    Kyle Meyer authored
    The magit apply variants fail on binary files because they operate on
    diff output that exists in the buffer, and that output isn't (and
    shouldn't be) inserted with `git diff --binary'.  d0e04a14
    (magit-reverse-files: do not attempt to reverse binary files,
    2015-03-06) provided a more informative error message by checking for
    staged binary files.  Teach magit-reverse-files to also check for
    binary files when reversing files from revision and diff buffers.
    
    For revision mode, note that we use `diff REV^..REV' rather than
    `diff-index REV', but diff-index would be needed to match what the
    revision buffer shows for merge and root commits.  However, using
    diff-index isn't worth the added complexity.  In the case of a merge
    commit, `diff REV^..REV' would still return the correct list of binary
    files in the very rare case that a binary file shows up as a resolved
    path in a revision buffer.  In the case of a root commit, we'd fail to
    detect binary files, but this just means that we fall back to
    displaying a less informative error message in the process buffer.
    
    Closes #3625.
    6cf97f5c
Name
Last commit
Last update
..
Makefile Loading commit data...
git-commit.el Loading commit data...
git-rebase.el Loading commit data...
magit-apply.el Loading commit data...
magit-autorevert.el Loading commit data...
magit-bisect.el Loading commit data...
magit-blame.el Loading commit data...
magit-bookmark.el Loading commit data...
magit-branch.el Loading commit data...
magit-clone.el Loading commit data...
magit-collab.el Loading commit data...
magit-commit.el Loading commit data...
magit-core.el Loading commit data...
magit-diff.el Loading commit data...
magit-ediff.el Loading commit data...
magit-extras.el Loading commit data...
magit-fetch.el Loading commit data...
magit-files.el Loading commit data...
magit-git.el Loading commit data...
magit-gitignore.el Loading commit data...
magit-imenu.el Loading commit data...
magit-log.el Loading commit data...
magit-margin.el Loading commit data...
magit-merge.el Loading commit data...
magit-mode.el Loading commit data...
magit-notes.el Loading commit data...
magit-obsolete.el Loading commit data...
magit-patch.el Loading commit data...
magit-pkg.el Loading commit data...
magit-process.el Loading commit data...
magit-pull.el Loading commit data...
magit-push.el Loading commit data...
magit-refs.el Loading commit data...
magit-remote.el Loading commit data...
magit-repos.el Loading commit data...
magit-reset.el Loading commit data...
magit-section.el Loading commit data...
magit-sequence.el Loading commit data...
magit-stash.el Loading commit data...
magit-status.el Loading commit data...
magit-submodule.el Loading commit data...
magit-subtree.el Loading commit data...
magit-tag.el Loading commit data...
magit-utils.el Loading commit data...
magit-wip.el Loading commit data...
magit-worktree.el Loading commit data...
magit.el Loading commit data...