Implemention file of Log command.
More...
#include "Log.h"
#include "../UI/LogWindow.h"
#include <InterfaceKit.h>
#include <stdlib.h>
#include <strings.h>
Go to the source code of this file.
|
void | check_lg2 (int error, const char *message, const char *extra) |
| Checks if libgit2 api was successfully executed. More...
|
|
static void | print_time (const git_time *intime, const char *prefix, BString &text) |
| Helper to format a git_time value like Git. More...
|
|
static void | print_commit (git_commit *commit, struct log_options *opts, BString &text) |
| Helper to print a commit object. More...
|
|
static void | push_rev (struct log_state *s, git_object *obj, int hide) |
| Push object (for hide or show) onto revwalker. More...
|
|
static int | add_revision (struct log_state *s, const char *revstr) |
| Parse revision string and add revs to walker. More...
|
|
Implemention file of Log command.
- Author
- Hrishikesh Hiraskar hrish.nosp@m.ihir.nosp@m.askar.nosp@m.@gma.nosp@m.il.co.nosp@m.m
Definition in file Log.cpp.
◆ add_revision()
static int add_revision |
( |
struct log_state * |
s, |
|
|
const char * |
revstr |
|
) |
| |
|
static |
Parse revision string and add revs to walker.
Open repo on demand if it isn't already open.
Definition at line 188 of file Log.cpp.
◆ check_lg2()
void check_lg2 |
( |
int |
error, |
|
|
const char * |
message, |
|
|
const char * |
extra |
|
) |
| |
Checks if libgit2 api was successfully executed.
Prints error if not.
- Parameters
-
error | The error code. |
message | The error message. |
extra | Any extra message. |
Definition at line 69 of file Log.cpp.
◆ print_commit()
static void print_commit |
( |
git_commit * |
commit, |
|
|
struct log_options * |
opts, |
|
|
BString & |
text |
|
) |
| |
|
static |
Helper to print a commit object.
Definition at line 122 of file Log.cpp.
◆ print_time()
static void print_time |
( |
const git_time * |
intime, |
|
|
const char * |
prefix, |
|
|
BString & |
text |
|
) |
| |
|
static |
Helper to format a git_time value like Git.
Definition at line 91 of file Log.cpp.
◆ push_rev()
static void push_rev |
( |
struct log_state * |
s, |
|
|
git_object * |
obj, |
|
|
int |
hide |
|
) |
| |
|
static |
Push object (for hide or show) onto revwalker.
Create revwalker on demand if it doesn't already exist.
Definition at line 161 of file Log.cpp.