Skip to content

Commit 7d7ec31

Browse files
committed
comment unused code
1 parent 2ed957e commit 7d7ec31

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

src/subcommand/merge_subcommand.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -151,21 +151,21 @@ void merge_subcommand::run()
151151
assert(num_commits_to_merge == 1);
152152
perform_fastforward(repo, target_oid, (analysis & GIT_MERGE_ANALYSIS_UNBORN));
153153
}
154-
else if (analysis & GIT_MERGE_ANALYSIS_NORMAL)
155-
{
156-
git_merge_options merge_opts = GIT_MERGE_OPTIONS_INIT;
157-
git_checkout_options checkout_opts = GIT_CHECKOUT_OPTIONS_INIT;
154+
// else if (analysis & GIT_MERGE_ANALYSIS_NORMAL)
155+
// {
156+
// git_merge_options merge_opts = GIT_MERGE_OPTIONS_INIT;
157+
// git_checkout_options checkout_opts = GIT_CHECKOUT_OPTIONS_INIT;
158158

159-
merge_opts.flags = 0;
160-
merge_opts.file_flags = GIT_MERGE_FILE_STYLE_DIFF3;
159+
// merge_opts.flags = 0;
160+
// merge_opts.file_flags = GIT_MERGE_FILE_STYLE_DIFF3;
161161

162-
checkout_opts.checkout_strategy = GIT_CHECKOUT_FORCE|GIT_CHECKOUT_ALLOW_CONFLICTS;
162+
// checkout_opts.checkout_strategy = GIT_CHECKOUT_FORCE|GIT_CHECKOUT_ALLOW_CONFLICTS;
163163

164-
if (preference & GIT_MERGE_PREFERENCE_FASTFORWARD_ONLY)
165-
{
166-
std::cout << "Fast-forward is preferred, but only a merge is possible\n" << std::endl;
167-
// how to break ?
168-
}
164+
// if (preference & GIT_MERGE_PREFERENCE_FASTFORWARD_ONLY)
165+
// {
166+
// std::cout << "Fast-forward is preferred, but only a merge is possible\n" << std::endl;
167+
// // how to break ?
168+
// }
169169

170170
// git_merge(repo,
171171
// (const git_annotated_commit **)opts.annotated, opts.annotated_count,
@@ -179,4 +179,4 @@ void merge_subcommand::run()
179179
// create_merge_commit(repo, index, &opts);
180180
// printf("Merge made\n");
181181
// }
182-
}
182+
// }

test/test_merge.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66

77
# TODO: Have a different "person" for the commit and for the merge
8+
# TODO: Test "unborn" case, but how ?
89
def test_merge_fast_forward(xtl_clone, git_config, git2cpp_path, tmp_path, monkeypatch):
910
assert (tmp_path / "xtl").exists()
1011
xtl_path = tmp_path / "xtl"

0 commit comments

Comments
 (0)