Skip to content

Commit 129adcd

Browse files
author
Tyrie Vella
committed
Fix duplication of GitCoreGVFSFlags
1 parent 2d48281 commit 129adcd

3 files changed

Lines changed: 58 additions & 63 deletions

File tree

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
using System;
2+
3+
namespace GVFS.Common.Git
4+
{
5+
[Flags]
6+
public enum GitCoreGVFSFlags
7+
{
8+
// GVFS_SKIP_SHA_ON_INDEX
9+
// Disables the calculation of the sha when writing the index
10+
SkipShaOnIndex = 1 << 0,
11+
12+
// GVFS_BLOCK_COMMANDS
13+
// Blocks git commands that are not allowed in a GVFS/Scalar repo
14+
BlockCommands = 1 << 1,
15+
16+
// GVFS_MISSING_OK
17+
// Normally git write-tree ensures that the objects referenced by the
18+
// directory exist in the object database.This option disables this check.
19+
MissingOk = 1 << 2,
20+
21+
// GVFS_NO_DELETE_OUTSIDE_SPARSECHECKOUT
22+
// When marking entries to remove from the index and the working
23+
// directory this option will take into account what the
24+
// skip-worktree bit was set to so that if the entry has the
25+
// skip-worktree bit set it will not be removed from the working
26+
// directory. This will allow virtualized working directories to
27+
// detect the change to HEAD and use the new commit tree to show
28+
// the files that are in the working directory.
29+
NoDeleteOutsideSparseCheckout = 1 << 3,
30+
31+
// GVFS_FETCH_SKIP_REACHABILITY_AND_UPLOADPACK
32+
// While performing a fetch with a virtual file system we know
33+
// that there will be missing objects and we don't want to download
34+
// them just because of the reachability of the commits. We also
35+
// don't want to download a pack file with commits, trees, and blobs
36+
// since these will be downloaded on demand. This flag will skip the
37+
// checks on the reachability of objects during a fetch as well as
38+
// the upload pack so that extraneous objects don't get downloaded.
39+
FetchSkipReachabilityAndUploadPack = 1 << 4,
40+
41+
// 1 << 5 has been deprecated
42+
43+
// GVFS_BLOCK_FILTERS_AND_EOL_CONVERSIONS
44+
// With a virtual file system we only know the file size before any
45+
// CRLF or smudge/clean filters processing is done on the client.
46+
// To prevent file corruption due to truncation or expansion with
47+
// garbage at the end, these filters must not run when the file
48+
// is first accessed and brought down to the client. Git.exe can't
49+
// currently tell the first access vs subsequent accesses so this
50+
// flag just blocks them from occurring at all.
51+
BlockFiltersAndEolConversions = 1 << 6,
52+
53+
// GVFS_PREFETCH_DURING_FETCH
54+
// While performing a `git fetch` command, use the gvfs-helper to
55+
// perform a "prefetch" of commits and trees.
56+
PrefetchDuringFetch = 1 << 7,
57+
}
58+
}

GVFS/GVFS.Mount/InProcessMount.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,16 +1255,6 @@ private bool TryCreateAlternatesFile(PhysicalFileSystem fileSystem, out string e
12551255
return true;
12561256
}
12571257

1258-
[Flags]
1259-
private enum GitCoreGVFSFlags
1260-
{
1261-
SkipShaOnIndex = 1 << 0,
1262-
BlockCommands = 1 << 1,
1263-
MissingOk = 1 << 2,
1264-
NoDeleteOutsideSparseCheckout = 1 << 3,
1265-
FetchSkipReachabilityAndUploadPack = 1 << 4,
1266-
BlockFiltersAndEolConversions = 1 << 6,
1267-
}
12681258

12691259
private bool TrySetRequiredGitConfigSettings()
12701260
{

GVFS/GVFS/CommandLine/GVFSVerb.cs

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -36,59 +36,6 @@ public GVFSVerb(bool validateOrigin = true)
3636
this.InitializeDefaultParameterValues();
3737
}
3838

39-
[Flags]
40-
private enum GitCoreGVFSFlags
41-
{
42-
// GVFS_SKIP_SHA_ON_INDEX
43-
// Disables the calculation of the sha when writing the index
44-
SkipShaOnIndex = 1 << 0,
45-
46-
// GVFS_BLOCK_COMMANDS
47-
// Blocks git commands that are not allowed in a GVFS/Scalar repo
48-
BlockCommands = 1 << 1,
49-
50-
// GVFS_MISSING_OK
51-
// Normally git write-tree ensures that the objects referenced by the
52-
// directory exist in the object database.This option disables this check.
53-
MissingOk = 1 << 2,
54-
55-
// GVFS_NO_DELETE_OUTSIDE_SPARSECHECKOUT
56-
// When marking entries to remove from the index and the working
57-
// directory this option will take into account what the
58-
// skip-worktree bit was set to so that if the entry has the
59-
// skip-worktree bit set it will not be removed from the working
60-
// directory. This will allow virtualized working directories to
61-
// detect the change to HEAD and use the new commit tree to show
62-
// the files that are in the working directory.
63-
NoDeleteOutsideSparseCheckout = 1 << 3,
64-
65-
// GVFS_FETCH_SKIP_REACHABILITY_AND_UPLOADPACK
66-
// While performing a fetch with a virtual file system we know
67-
// that there will be missing objects and we don't want to download
68-
// them just because of the reachability of the commits. We also
69-
// don't want to download a pack file with commits, trees, and blobs
70-
// since these will be downloaded on demand. This flag will skip the
71-
// checks on the reachability of objects during a fetch as well as
72-
// the upload pack so that extraneous objects don't get downloaded.
73-
FetchSkipReachabilityAndUploadPack = 1 << 4,
74-
75-
// 1 << 5 has been deprecated
76-
77-
// GVFS_BLOCK_FILTERS_AND_EOL_CONVERSIONS
78-
// With a virtual file system we only know the file size before any
79-
// CRLF or smudge/clean filters processing is done on the client.
80-
// To prevent file corruption due to truncation or expansion with
81-
// garbage at the end, these filters must not run when the file
82-
// is first accessed and brought down to the client. Git.exe can't
83-
// currently tell the first access vs subsequent accesses so this
84-
// flag just blocks them from occurring at all.
85-
BlockFiltersAndEolConversions = 1 << 6,
86-
87-
// GVFS_PREFETCH_DURING_FETCH
88-
// While performing a `git fetch` command, use the gvfs-helper to
89-
// perform a "prefetch" of commits and trees.
90-
PrefetchDuringFetch = 1 << 7,
91-
}
9239

9340
public abstract string EnlistmentRootPathParameter { get; set; }
9441

0 commit comments

Comments
 (0)