TrackGit
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Status Class Reference

Status command Class. More...

#include <Status.h>

Inheritance diagram for Status:
GitCommand

Public Member Functions

 Status (BString, BString)
 Status class Constructor. More...
 
virtual void Execute ()
 Status command execution. More...
 
BString * GetStatusText ()
 Constructs the entire Status Text along with current branch for given repo. More...
 
virtual TrackGitWindowGetWindow ()
 This returns pointer to the status window. More...
 

Static Public Member Functions

static BString * GetStatusTextUtil (git_status_list *, StatusWindow *)
 Constructs Status text for current repo. More...
 
static BString * GetBranchText (git_repository *, StatusWindow *)
 Constructs Branch text for current repo. More...
 

Private Attributes

BString fRepo
 The repo/directory where command is called. More...
 
BString fDirPath
 The current directory where Status option is selected. More...
 
StatusWindowfStatusWindow
 The Status Window. More...
 

Detailed Description

Status command Class.

Definition at line 39 of file Status.h.

Constructor & Destructor Documentation

◆ Status()

Status::Status ( BString  repo,
BString  dirPath 
)

Status class Constructor.

Parameters
repoThe repo where the command is called.
dirPathThe current directory where Status is selected.

Definition at line 22 of file Status.cpp.

Member Function Documentation

◆ Execute()

void Status::Execute ( )
virtual

Status command execution.

Shows an alert with status text.

Implements GitCommand.

Definition at line 50 of file Status.cpp.

◆ GetBranchText()

BString * Status::GetBranchText ( git_repository *  repo,
StatusWindow window 
)
static

Constructs Branch text for current repo.

Parameters
repoThe current repo.
Returns
The Branch text.

Definition at line 280 of file Status.cpp.

◆ GetStatusText()

BString * Status::GetStatusText ( )

Constructs the entire Status Text along with current branch for given repo.

Parameters
dirPathThe current path to check status for.
Returns
The entire status text to display.

Definition at line 313 of file Status.cpp.

◆ GetStatusTextUtil()

BString * Status::GetStatusTextUtil ( git_status_list *  status,
StatusWindow window 
)
static

Constructs Status text for current repo.

Parameters
statusThe status info output of git_status_list_new.
Returns
The Status text.

Print index changes.




Print workdir changes to tracked files.



With GIT_STATUS_OPT_INCLUDE_UNMODIFIED (not used in this example) index_to_workdir may not be NULL even if there are no differences, in which case it will be a GIT_DELTA_UNMODIFIED.

Print out the output since we know the file has some changes

Print untracked files.
Print ignored files.

Definition at line 63 of file Status.cpp.

◆ GetWindow()

TrackGitWindow * Status::GetWindow ( )
virtual

This returns pointer to the status window.

Returns
The pointer to the Status Window.

Reimplemented from GitCommand.

Definition at line 37 of file Status.cpp.

Member Data Documentation

◆ fDirPath

BString Status::fDirPath
private

The current directory where Status option is selected.

Definition at line 47 of file Status.h.

◆ fRepo

BString Status::fRepo
private

The repo/directory where command is called.

Definition at line 43 of file Status.h.

◆ fStatusWindow

StatusWindow* Status::fStatusWindow
private

The Status Window.

Definition at line 51 of file Status.h.


The documentation for this class was generated from the following files: