Skip to content

Commit 2f284f5

Browse files
committed
small fixes
1 parent 31972c4 commit 2f284f5

File tree

3 files changed

+4
-20
lines changed

3 files changed

+4
-20
lines changed

src/subcommand/merge_subcommand.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ void perform_fastforward(repository_wrapper& repo, const git_oid target_oid, int
8282
void merge_subcommand::create_merge_commit(
8383
repository_wrapper& repo,
8484
const index_wrapper& index,
85+
std::vector<std::string> m_branches_to_merge,
8586
const annotated_commit_list_wrapper& commits_to_merge,
8687
size_t num_commits_to_merge)
8788
{

src/subcommand/merge_subcommand.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class merge_subcommand
1818
void create_merge_commit(
1919
repository_wrapper& repo,
2020
const index_wrapper& index,
21+
std::vector<std::string> m_branches_to_merge,
2122
const annotated_commit_list_wrapper& commits_to_merge,
2223
size_t num_commits_to_merge);
2324

src/subcommand/status_subcommand.cpp

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,7 @@ void print_not_tracked(const std::vector<print_entry>& entries_to_print, const s
138138
const size_t first_slash_idx = e.item.find('/');
139139
if (std::string::npos != first_slash_idx)
140140
{
141-
auto directory = e.item.substr(0, first_slash_idx);
142-
auto directory_print = e.item.substr(0, first_slash_idx) + "/";
141+
auto directory = e.item.substr(0, first_slash_idx) + "/";
143142
if (tracked_dir_set.contains(directory))
144143
{
145144
not_tracked_entries_to_print.push_back(e);
@@ -150,7 +149,7 @@ void print_not_tracked(const std::vector<print_entry>& entries_to_print, const s
150149
{}
151150
else
152151
{
153-
not_tracked_entries_to_print.push_back({e.status, directory_print});
152+
not_tracked_entries_to_print.push_back({e.status, directory});
154153
untracked_dir_set.insert(std::string(directory));
155154
}
156155
}
@@ -291,21 +290,4 @@ void status_subcommand::run()
291290
// std::cout << std::endl;
292291
// }
293292
// }
294-
295-
if (!sl.has_tobecommited_header() && (sl.has_notstagged_header() || sl.has_untracked_header()))
296-
{
297-
if (sl.has_untracked_header())
298-
{
299-
std::cout << nothingtocommit_untrackedfiles_msg << std::endl;
300-
}
301-
else
302-
{
303-
std::cout << nothingtocommit_msg << std::endl;
304-
}
305-
}
306-
307-
if (!sl.has_notstagged_header() && !sl.has_untracked_header())
308-
{
309-
std::cout << uptodate_msg << std::endl;
310-
}
311293
}

0 commit comments

Comments
 (0)