rpm  5.4.15
Macros | Typedefs | Functions | Variables
rpmgit.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define rpmgitUnlink(_git)   ((rpmgit)rpmioUnlinkPoolItem((rpmioItem)(_git), __FUNCTION__, __FILE__, __LINE__))
 
#define rpmgitLink(_git)   ((rpmgit)rpmioLinkPoolItem((rpmioItem)(_git), __FUNCTION__, __FILE__, __LINE__))
 
#define rpmgitFree(_git)   ((rpmgit)rpmioFreePoolItem((rpmioItem)(_git), __FUNCTION__, __FILE__, __LINE__))
 

Typedefs

typedef struct rpmgit_s * rpmgit
 

Functions

rpmgit rpmgitUnlink (rpmgit git)
 Unreference a git wrapper instance. More...
 
rpmgit rpmgitLink (rpmgit git)
 Reference a git wrapper instance. More...
 
rpmgit rpmgitFree (rpmgit git)
 Destroy a git wrapper. More...
 
rpmgit rpmgitNew (char **argv, uint32_t flags, void *_opts)
 Create and load a git wrapper. More...
 
rpmRC rpmgitRun (rpmgit git, const char *str, const char **resultp)
 Execute git string. More...
 
rpmRC rpmgitCmdAdd (int argc, char *argv[])
 
rpmRC rpmgitCmdCommit (int argc, char *argv[])
 
rpmRC rpmgitCmdDiff (int argc, char *argv[])
 
rpmRC rpmgitCmdInit (int argc, char *argv[])
 
rpmRC rpmgitCmdStatus (int argc, char *argv[])
 
void rpmgitPrintOid (const char *msg, const void *_oidp, void *_fp)
 
void rpmgitPrintTime (const char *msg, time_t _Ctime, void *_fp)
 
void rpmgitPrintSig (const char *msg, const void *___S, void *_fp)
 
void rpmgitPrintIndex (void *___I, void *_fp)
 
void rpmgitPrintTree (void *___T, void *_fp)
 
void rpmgitPrintCommit (rpmgit git, void *___C, void *_fp)
 
void rpmgitPrintTag (rpmgit git, void *_tag, void *_fp)
 
void rpmgitPrintHead (rpmgit git, void *___H, void *_fp)
 
void rpmgitPrintRepo (rpmgit git, void *___R, void *_fp)
 
int rpmgitInit (rpmgit git, void *initopts)
 
int rpmgitAddFile (rpmgit git, const char *fn)
 
int rpmgitCommit (rpmgit git, const char *msg)
 
int rpmgitConfig (rpmgit git)
 
const char * rpmgitOid (rpmgit git, const void *_oid)
 
int rpmgitClose (rpmgit git)
 
int rpmgitOpen (rpmgit git, const char *repodir)
 
int rpmgitInfo (rpmgit git)
 
int rpmgitTree (rpmgit git)
 
int rpmgitWalk (rpmgit git)
 
int rpmgitRead (rpmgit git)
 
int rpmgitWrite (rpmgit git)
 

Variables

int _rpmgit_debug
 
rpmgit _rpmgitI
 
const char * _rpmgit_dir
 
const char * _rpmgit_tree
 

Macro Definition Documentation

#define rpmgitFree (   _git)    ((rpmgit)rpmioFreePoolItem((rpmioItem)(_git), __FUNCTION__, __FILE__, __LINE__))

Definition at line 140 of file rpmgit.h.

#define rpmgitLink (   _git)    ((rpmgit)rpmioLinkPoolItem((rpmioItem)(_git), __FUNCTION__, __FILE__, __LINE__))

Definition at line 128 of file rpmgit.h.

#define rpmgitUnlink (   _git)    ((rpmgit)rpmioUnlinkPoolItem((rpmioItem)(_git), __FUNCTION__, __FILE__, __LINE__))

Definition at line 117 of file rpmgit.h.

Typedef Documentation

typedef struct rpmgit_s* rpmgit

Definition at line 10 of file rpmgit.h.

Function Documentation

int rpmgitAddFile ( rpmgit  git,
const char *  fn 
)

Definition at line 505 of file rpmgit.c.

References ns, and SPEW.

Referenced by rpmgitCmdInit().

int rpmgitClose ( rpmgit  git)

Definition at line 688 of file rpmgit.c.

References _free(), and SPEW.

rpmRC rpmgitCmdAdd ( int  argc,
char *  argv[] 
)

Definition at line 1300 of file rpmgit.c.

References _rpmgit_debug, N_, rpmgitFree(), rpmgitNew(), rpmgitPrintIndex(), RPMRC_FAIL, RPMRC_OK, and SPEW.

rpmRC rpmgitCmdCommit ( int  argc,
char *  argv[] 
)
rpmRC rpmgitCmdDiff ( int  argc,
char *  argv[] 
)

Definition at line 1653 of file rpmgit.c.

References b, i, N_, opts, rpmgitFree(), rpmgitNew(), RPMRC_FAIL, RPMRC_OK, and SPEW.

rpmRC rpmgitCmdInit ( int  argc,
char *  argv[] 
)
rpmRC rpmgitCmdStatus ( int  argc,
char *  argv[] 
)

Definition at line 2214 of file rpmgit.c.

References _free(), N_, rpmgitFree(), rpmgitNew(), RPMRC_FAIL, RPMRC_OK, SPEW, xstrdup(), and ZERO.

int rpmgitCommit ( rpmgit  git,
const char *  msg 
)

Definition at line 535 of file rpmgit.c.

References _rpmgit_debug, rpmgitPrintOid(), rpmgitPrintTree(), and SPEW.

Referenced by rpmgitCmdCommit(), and rpmgitCmdInit().

int rpmgitConfig ( rpmgit  git)

Definition at line 653 of file rpmgit.c.

References SPEW.

Referenced by rpmgitCmdInit().

rpmgit rpmgitFree ( rpmgit  git)

Destroy a git wrapper.

Parameters
gitgit wrapper
Returns
NULL on last dereference

Referenced by expandMacro(), rpmgitCmdAdd(), rpmgitCmdCommit(), rpmgitCmdDiff(), rpmgitCmdInit(), rpmgitCmdStatus(), and rpmioClean().

int rpmgitInfo ( rpmgit  git)

Definition at line 789 of file rpmgit.c.

References alloca(), gidToGname(), i, oid, SPEW, and uidToUname().

int rpmgitInit ( rpmgit  git,
void *  initopts 
)

Definition at line 473 of file rpmgit.c.

References _rpmgit_debug, opts, rpmgitPrintRepo(), and SPEW.

Referenced by rpmgitCmdInit().

rpmgit rpmgitLink ( rpmgit  git)

Reference a git wrapper instance.

Parameters
gitgit wrapper
Returns
new git wrapper reference

Referenced by rpmgitNew().

rpmgit rpmgitNew ( char **  argv,
uint32_t  flags,
void *  _opts 
)

Create and load a git wrapper.

Parameters
argvgit args
flagsgit flags
_optspoptOption table
Returns
new git wrapper

Definition at line 2750 of file rpmgit.c.

References _free(), _rpmgit_debug, _rpmgit_dir, _rpmgit_threads, arg, argvCount(), argvFree(), argvSplit(), flags, i, opts, rpmExpand(), rpmgitGetPool(), rpmgitI(), rpmgitLink(), rpmgitOpen(), rpmgitOpts, rpmgitPopt(), rpmgitRun(), Stat(), and xstrdup().

Referenced by expandMacro(), rpmgitCmdAdd(), rpmgitCmdCommit(), rpmgitCmdDiff(), rpmgitCmdInit(), rpmgitCmdStatus(), and rpmgitI().

const char* rpmgitOid ( rpmgit  git,
const void *  _oid 
)

Definition at line 675 of file rpmgit.c.

References oid.

int rpmgitOpen ( rpmgit  git,
const char *  repodir 
)

Definition at line 705 of file rpmgit.c.

References _free(), Realpath(), and SPEW.

Referenced by rpmgitNew().

void rpmgitPrintCommit ( rpmgit  git,
void *  ___C,
void *  _fp 
)

Referenced by rpmgitCmdCommit(), and rpmgitCmdInit().

void rpmgitPrintHead ( rpmgit  git,
void *  ___H,
void *  _fp 
)

Referenced by rpmgitCmdCommit(), and rpmgitCmdInit().

void rpmgitPrintIndex ( void *  ___I,
void *  _fp 
)
void rpmgitPrintOid ( const char *  msg,
const void *  _oidp,
void *  _fp 
)

Referenced by rpmgitCommit(), and rpmgitWalk().

void rpmgitPrintRepo ( rpmgit  git,
void *  ___R,
void *  _fp 
)

Referenced by rpmgitInit(), and rpmgitPopt().

void rpmgitPrintSig ( const char *  msg,
const void *  ___S,
void *  _fp 
)
void rpmgitPrintTag ( rpmgit  git,
void *  _tag,
void *  _fp 
)
void rpmgitPrintTime ( const char *  msg,
time_t  _Ctime,
void *  _fp 
)

Referenced by rpmgitWalk().

void rpmgitPrintTree ( void *  ___T,
void *  _fp 
)

Referenced by rpmgitCommit().

int rpmgitRead ( rpmgit  git)

Definition at line 850 of file rpmgit.c.

References data, obj, oid, and SPEW.

rpmRC rpmgitRun ( rpmgit  git,
const char *  str,
const char **  resultp 
)

Execute git string.

Parameters
gitgit interpreter (NULL uses global interpreter)
strgit string to execute (NULL returns RPMRC_FAIL)
*resultpgit exec result
Returns
RPMRC_OK on success

Definition at line 2825 of file rpmgit.c.

References _rpmgit_debug, cmd, rpmgitI(), and RPMRC_FAIL.

Referenced by expandMacro(), and rpmgitNew().

int rpmgitTree ( rpmgit  git)

Definition at line 730 of file rpmgit.c.

References SPEW.

rpmgit rpmgitUnlink ( rpmgit  git)

Unreference a git wrapper instance.

Parameters
gitgit wrapper
Returns
NULL on last dereference
int rpmgitWalk ( rpmgit  git)

Definition at line 744 of file rpmgit.c.

References oid, rpmgitPrintOid(), rpmgitPrintTime(), and SPEW.

int rpmgitWrite ( rpmgit  git)

Definition at line 877 of file rpmgit.c.

References alloca(), b, oid, and SPEW.

Variable Documentation

int _rpmgit_debug
const char* _rpmgit_dir

Definition at line 23 of file rpmgit.c.

Referenced by rpmgitNew().

const char* _rpmgit_tree

Definition at line 25 of file rpmgit.c.

rpmgit _rpmgitI

Definition at line 2717 of file rpmgit.c.

Referenced by rpmgitI(), and rpmioClean().