1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:17:35 +00:00

HackStudio: Use String instead of LexicalPath

LexicalPath is a 'heavier' object than a String that is mainly used for
path parsing and validation, we don't actually need any of that in
GitRepo and its related files, so let's move to String :^)

I've also done some east-const conversion in the files that I was
editing for the string change.
This commit is contained in:
Conor Byrne 2021-12-31 18:18:08 +00:00 committed by Andreas Kling
parent 4cfc992125
commit 14b2656107
11 changed files with 79 additions and 77 deletions

View file

@ -24,19 +24,19 @@ public:
void refresh();
void set_view_diff_callback(ViewDiffCallback callback);
bool initialized() const { return !m_git_repo.is_null(); };
void change_repo(LexicalPath const& repo_root);
void change_repo(String const& repo_root);
private:
explicit GitWidget(const LexicalPath& repo_root);
explicit GitWidget(String const& repo_root);
bool initialize();
bool initialize_if_needed();
void stage_file(const LexicalPath&);
void unstage_file(const LexicalPath&);
void stage_file(String const&);
void unstage_file(String const&);
void commit();
void show_diff(const LexicalPath&);
void show_diff(String const&);
LexicalPath m_repo_root;
String m_repo_root;
RefPtr<GitFilesView> m_unstaged_files;
RefPtr<GitFilesView> m_staged_files;
RefPtr<GitRepo> m_git_repo;