TrackGit
Utils.h
Go to the documentation of this file.
1 
9 #ifndef _UTILS_H_
10 #define _UTILS_H_
11 
12 #include "UI/ConflictsWindow.h"
13 
14 #include <AppKit.h>
15 #include <SupportKit.h>
16 
17 #include <vector.h>
18 #include <git2.h>
19 
20 enum {
34 };
35 
36 
40 #define ADDON_NAME "TrackGit"
41 
45 #define APP_SIGN "application/x-vnd.Haiku-TrackGit"
46 
47 void extract_selected_paths(const BMessage* msg,
48  vector<char*>& selected);
49 BString extract_current_directory(const BMessage* msg);
50 BString get_root_of_repo(BString dirPath);
51 int perform_fastforward(git_repository*, const git_oid*, int);
52 int create_commit(git_repository*, git_index*, const char*);
53 void output_conflicts(git_index*);
54 int cred_acquire_cb(git_cred**, const char*, const char*, unsigned int, void*);
55 
56 #endif
Definition: Utils.h:27
Definition: Utils.h:26
void extract_selected_paths(const BMessage *msg, vector< char *> &selected)
Get selected files.
Definition: Utils.cpp:50
Definition: Utils.h:24
Definition: Utils.h:25
Definition: Utils.h:33
BString extract_current_directory(const BMessage *msg)
Get current directory.
Definition: Utils.cpp:28
int perform_fastforward(git_repository *, const git_oid *, int)
This performs fastforward on given repo, branch id.
Definition: Utils.cpp:103
int cred_acquire_cb(git_cred **, const char *, const char *, unsigned int, void *)
This functions gets username and password from the user in case credentials are required.
Definition: Utils.cpp:299
void output_conflicts(git_index *)
Shows conflicts in current repo index in a window.
Definition: Utils.cpp:248
BString get_root_of_repo(BString dirPath)
Get the root of repo of current directory.
Definition: Utils.cpp:81
Definition: Utils.h:29
int create_commit(git_repository *, git_index *, const char *)
Creates a commit on given repo, index and message.
Definition: Utils.cpp:186
Definition: Utils.h:28
Definition: Utils.h:22
Header file of Conflicts window.