TrackGit
Functions
Clone.cpp File Reference

Implemention file of Clone command. More...

#include "Clone.h"
#include "../UI/CloneWindow.h"
#include <AppKit.h>
#include <stdlib.h>
#include <strings.h>
#include <git2.h>

Go to the source code of this file.

Functions

static void print_progress (const progress_data *progress)
 Prints progress of command to the progress window. More...
 
static int sideband_progress (const char *str, int len, void *payload)
 Prints the progress from remote. More...
 
static int fetch_progress (const git_transfer_progress *stats, void *payload)
 Creates data structures for printing progress. More...
 
static void checkout_progress (const char *path, size_t cur, size_t tot, void *payload)
 Prints checkout progress. More...
 
void * DoCloneThread (void *arg)
 Clones the given url into given path along with showing progress in given progress window. More...
 

Detailed Description

Implemention file of Clone command.

Author
Hrishikesh Hiraskar hrish.nosp@m.ihir.nosp@m.askar.nosp@m.@gma.nosp@m.il.co.nosp@m.m

Definition in file Clone.cpp.

Function Documentation

◆ checkout_progress()

static void checkout_progress ( const char *  path,
size_t  cur,
size_t  tot,
void *  payload 
)
static

Prints checkout progress.

Parameters
pathThe clone path.
curCurrent completed steps.
totTotal steps.
payloadThe progress payload.

Definition at line 137 of file Clone.cpp.

◆ DoCloneThread()

void* DoCloneThread ( void *  arg)

Clones the given url into given path along with showing progress in given progress window.

Parameters
argThis contains url, path and progress window.

Definition at line 154 of file Clone.cpp.

◆ fetch_progress()

static int fetch_progress ( const git_transfer_progress *  stats,
void *  payload 
)
static

Creates data structures for printing progress.

Parameters
statsThe fetch progress.
payloadThe progress payload.

Definition at line 120 of file Clone.cpp.

◆ print_progress()

static void print_progress ( const progress_data progress)
static

Prints progress of command to the progress window.

Parameters
progressThe progress data.

Definition at line 60 of file Clone.cpp.

◆ sideband_progress()

static int sideband_progress ( const char *  str,
int  len,
void *  payload 
)
static

Prints the progress from remote.

Definition at line 105 of file Clone.cpp.