added index caching
[git/mingw/4msysgit/wingit-dll.git] / igit.h
blobbbd87c4a9e5782f9b26a94bea19917f2196784f5
1 // igit.h
3 #ifndef _IGIT_H_
4 #define _IGIT_H_
6 #include <stdio.h>
9 // Flags for igEnumFiles
10 enum WGENUMFILEFLAGS
12 WGEFF_NoRecurse = (1<<0), // only enumerate files directly in the specified path
13 WGEFF_FullPath = (1<<1), // enumerated filenames are specified with full path (instead of relative to proj root)
14 WGEFF_DirStatusDelta= (1<<2), // include directories, in enumeration, that have a recursive status != WGFS_Normal (may have a slightly better performance than WGEFF_DirStatusAll)
15 WGEFF_DirStatusAll = (1<<3), // include directories, in enumeration, with recursive status
16 WGEFF_EmptyAsNormal = (1<<4), // report sub-directories, with no versioned files, as WGFS_Normal instead of WGFS_Empty
17 WGEFF_SingleFile = (1<<5), // indicates that the status of a single file or dir, specified by pszSubPath, is wanted
18 WGEFF_NoCacheIndex = (1<<6) // disable index caching functionality
21 // NOTE: Special behavior for directories when specifying WGEFF_SingleFile:
23 // * when combined with WGEFF_SingleFile the returned status will only reflect the immediate files in the dir,
24 // NOT the recusrive status of immediate sub-dirs
25 // * unlike a normal enumeration where the project root dir always is returned as WGFS_Normal regardless
26 // of WGEFF_EmptyAsNormal, the project root will return WGFS_Empty if no immediate versioned files
27 // unless WGEFF_EmptyAsNormal is specified
28 // * WGEFF_DirStatusDelta and WGEFF_DirStatusAll are ignored and can be omitted even for dirs
31 // File status
32 enum WGFILESTATUS
34 WGFS_Normal,
35 WGFS_Staged,
36 WGFS_Added,
37 WGFS_Deleted,
38 WGFS_Modified,
39 WGFS_Conflicted,
41 WGFS_Ignored = -1,
42 WGFS_Unversioned = -2,
43 WGFS_Empty = -3,
44 WGFS_Unknown = -4
48 // File flags
49 enum WGFILEFLAGS
51 WGFF_Directory = (1<<0) // enumerated file is a directory
55 void fputsha1(LPBYTE sha1, FILE *fp);
58 #endif