fixed issues with directory ignore detection
[git/mingw/4msysgit/wingit-dll.git] / igit.h
blobe657175691b908ae3bd5e3061db49390669d83a7
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
20 // NOTE: Special behavior for directories when specifying WGEFF_SingleFile:
22 // * when combined with WGEFF_SingleFile the returned status will only reflect the immediate files in the dir,
23 // NOT the recusrive status of immediate sub-dirs
24 // * unlike a normal enumeration where the project root dir always is returned as WGFS_Normal regardless
25 // of WGEFF_EmptyAsNormal, the project root will return WGFS_Empty if no immediate versioned files
26 // unless WGEFF_EmptyAsNormal is specified
27 // * WGEFF_DirStatusDelta and WGEFF_DirStatusAll are ignored and can be omitted even for dirs
30 // File status
31 enum WGFILESTATUS
33 WGFS_Normal,
34 WGFS_Modified,
35 WGFS_Staged,
36 WGFS_Added,
37 WGFS_Conflicted,
38 WGFS_Deleted,
40 WGFS_Ignored = -1,
41 WGFS_Unversioned = -2,
42 WGFS_Empty = -3,
43 WGFS_Unknown = -4
47 // File flags
48 enum WGFILEFLAGS
50 WGFF_Directory = (1<<0) // enumerated file is a directory
54 void fputsha1(LPBYTE sha1, FILE *fp);
57 #endif