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

Everywhere: Rename {Deprecated => Byte}String

This commit un-deprecates DeprecatedString, and repurposes it as a byte
string.
As the null state has already been removed, there are no other
particularly hairy blockers in repurposing this type as a byte string
(what it _really_ is).

This commit is auto-generated:
  $ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \
    Meta Ports Ladybird Tests Kernel)
  $ perl -pie 's/\bDeprecatedString\b/ByteString/g;
    s/deprecated_string/byte_string/g' $xs
  $ clang-format --style=file -i \
    $(git diff --name-only | grep \.cpp\|\.h)
  $ gn format $(git ls-files '*.gn' '*.gni')
This commit is contained in:
Ali Mohammad Pur 2023-12-16 17:49:34 +03:30 committed by Ali Mohammad Pur
parent 38d62563b3
commit 5e1499d104
1615 changed files with 10257 additions and 10257 deletions

View file

@ -7,7 +7,7 @@
#pragma once
#include <AK/DeprecatedString.h>
#include <AK/ByteString.h>
#include <AK/LexicalPath.h>
#include <AK/Optional.h>
#include <AK/RefCounted.h>
@ -28,37 +28,37 @@ public:
RefPtr<GitRepo> repo;
};
static CreateResult try_to_create(DeprecatedString const& repository_root);
static RefPtr<GitRepo> initialize_repository(DeprecatedString const& repository_root);
static CreateResult try_to_create(ByteString const& repository_root);
static RefPtr<GitRepo> initialize_repository(ByteString const& repository_root);
bool stage(DeprecatedString const& file);
bool unstage(DeprecatedString const& file);
bool commit(DeprecatedString const& message);
bool is_tracked(DeprecatedString const& file) const;
bool stage(ByteString const& file);
bool unstage(ByteString const& file);
bool commit(ByteString const& message);
bool is_tracked(ByteString const& file) const;
Vector<DeprecatedString> unstaged_files() const;
Vector<DeprecatedString> staged_files() const;
Optional<DeprecatedString> original_file_content(DeprecatedString const& file) const;
Optional<DeprecatedString> unstaged_diff(DeprecatedString const& file) const;
Vector<ByteString> unstaged_files() const;
Vector<ByteString> staged_files() const;
Optional<ByteString> original_file_content(ByteString const& file) const;
Optional<ByteString> unstaged_diff(ByteString const& file) const;
private:
static bool git_is_installed();
static bool git_repo_exists(DeprecatedString const& repo_root);
static bool git_repo_exists(ByteString const& repo_root);
static Optional<DeprecatedString> command_wrapper(Vector<DeprecatedString> const& command_parts, DeprecatedString const& chdir);
static Vector<DeprecatedString> parse_files_list(DeprecatedString const&);
static Optional<ByteString> command_wrapper(Vector<ByteString> const& command_parts, ByteString const& chdir);
static Vector<ByteString> parse_files_list(ByteString const&);
explicit GitRepo(DeprecatedString const& repository_root)
explicit GitRepo(ByteString const& repository_root)
: m_repository_root(repository_root)
{
}
Vector<DeprecatedString> modified_files() const;
Vector<DeprecatedString> untracked_files() const;
Vector<ByteString> modified_files() const;
Vector<ByteString> untracked_files() const;
Optional<DeprecatedString> command(Vector<DeprecatedString> const& command_parts) const;
Optional<ByteString> command(Vector<ByteString> const& command_parts) const;
DeprecatedString m_repository_root;
ByteString m_repository_root;
};
}