(if (eq patch-id :index)
'("--cached")
(list unmerged-stage))))
- (let ((args (append '("show" "-O" "--patch-with-stat" "-O" "-M")
+ (let ((args (append '("show" "-O" "--patch-with-stat")
+ `("-O" ,(stgit-find-copies-harder-diff-arg))
(and space-arg (list "-O" space-arg))
'("--")
(list (stgit-patch-name-at-point)))))
(error "Can only show diff range for applied patches"))
(stgit-capture-output (format "*StGit diff %s..%s*"
first-patch second-patch)
- (apply 'stgit-run-git (append '("diff" "--patch-with-stat")
- (and whitespace-arg (list whitespace-arg))
- (list (format "%s^" (stgit-id first-patch))
- (stgit-id second-patch))))
+ (apply 'stgit-run-git
+ "diff" "--patch-with-stat"
+ (stgit-find-copies-harder-diff-arg)
+ (append (and whitespace-arg (list whitespace-arg))
+ (list (format "%s^" (stgit-id first-patch))
+ (stgit-id second-patch))))
(with-current-buffer standard-output
(goto-char (point-min))
(diff-mode)))))
PATCHSYMS must not contain duplicate entries, unless
ALLOW-DUPLICATES is not nil."
- (let (sorted-patchsyms
- (series (with-output-to-string
- (with-current-buffer standard-output
- (stgit-run-silent "series" "--noprefix"))))
- start)
- (while (string-match "^\\(.+\\)" series start)
- (let ((patchsym (intern (match-string 1 series))))
- (when (memq patchsym patchsyms)
- (setq sorted-patchsyms (cons patchsym sorted-patchsyms))))
- (setq start (match-end 0)))
+ (let (sorted-patchsyms)
+ (ewoc-map #'(lambda (patch)
+ (let ((name (stgit-patch->name patch)))
+ (when (memq name patchsyms)
+ (setq sorted-patchsyms (cons name sorted-patchsyms))))
+ nil)
+ stgit-ewoc)
(setq sorted-patchsyms (nreverse sorted-patchsyms))
(unless allow-duplicates