[Tarantool-patches] [PATCH 01/12] raft: move sources to raftlib.h/.c

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Tue Nov 17 03:02:15 MSK 2020

The commit renames raft.h and raft.c to raftlib.h and raftlib.c.
This is done to prepare to Raft split into src/box/ and

The commit is not atomic, the build won't work here. Because if
raft is renamed to raftlib, and in the same commit new raft.c and
raft.h are added, git thinks the original file was changed, and
ruins all the git history.

By splitting move of raft to raftlib and introduction of box/raft
into 2 commits the git history is saved.

Part of #5303
 src/box/CMakeLists.txt        | 1 +
 src/box/{raft.c => raftlib.c} | 0
 src/box/{raft.h => raftlib.h} | 0
 3 files changed, 1 insertion(+)
 rename src/box/{raft.c => raftlib.c} (100%)
 rename src/box/{raft.h => raftlib.h} (100%)

diff --git a/src/box/CMakeLists.txt b/src/box/CMakeLists.txt
index d1667796a..fcf779379 100644
--- a/src/box/CMakeLists.txt
+++ b/src/box/CMakeLists.txt
@@ -169,6 +169,7 @@ add_library(box STATIC
+    raftlib.c
diff --git a/src/box/raft.c b/src/box/raftlib.c
similarity index 100%
rename from src/box/raft.c
rename to src/box/raftlib.c
diff --git a/src/box/raft.h b/src/box/raftlib.h
similarity index 100%
rename from src/box/raft.h
rename to src/box/raftlib.h
2.24.3 (Apple Git-128)

More information about the Tarantool-patches mailing list