Skip to content

Commit

Permalink
Show total number of steps
Browse files Browse the repository at this point in the history
  • Loading branch information
tfpf committed Nov 5, 2024
1 parent 1ecd124 commit 90c8be9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions custom-prompt/custom-prompt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,14 @@ void GitRepository::establish_state(void)
void GitRepository::establish_state_rebasing(void){
this->state = "rebasing";
std::ifstream msgnum_file(this->gitdir / "rebase-merge/msgnum");
if(!msgnum_file.good()){
if(!msgnum_file.good()){return;}
std::ifstream end_file(this->gitdir / "rebase-merge/end");
if(!end_file.good()){return;}
std::string msgnum_contents, end_contents;
if(!(msgnum_file >> msgnum_contents) || !(end_file >> end_contents)){
return;
}
std::string msgnum_contents;
msgnum_file >> msgnum_contents;
this->state += " " + msgnum_contents;
this->state += ' ' + msgnum_contents + '/' + end_contents;
}

/**
Expand Down

0 comments on commit 90c8be9

Please sign in to comment.