swh:1:snp:6df5a50b8107b6bbe1e51d0239d816a7503c536a
Raw File
Tip revision: fc14b89a7e6899b8ac3b5751ec2d8c98203ea4c2 authored by Junio C Hamano on 28 November 2011, 22:07:13 UTC
Git 1.7.8-rc4
Tip revision: fc14b89
sequencer.c
#include "cache.h"
#include "sequencer.h"
#include "strbuf.h"
#include "dir.h"

void remove_sequencer_state(int aggressive)
{
	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);
	strbuf_release(&seq_dir);
	strbuf_release(&seq_old_dir);
}
back to top