TrackGit
Status.h
Go to the documentation of this file.
1 
8 #ifndef _STATUS_H_
9 #define _STATUS_H_
10 
11 #include "GitCommand.h"
12 #include "../UI/StatusWindow.h"
13 
14 #include <SupportKit.h>
15 
16 #include <git2.h>
17 
18 #define MAX_PATHSPEC 8
19 
23 struct opts {
24  git_status_options statusopt;
25  const char *repodir;
27  int npaths;
28  int format;
29  int zterm;
32  int repeat;
33 };
34 
35 
39 class Status : public GitCommand {
43  BString fRepo;
47  BString fDirPath;
52 public:
53  Status(BString, BString);
54 
55  virtual void Execute();
56  BString* GetStatusText();
57  virtual TrackGitWindow* GetWindow();
58  static BString* GetStatusTextUtil(git_status_list*, StatusWindow*);
59  static BString* GetBranchText(git_repository*, StatusWindow*);
60 };
61 
62 #endif
Status Options structure.
Definition: Status.h:23
static BString * GetBranchText(git_repository *, StatusWindow *)
Constructs Branch text for current repo.
Definition: Status.cpp:280
BString fDirPath
The current directory where Status option is selected.
Definition: Status.h:47
virtual TrackGitWindow * GetWindow()
This returns pointer to the status window.
Definition: Status.cpp:37
Status command Class.
Definition: Status.h:39
BString * GetStatusText()
Constructs the entire Status Text along with current branch for given repo.
Definition: Status.cpp:313
GitCommand Class.
Definition: GitCommand.h:20
The Status Window class.
Definition: StatusWindow.h:38
int npaths
Definition: Status.h:27
static BString * GetStatusTextUtil(git_status_list *, StatusWindow *)
Constructs Status text for current repo.
Definition: Status.cpp:63
int showbranch
Definition: Status.h:30
BString fRepo
The repo/directory where command is called.
Definition: Status.h:43
StatusWindow * fStatusWindow
The Status Window.
Definition: Status.h:51
const char * repodir
Definition: Status.h:25
int showsubmod
Definition: Status.h:31
int format
Definition: Status.h:28
int repeat
Definition: Status.h:32
virtual void Execute()
Status command execution.
Definition: Status.cpp:50
int zterm
Definition: Status.h:29
#define MAX_PATHSPEC
Definition: Status.h:18
Status(BString, BString)
Status class Constructor.
Definition: Status.cpp:22
The TrackGit Window class.
git_status_options statusopt
Definition: Status.h:24
char * pathspec[MAX_PATHSPEC]
Definition: Status.h:26
Header file of GitCommand.