Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
c07b52df
Commit
c07b52df
authored
Jan 02, 2013
by
Ben Straub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove `inmem` flag, use NULL name instead
parent
0642c143
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
src/remote.c
+3
-4
src/remote.h
+0
-1
No files found.
src/remote.c
View file @
c07b52df
...
...
@@ -191,7 +191,6 @@ int git_remote_create_inmemory(git_remote **out, git_repository *repo, const cha
if
((
error
=
create_internal
(
&
remote
,
repo
,
NULL
,
url
,
fetch
))
<
0
)
return
error
;
remote
->
inmem
=
true
;
*
out
=
remote
;
return
0
;
}
...
...
@@ -366,7 +365,7 @@ int git_remote_save(const git_remote *remote)
assert
(
remote
);
if
(
remote
->
inmem
)
{
if
(
!
remote
->
name
)
{
giterr_set
(
GITERR_INVALID
,
"Can't save an in-memory remote."
);
return
GIT_EINVALIDSPEC
;
}
...
...
@@ -1325,7 +1324,7 @@ int git_remote_rename(
assert
(
remote
&&
new_name
);
if
(
remote
->
inmem
)
{
if
(
!
remote
->
name
)
{
giterr_set
(
GITERR_INVALID
,
"Can't rename an in-memory remote."
);
return
GIT_EINVALIDSPEC
;
}
...
...
@@ -1347,7 +1346,7 @@ int git_remote_rename(
remote
->
name
=
git__strdup
(
new_name
);
if
(
remote
->
inmem
)
return
0
;
if
(
!
remote
->
name
)
return
0
;
return
git_remote_save
(
remote
);
}
...
...
src/remote.h
View file @
c07b52df
...
...
@@ -19,7 +19,6 @@ struct git_remote {
char
*
name
;
char
*
url
;
char
*
pushurl
;
bool
inmem
;
git_vector
refs
;
struct
git_refspec
fetch
;
struct
git_refspec
push
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment