TrackGit
Add.h
Go to the documentation of this file.
1 
8 #ifndef _ADD_H_
9 #define _ADD_H_
10 
11 #include "GitCommand.h"
12 
13 #include <SupportKit.h>
14 
15 #include <vector>
16 
17 #include <git2.h>
18 
19 
23 class Add : public GitCommand
24 {
28  BString fDirPath;
32  vector<char*> fFiles;
33 public:
34  Add(BString, vector<char*>);
35  virtual void Execute();
36  static int AddFiles(BString, vector<char*>);
37  static git_strarray InitArray(vector<char*> files);
38  static void FreeArray(git_strarray);
39 };
40 
41 #endif
BString fDirPath
The current directory where Init option is selected.
Definition: Add.h:28
GitCommand Class.
Definition: GitCommand.h:20
vector< char * > fFiles
The list of files to be added.
Definition: Add.h:32
Add(BString, vector< char *>)
Add command constructor.
Definition: Add.cpp:21
static int AddFiles(BString, vector< char *>)
Adds given files into git repository.
Definition: Add.cpp:67
static git_strarray InitArray(vector< char *> files)
Initializes git_strarray.
Definition: Add.cpp:36
Header file of GitCommand.
virtual void Execute()
Add command excution.
Definition: Add.cpp:106
Add command Class.
Definition: Add.h:23
static void FreeArray(git_strarray)
Frees the allocated strings in git_strarray.
Definition: Add.cpp:54