Skip to content

Commit

Permalink
Formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
tfpf committed Nov 5, 2024
1 parent 90c8be9 commit e6bc5ac
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions custom-prompt/custom-prompt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -320,18 +320,25 @@ void GitRepository::establish_state(void)
}
}


/**
* Obtain the rebase state of the working tree of the current Git repository.
*/
void GitRepository::establish_state_rebasing(void){
void GitRepository::establish_state_rebasing(void)
{
this->state = "rebasing";
std::ifstream msgnum_file(this->gitdir / "rebase-merge/msgnum");
if(!msgnum_file.good()){return;}
if (!msgnum_file.good())
{
return;
}
std::ifstream end_file(this->gitdir / "rebase-merge/end");
if(!end_file.good()){return;}
if (!end_file.good())
{
return;
}
std::string msgnum_contents, end_contents;
if(!(msgnum_file >> msgnum_contents) || !(end_file >> end_contents)){
if (!(msgnum_file >> msgnum_contents) || !(end_file >> end_contents))
{
return;
}
this->state += ' ' + msgnum_contents + '/' + end_contents;
Expand Down

0 comments on commit e6bc5ac

Please sign in to comment.