Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
objective-git/ObjectiveGit/GTRemote.h at master · libgit2/objective-git · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
See all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
libgit2
objective-git
Repository navigation
Code
Issues
27
(27)
Pull requests
10
(10)
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
objective-git
/
ObjectiveGit
/
GTRemote.h
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
145 lines (118 loc) · 5.21 KB
master
Breadcrumbs
objective-git
/
ObjectiveGit
/
GTRemote.h
Copy path
Top
File metadata and controls
Code
Blame
145 lines (118 loc) · 5.21 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
//
//
GTRemote.h
//
ObjectiveGitFramework
//
//
Created by Josh Abernathy on 9/12/12.
//
Copyright (c) 2012 GitHub, Inc. All rights reserved.
//
#
import
<
Foundation/Foundation.h
>
#
import
"
git2/remote.h
"
@class
GTRepository;
@class
GTOID
;
@class
GTReference;
@class
GTCredentialProvider;
NS_ASSUME_NONNULL_BEGIN
extern
NSString
*
const
GTRemoteRenameProblematicRefSpecs;
//
Auto Tag settings. See `git_remote_autotag_option_t`.
typedef
enum
{
GTRemoteDownloadTagsAuto =
GIT_REMOTE_DOWNLOAD_TAGS_AUTO
,
GTRemoteDownloadTagsNone =
GIT_REMOTE_DOWNLOAD_TAGS_NONE
,
GTRemoteDownloadTagsAll =
GIT_REMOTE_DOWNLOAD_TAGS_ALL
,
} GTRemoteAutoTagOption;
//
/ A class representing a remote for a git repository.
//
/
//
/ Analogous to `git_remote` in libgit2.
@interface
GTRemote
:
NSObject
//
/ The repository owning this remote.
@property
(
nonatomic
,
readonly
,
strong
) GTRepository *repository;
//
/ The name of the remote.
@property
(
nonatomic
,
readonly
,
copy
)
NSString
* _Nullable name;
//
/ The URL string for the remote.
@property
(
nonatomic
,
readonly
,
copy
)
NSString
* _Nullable URLString;
//
/ The push URL for the remote, if provided.
@property
(
nonatomic
,
copy
)
NSString
* _Nullable pushURLString;
//
/ Whether the remote is connected or not.
@property
(
nonatomic
,
readonly
,
getter
=isConnected)
BOOL
connected;
//
/ Whether the remote updates FETCH_HEAD when fetched.
//
/ Defaults to YES.
@property
(
nonatomic
)
BOOL
updatesFetchHead;
//
/ The auto-tag setting for the remote.
@property
(
nonatomic
) GTRemoteAutoTagOption autoTag;
//
/ The fetch refspecs for this remote.
//
/
//
/ This array will contain NSStrings of the form
//
/ `+refs/heads/*:refs/remotes/REMOTE/*`.
@property
(
nonatomic
,
readonly
,
copy
)
NSArray
<NSString *> * _Nullable fetchRefspecs;
//
/ The push refspecs for this remote.
//
/
//
/ This array will contain NSStrings of the form
//
/ `+refs/heads/*:refs/remotes/REMOTE/*`.
@property
(
nonatomic
,
readonly
,
copy
)
NSArray
<NSString *> * _Nullable pushRefspecs;
//
/ Tests if a name is valid
+ (
BOOL
)
isValidRemoteName
:
(
NSString
*)
name
;
//
/ Create a new remote in a repository.
//
/
//
/ name - The name for the new remote. Cannot be nil.
//
/ URLString - The origin URL for the remote. Cannot be nil.
//
/ repo - The repository the remote should be created in. Cannot be nil.
//
/ error - Will be set if an error occurs.
//
/
//
/ Returns a new remote, or nil if an error occurred
+ (
instancetype
_Nullable)
createRemoteWithName
:
(
NSString
*)
name
URLString
:
(
NSString
*)
URLString
inRepository
:
(GTRepository *)
repo
error
:
(
NSError
**)
error
;
//
/ Load a remote from a repository.
//
/
//
/ name - The name for the new remote. Cannot be nil.
//
/ repo - The repository the remote should be looked up in. Cannot be nil.
//
/ error - Will be set if an error occurs.
//
/
//
/ Returns the loaded remote, or nil if an error occurred.
+ (
instancetype
_Nullable)
remoteWithName
:
(
NSString
*)
name
inRepository
:
(GTRepository *)
repo
error
:
(
NSError
**)
error
;
- (
instancetype
)
init
NS_UNAVAILABLE;
//
/ Initialize a remote from a `git_remote`. Designated initializer.
//
/
//
/ remote - The underlying `git_remote` object. Cannot be nil.
//
/ repo - The repository the remote belongs to. Cannot be nil.
//
/
//
/ Returns the initialized receiver, or nil if an error occurred.
- (
instancetype
_Nullable)
initWithGitRemote
:
(git_remote *)
remote
inRepository
:
(GTRepository *)
repo
NS_DESIGNATED_INITIALIZER;
//
/ The underlying `git_remote` object.
- (git_remote *)
git_remote
__attribute__((objc_returns_inner_pointer));
//
/ Rename the remote.
//
/
//
/ name - The new name for the remote. Cannot be nil.
//
/ error - Will be set if an error occurs. If there was an error renaming some
//
/ refspecs, their names will be available as an arry under the
//
/ `GTRemoteRenameProblematicRefSpecs` key.
//
/
//
/ Return YES if successful, NO otherwise.
- (
BOOL
)
rename
:
(
NSString
*)
name
error
:
(
NSError
**)
error
;
//
/ Updates the URL string for this remote.
//
/
//
/ URLString - The URLString to update to. May not be nil.
//
/ error - If not NULL, this will be set to any error that occurs when
//
/ updating the URLString or saving the remote.
//
/
//
/ Returns YES if the URLString was successfully updated, NO and an error
//
/ if updating or saving the remote failed.
- (
BOOL
)
updateURLString
:
(
NSString
*)
URLString
error
:
(
NSError
**)
error
;
//
/ Updates the push URL string for this remote.
//
/
//
/ URLString - The URLString to update to. May not be nil.
//
/ error - If not NULL, this will be set to any error that occurs when
//
/ updating the URLString or saving the remote.
//
/
//
/ Returns YES if the push URLString was successfully updated, NO and an error
//
/ if updating or saving the remote failed.
- (
BOOL
)
updatePushURLString
:
(
NSString
*)
URLString
error
:
(
NSError
**)
error
;
//
/ Adds a fetch refspec to this remote.
//
/
//
/ fetchRefspec - The fetch refspec string to add. May not be nil.
//
/ error - If not NULL, this will be set to any error that occurs
//
/ when adding the refspec or saving the remote.
//
/
//
/ Returns YES if there is the refspec is successfully added
//
/ or a matching refspec is already present, NO and an error if
//
/ adding the refspec or saving the remote failed.
- (
BOOL
)
addFetchRefspec
:
(
NSString
*)
fetchRefspec
error
:
(
NSError
**)
error
;
@end
NS_ASSUME_NONNULL_END
You can’t perform that action at this time.