summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2011-12-10 07:06:12 -0600
committerJunio C Hamano <gitster@pobox.com>2011-12-12 13:33:53 -0800
commitd596118d7a9b104db10e64b2680a30ea80f1439c (patch)
tree3362b6008ab76012b7038c69ff574513df4cebcb /sequencer.c
parenta7eff1e027270062c4c08f11d63b4103f3d917fe (diff)
downloadgit-d596118d7a9b104db10e64b2680a30ea80f1439c.tar.gz
revert: stop creating and removing sequencer-old directoryjn/maint-sequencer-fixes
Now that "git reset" no longer implicitly removes .git/sequencer that the operator may or may not have wanted to keep, the logic to write a backup copy of .git/sequencer and remove it when stale is not needed any more. Simplify the sequencer API and repository layout by dropping it. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sequencer.c b/sequencer.c
index bc2c046aab..d1f28a6945 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -3,17 +3,11 @@
#include "strbuf.h"
#include "dir.h"
-void remove_sequencer_state(int aggressive)
+void remove_sequencer_state(void)
{
struct strbuf seq_dir = STRBUF_INIT;
- struct strbuf seq_old_dir = STRBUF_INIT;
strbuf_addf(&seq_dir, "%s", git_path(SEQ_DIR));
- strbuf_addf(&seq_old_dir, "%s", git_path(SEQ_OLD_DIR));
- remove_dir_recursively(&seq_old_dir, 0);
- rename(git_path(SEQ_DIR), git_path(SEQ_OLD_DIR));
- if (aggressive)
- remove_dir_recursively(&seq_old_dir, 0);
+ remove_dir_recursively(&seq_dir, 0);
strbuf_release(&seq_dir);
- strbuf_release(&seq_old_dir);
}