codex
Loading...
Searching...
No Matches
anonymous_namespace{main.cpp} Namespace Reference

Classes

class  finally
 Executes an action at scope exit. More...
 
struct  InteractiveLine
 Parsed information from a Git interactive rebase list. More...
 

Enumerations

enum class  Command { NONE , EDIT_REVISIONS , EDIT_FILES }
 Command chosen via command-line arguments. More...
 

Functions

bool is_space (unsigned char c)
 Convenient wrapper for the standard library function.
 
std::string_view lstrip (std::string_view s)
 Returns a view with leading white space removed.
 
std::tuple< std::string_view, std::string_view > split (std::string_view s, std::size_t i)
 Splits a string_view into two at the specified point.
 
std::tuple< std::string_view, std::string_view > split (std::string_view s, std::string_view::iterator i)
 Overload taking an iterator into the string_view.
 
std::uint64_t parse_hash (std::string_view s)
 Parses a Git abbreviated hash into a u64.
 
bool parse_hash_args (int argc, char **argv, std::vector< std::uint64_t > *v)
 Parses a series of command-line arguments as Git abbreviated hashes.
 
bool parse_hash_str (std::string_view s, std::vector< std::uint64_t > *out)
 Parses a list of Git abbreviated hashes separated by white space.
 
Command process_args (int *argc, char ***argv)
 Processes command-line arguments.
 
bool process_lines (std::istream *input, auto &&f)
 Applies f to every line in input.
 
bool rebase_edit_hashes (std::istream *input, std::span< const std::uint64_t > hashes)
 
int cmd_edit_revs (int argc, char **argv)
 Changes the command to edit for matching hashes.
 
int cmd_edit_files (int argc, char **argv)
 Changes the command to edit for revisions that change specified files.
 

Enumeration Type Documentation

◆ Command

enum class anonymous_namespace{main.cpp}::Command
strong

Command chosen via command-line arguments.

Enumerator
NONE 
EDIT_REVISIONS 
EDIT_FILES 

Function Documentation

◆ cmd_edit_files()

int anonymous_namespace{main.cpp}::cmd_edit_files ( int argc,
char ** argv )

Changes the command to edit for revisions that change specified files.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cmd_edit_revs()

int anonymous_namespace{main.cpp}::cmd_edit_revs ( int argc,
char ** argv )

Changes the command to edit for matching hashes.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_space()

bool anonymous_namespace{main.cpp}::is_space ( unsigned char c)
inline

Convenient wrapper for the standard library function.

Here is the caller graph for this function:

◆ lstrip()

std::string_view anonymous_namespace{main.cpp}::lstrip ( std::string_view s)

Returns a view with leading white space removed.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_hash()

std::uint64_t anonymous_namespace{main.cpp}::parse_hash ( std::string_view s)

Parses a Git abbreviated hash into a u64.

Returns
the value or zero if it could not be parsed.
Here is the caller graph for this function:

◆ parse_hash_args()

bool anonymous_namespace{main.cpp}::parse_hash_args ( int argc,
char ** argv,
std::vector< std::uint64_t > * v )

Parses a series of command-line arguments as Git abbreviated hashes.

See also
parse_hash
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_hash_str()

bool anonymous_namespace{main.cpp}::parse_hash_str ( std::string_view s,
std::vector< std::uint64_t > * out )

Parses a list of Git abbreviated hashes separated by white space.

See also
parse_hash
Here is the call graph for this function:
Here is the caller graph for this function:

◆ process_args()

Command anonymous_namespace{main.cpp}::process_args ( int * argc,
char *** argv )

Processes command-line arguments.

Returns the command selected and advances argc and argv.

Here is the caller graph for this function:

◆ process_lines()

bool anonymous_namespace{main.cpp}::process_lines ( std::istream * input,
auto && f )

Applies f to every line in input.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rebase_edit_hashes()

bool anonymous_namespace{main.cpp}::rebase_edit_hashes ( std::istream * input,
std::span< const std::uint64_t > hashes )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ split() [1/2]

std::tuple< std::string_view, std::string_view > anonymous_namespace{main.cpp}::split ( std::string_view s,
std::size_t i )
inline

Splits a string_view into two at the specified point.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ split() [2/2]

std::tuple< std::string_view, std::string_view > anonymous_namespace{main.cpp}::split ( std::string_view s,
std::string_view::iterator i )
inline

Overload taking an iterator into the string_view.

Here is the call graph for this function: