mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
HackStudio: Use new format functions.
This commit is contained in:
parent
3b601cd4bd
commit
7c4fb2b804
23 changed files with 112 additions and 117 deletions
|
@ -161,9 +161,8 @@ void DiffViewer::set_content(const String& original, const String& diff)
|
|||
m_hunks = Diff::parse_hunks(diff);
|
||||
|
||||
#ifdef DEBUG_DIFF
|
||||
for (size_t i = 0; i < m_original_lines.size(); ++i) {
|
||||
dbg() << i << ":" << m_original_lines[i];
|
||||
}
|
||||
for (size_t i = 0; i < m_original_lines.size(); ++i)
|
||||
dbgln("{}:{}", i, m_original_lines[i]);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ bool GitRepo::commit(const String& message)
|
|||
|
||||
Optional<String> GitRepo::original_file_content(const LexicalPath& file) const
|
||||
{
|
||||
return command({ "show", String::format("HEAD:%s", file.string().characters()) });
|
||||
return command({ "show", String::formatted("HEAD:{}", file) });
|
||||
}
|
||||
|
||||
Optional<String> GitRepo::unstaged_diff(const LexicalPath& file) const
|
||||
|
|
|
@ -128,7 +128,7 @@ bool GitWidget::initialize_if_needed()
|
|||
void GitWidget::refresh()
|
||||
{
|
||||
if (!initialize_if_needed()) {
|
||||
dbg() << "GitWidget initialization failed";
|
||||
dbgln("GitWidget initialization failed");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -140,7 +140,7 @@ void GitWidget::refresh()
|
|||
|
||||
void GitWidget::stage_file(const LexicalPath& file)
|
||||
{
|
||||
dbg() << "staging: " << file.string();
|
||||
dbgln("staging: {}", file);
|
||||
bool rc = m_git_repo->stage(file);
|
||||
ASSERT(rc);
|
||||
refresh();
|
||||
|
@ -148,7 +148,7 @@ void GitWidget::stage_file(const LexicalPath& file)
|
|||
|
||||
void GitWidget::unstage_file(const LexicalPath& file)
|
||||
{
|
||||
dbg() << "unstaging: " << file.string();
|
||||
dbgln("unstaging: {}", file);
|
||||
bool rc = m_git_repo->unstage(file);
|
||||
ASSERT(rc);
|
||||
refresh();
|
||||
|
@ -160,7 +160,7 @@ void GitWidget::commit()
|
|||
auto res = GUI::InputBox::show(message, window(), "Commit message:", "Commit");
|
||||
if (res != GUI::InputBox::ExecOK || message.is_empty())
|
||||
return;
|
||||
dbg() << "commit message: " << message;
|
||||
dbgln("commit message: {}", message);
|
||||
m_git_repo->commit(message);
|
||||
refresh();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue