1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:18:11 +00:00

HackStudio: Add functionality to GitRepo object

Added functionality for:
- Original files contents (without the current changes)
- Unstaged diffs
- Checking whether a file is tracked
This commit is contained in:
Itamar 2020-09-12 20:49:56 +03:00 committed by Andreas Kling
parent 8306a84967
commit ba11082b4b
2 changed files with 22 additions and 0 deletions

View file

@ -55,6 +55,9 @@ public:
bool stage(const LexicalPath& file);
bool unstage(const LexicalPath& file);
bool commit(const String& message);
Optional<String> original_file_content(const LexicalPath& file) const;
Optional<String> unstaged_diff(const LexicalPath& file) const;
bool is_tracked(const LexicalPath& file) const;
private:
static String command_wrapper(const Vector<String>& command_parts, const LexicalPath& chdir);