libfossil
fsl_ckout_manage_opt Struct Reference

Options for use with fsl_ckout_manage(). More...

#include "checkout.h"

Collaboration diagram for fsl_ckout_manage_opt:

Data Fields

fsl_ckout_manage_f callback
 Optional predicate function which may be called for each to-be-added filename.
void * callbackState
 State to be passed to this->callback.
bool checkIgnoreGlobs
 Whether or not to check the name(s) against the 'ignore-globs' config setting (if set).
struct { 
   uint32_t   added 
 Number of files actually added by fsl_ckout_manage(). More...
   uint32_t   skipped 
 The number of files skipped over for addition. More...
   uint32_t   updated 
 Number of files which were requested to be added but were only updated because they had previously been added. More...
} counts
 These counts are updated by fsl_ckout_manage() to report what it did.
char const * filename
 The file or directory name to add.
bool relativeToCwd
 Whether to evaluate the given name as relative to the current working directory or to the current checkout root.

Detailed Description

Options for use with fsl_ckout_manage().

Definition at line 251 of file checkout.h.

Field Documentation

◆ added

uint32_t fsl_ckout_manage_opt::added

Number of files actually added by fsl_ckout_manage().

Definition at line 318 of file checkout.h.

◆ callback

fsl_ckout_manage_f fsl_ckout_manage_opt::callback

Optional predicate function which may be called for each to-be-added filename.

It is only called if:

  • It is not NULL (obviously) and...
  • The file is not already in the checkout database and...
  • The is-internal-name check passes (see fsl_reserved_fn_check()) and...
  • If checkIgnoreGlobs is false or the name does not match one of the ignore-globs values.

The name it is passed is relative to the checkout root.

Because the callback is called only if other options have not already excluded the file, the client may use the callback to report to the user (or otherwise record) exactly which files get added.

Definition at line 303 of file checkout.h.

◆ callbackState

void* fsl_ckout_manage_opt::callbackState

State to be passed to this->callback.

Definition at line 308 of file checkout.h.

◆ checkIgnoreGlobs

bool fsl_ckout_manage_opt::checkIgnoreGlobs

Whether or not to check the name(s) against the 'ignore-globs' config setting (if set).

Definition at line 281 of file checkout.h.

◆ [struct]

struct { ... } fsl_ckout_manage_opt::counts

These counts are updated by fsl_ckout_manage() to report what it did.

◆ filename

char const* fsl_ckout_manage_opt::filename

The file or directory name to add.

If it is a directory, the add process will recurse into it.

Note that filenames need to be passed in their "proper" case for the current platform. fsl_filename_preferred_case() case be used to do that, but that functionality is not currently part of the fsl_ckout_manage() inner workings (that may change at some point). fsl_cx_is_case_sensitive() can be used to determine whether or not case-sensitivity is preferred for the current repository.

Definition at line 264 of file checkout.h.

◆ relativeToCwd

bool fsl_ckout_manage_opt::relativeToCwd

Whether to evaluate the given name as relative to the current working directory or to the current checkout root.

This makes a subtle yet important difference in how the name is resolved. CLI apps which take file names from the user from within a checkout directory will generally want to set relativeToCwd to true. GUI apps, OTOH, will possibly need it to be false, depending on how they resolve and pass on the filenames.

Definition at line 276 of file checkout.h.

◆ skipped

uint32_t fsl_ckout_manage_opt::skipped

The number of files skipped over for addition.

This includes files which meet any of these criteria:

  • fsl_reserved_fn_check() fails.
  • If the checkIgnoreGlobs option is true and a filename matches any of those globs.
  • The client-provided callback says not to include the file.

Definition at line 338 of file checkout.h.

◆ updated

uint32_t fsl_ckout_manage_opt::updated

Number of files which were requested to be added but were only updated because they had previously been added.

Updates set the vfile table entry's current mtime, executable-bit state, and is-it-a-symlink state. (That said, this code currently ignores symlinks altogether!)

Definition at line 326 of file checkout.h.


The documentation for this struct was generated from the following file: