- (setq file
- (buffer-substring-no-properties (+ (point) 4)
- (line-end-position)))
- (setq translated (assoc status-str translation))
- (push (list file (cdr translated)) result)
+ (setq translated (cdr (assoc status-str translation)))
+ ;; For conflicts the file appears twice in the listing: once
+ ;; with the M flag and once with the C flag, so take care not
+ ;; to add it twice to `result'. Ugly.
+ (if (eq translated 'conflict)
+ (let* ((file
+ (buffer-substring-no-properties
+ ;;For files with conflicts the format is:
+ ;;C Text conflict in FILENAME
+ ;; Bah.
+ (+ (point) 21) (line-end-position)))
+ (entry (assoc file result)))
+ (when entry
+ (setf (nth 1 entry) 'conflict)))
+ (push (list (buffer-substring-no-properties
+ (+ (point) 4)
+ (line-end-position))
+ translated) result))