[22/24] am: keep backup of overwritten files on --skip or --abort
diff mbox series

Message ID 20181209104419.12639-23-pclouds@gmail.com
State New
Headers show
Series
  • Add backup log
Related show

Commit Message

Duy Nguyen Dec. 9, 2018, 10:44 a.m. UTC
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 builtin/am.c | 3 +++
 1 file changed, 3 insertions(+)

Patch
diff mbox series

diff --git a/builtin/am.c b/builtin/am.c
index 8f27f3375b..098bbaab39 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -1886,6 +1886,9 @@  static int fast_forward_to(struct tree *head, struct tree *remote, int reset)
 	opts.update = 1;
 	opts.merge = 1;
 	opts.reset = reset;
+	if (opts.reset)
+		repo_config_get_bool(the_repository, "core.backupLog",
+				     &opts.keep_backup);
 	opts.fn = twoway_merge;
 	init_tree_desc(&t[0], head->buffer, head->size);
 	init_tree_desc(&t[1], remote->buffer, remote->size);