File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 55
55
; ;; Code:
56
56
57
57
(require 'cl-lib )
58
+ (require 'dash )
58
59
59
60
(require 'magit )
60
61
@@ -463,10 +464,14 @@ Argument PATCHES is a list of patchnames.
463
464
Use ARGS to pass additional arguments."
464
465
(interactive (list (magit-stgit-read-patches t t t t " Delete patch" )
465
466
(magit-stgit-delete-arguments)))
466
- (when (and (called-interactively-p 'any )
467
- (not magit-current-popup)
468
- (y-or-n-p " Spill contents? " ))
469
- (add-to-list 'args " --spill" ))
467
+ (let ((affected-files
468
+ (-mapcat (lambda (patch )
469
+ (magit-stgit-lines " files" " --bare" patch))
470
+ patches)))
471
+ (when (and (called-interactively-p 'any )
472
+ (not magit-current-popup)
473
+ (and affected-files (y-or-n-p " Spill contents? " )))
474
+ (add-to-list 'args " --spill" )))
470
475
(let ((spill (member " --spill" args)))
471
476
(when spill
472
477
(setq spill (list " --spill" )))
You can’t perform that action at this time.
0 commit comments