MCPcopy Index your code
hub / github.com/dashed/git-chain / rebase_subcommand_conflict

Function rebase_subcommand_conflict

tests/rebase.rs:224–366  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

222
223#[test]
224fn rebase_subcommand_conflict() {
225 let repo_name = "rebase_subcommand_conflict";
226 let repo = setup_git_repo(repo_name);
227 let path_to_repo = generate_path_to_repo(repo_name);
228
229 {
230 // create new file
231 create_new_file(&path_to_repo, "hello_world.txt", "Hello, world!");
232
233 // add first commit to master
234 first_commit_all(&repo, "first commit");
235 };
236
237 assert_eq!(&get_current_branch_name(&repo), "master");
238
239 // create and checkout new branch named some_branch_1
240 {
241 let branch_name = "some_branch_1";
242 create_branch(&repo, branch_name);
243 checkout_branch(&repo, branch_name);
244 };
245
246 {
247 assert_eq!(&get_current_branch_name(&repo), "some_branch_1");
248
249 // create new file
250 create_new_file(&path_to_repo, "file_1.txt", "contents 1");
251
252 // add commit to branch some_branch_1
253 commit_all(&repo, "message");
254 };
255
256 // create and checkout new branch named some_branch_2
257 {
258 let branch_name = "some_branch_2";
259 create_branch(&repo, branch_name);
260 checkout_branch(&repo, branch_name);
261 };
262
263 {
264 assert_eq!(&get_current_branch_name(&repo), "some_branch_2");
265
266 // create new file
267 create_new_file(&path_to_repo, "file_2.txt", "contents 2");
268
269 // add commit to branch some_branch_2
270 commit_all(&repo, "message");
271 };
272
273 // run git chain setup
274 let args: Vec<&str> = vec![
275 "setup",
276 "chain_name",
277 "master",
278 "some_branch_1",
279 "some_branch_2",
280 ];
281 let output = run_test_bin_expect_ok(&path_to_repo, args);

Callers

nothing calls this directly

Calls 11

setup_git_repoFunction · 0.85
generate_path_to_repoFunction · 0.85
create_new_fileFunction · 0.85
first_commit_allFunction · 0.85
create_branchFunction · 0.85
checkout_branchFunction · 0.85
commit_allFunction · 0.85
run_test_bin_expect_okFunction · 0.85
run_test_bin_expect_errFunction · 0.85
run_git_commandFunction · 0.85
teardown_git_repoFunction · 0.85

Tested by

no test coverage detected