forked from mbernson/SwiftGit2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request SwiftGit2#173 from spekke/support_status_options
Add support for status options
- Loading branch information
Showing
4 changed files
with
91 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// | ||
// Copyright © 2020 GitHub, Inc. All rights reserved. | ||
// | ||
|
||
import Clibgit2 | ||
import Foundation | ||
|
||
public struct StatusOptions: OptionSet { | ||
public let rawValue: UInt32 | ||
|
||
public init(rawValue: UInt32) { | ||
self.rawValue = rawValue | ||
} | ||
|
||
public static let includeUntracked = StatusOptions( | ||
rawValue: GIT_STATUS_OPT_INCLUDE_UNTRACKED.rawValue | ||
) | ||
public static let includeIgnored = StatusOptions( | ||
rawValue: GIT_STATUS_OPT_INCLUDE_IGNORED.rawValue | ||
) | ||
public static let includeUnmodified = StatusOptions( | ||
rawValue: GIT_STATUS_OPT_INCLUDE_UNMODIFIED.rawValue | ||
) | ||
public static let excludeSubmodules = StatusOptions( | ||
rawValue: GIT_STATUS_OPT_EXCLUDE_SUBMODULES.rawValue | ||
) | ||
public static let recurseUntrackedDirs = StatusOptions( | ||
rawValue: GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS.rawValue | ||
) | ||
public static let disablePathSpecMatch = StatusOptions( | ||
rawValue: GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH.rawValue | ||
) | ||
public static let recurseIgnoredDirs = StatusOptions( | ||
rawValue: GIT_STATUS_OPT_RECURSE_IGNORED_DIRS.rawValue | ||
) | ||
public static let renamesHeadToIndex = StatusOptions( | ||
rawValue: GIT_STATUS_OPT_RENAMES_HEAD_TO_INDEX.rawValue | ||
) | ||
public static let renamesIndexToWorkDir = StatusOptions( | ||
rawValue: GIT_STATUS_OPT_RENAMES_INDEX_TO_WORKDIR.rawValue | ||
) | ||
public static let sortCasesSensitively = StatusOptions( | ||
rawValue: GIT_STATUS_OPT_SORT_CASE_SENSITIVELY.rawValue | ||
) | ||
public static let sortCasesInSensitively = StatusOptions( | ||
rawValue: GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY.rawValue | ||
) | ||
public static let renamesFromRewrites = StatusOptions( | ||
rawValue: GIT_STATUS_OPT_RENAMES_FROM_REWRITES.rawValue | ||
) | ||
public static let noRefresh = StatusOptions( | ||
rawValue: GIT_STATUS_OPT_NO_REFRESH.rawValue | ||
) | ||
public static let updateIndex = StatusOptions( | ||
rawValue: GIT_STATUS_OPT_UPDATE_INDEX.rawValue | ||
) | ||
public static let includeUnreadable = StatusOptions( | ||
rawValue: GIT_STATUS_OPT_INCLUDE_UNREADABLE.rawValue | ||
) | ||
public static let includeUnreadableAsUntracked = StatusOptions( | ||
rawValue: GIT_STATUS_OPT_INCLUDE_UNREADABLE_AS_UNTRACKED.rawValue | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters