codex
Loading...
Searching...
No Matches
main.cpp File Reference
#include <algorithm>
#include <array>
#include <cassert>
#include <charconv>
#include <cctype>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <span>
#include <string>
#include <string_view>
#include <system_error>
#include <tuple>
#include <vector>
#include "exec.hpp"
Include dependency graph for main.cpp:

Classes

class  anonymous_namespace{main.cpp}::finally< F >
 Executes an action at scope exit. More...
 
struct  anonymous_namespace{main.cpp}::InteractiveLine
 Parsed information from a Git interactive rebase list. More...
 

Namespaces

namespace  anonymous_namespace{main.cpp}
 

Enumerations

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

Functions

bool anonymous_namespace{main.cpp}::is_space (unsigned char c)
 Convenient wrapper for the standard library function.
 
std::string_view anonymous_namespace{main.cpp}::lstrip (std::string_view s)
 Returns a view with leading white space removed.
 
std::tuple< std::string_view, std::string_view > anonymous_namespace{main.cpp}::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 > anonymous_namespace{main.cpp}::split (std::string_view s, std::string_view::iterator i)
 Overload taking an iterator into the string_view.
 
std::uint64_t anonymous_namespace{main.cpp}::parse_hash (std::string_view s)
 Parses a Git abbreviated hash into a u64.
 
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.
 
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.
 
Command anonymous_namespace{main.cpp}::process_args (int *argc, char ***argv)
 Processes command-line arguments.
 
bool anonymous_namespace{main.cpp}::process_lines (std::istream *input, auto &&f)
 Applies f to every line in input.
 
bool anonymous_namespace{main.cpp}::rebase_edit_hashes (std::istream *input, std::span< const std::uint64_t > hashes)
 
int anonymous_namespace{main.cpp}::cmd_edit_revs (int argc, char **argv)
 Changes the command to edit for matching hashes.
 
int anonymous_namespace{main.cpp}::cmd_edit_files (int argc, char **argv)
 Changes the command to edit for revisions that change specified files.
 
int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int argc,
char ** argv )
Here is the call graph for this function: