From 6345c3d08150e9a999abc5b0e204e303e31f574b Mon Sep 17 00:00:00 2001 From: Benjamin Bohard Date: Mon, 7 Sep 2020 18:40:07 +0200 Subject: [PATCH] Tester le checkout avant le commit --- setup_main_tex_file.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup_main_tex_file.py b/setup_main_tex_file.py index 8cd5380..d423b0f 100755 --- a/setup_main_tex_file.py +++ b/setup_main_tex_file.py @@ -80,7 +80,8 @@ def git_integration(func): author = repo.default_signature committer = author - + + repo.checkout('refs/heads/master') index = repo.index for fp in master_add_paths: index.add(fp) @@ -95,6 +96,7 @@ def git_integration(func): tree, parents) + repo.checkout(f'refs/heads/{branch_name}') for fp in branch_add_paths: index.add(fp) index.write()