rugged 0.27.10.1 → 0.28.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/rugged/extconf.rb +23 -2
- data/ext/rugged/rugged.c +48 -2
- data/ext/rugged/rugged.h +5 -0
- data/ext/rugged/rugged_allocator.c +89 -0
- data/ext/rugged/rugged_blob.c +3 -3
- data/ext/rugged/rugged_branch.c +1 -1
- data/ext/rugged/rugged_commit.c +8 -8
- data/ext/rugged/rugged_config.c +1 -1
- data/ext/rugged/rugged_diff.c +24 -4
- data/ext/rugged/rugged_note.c +1 -1
- data/ext/rugged/rugged_repo.c +10 -10
- data/ext/rugged/rugged_settings.c +1 -1
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/CMakeLists.txt +69 -47
- data/vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake +15 -1
- data/vendor/libgit2/cmake/Modules/EnableWarnings.cmake +5 -8
- data/vendor/libgit2/cmake/Modules/FindmbedTLS.cmake +93 -0
- data/vendor/libgit2/deps/http-parser/CMakeLists.txt +2 -0
- data/vendor/libgit2/deps/http-parser/{LICENSE-MIT → COPYING} +0 -0
- data/vendor/libgit2/deps/regex/COPYING +502 -0
- data/vendor/libgit2/deps/winhttp/COPYING.GPL +993 -0
- data/vendor/libgit2/deps/winhttp/COPYING.LGPL +502 -0
- data/vendor/libgit2/deps/zlib/CMakeLists.txt +1 -0
- data/vendor/libgit2/deps/zlib/COPYING +27 -0
- data/vendor/libgit2/include/git2.h +3 -0
- data/vendor/libgit2/include/git2/annotated_commit.h +9 -0
- data/vendor/libgit2/include/git2/apply.h +129 -0
- data/vendor/libgit2/include/git2/attr.h +19 -8
- data/vendor/libgit2/include/git2/blame.h +41 -24
- data/vendor/libgit2/include/git2/blob.h +1 -1
- data/vendor/libgit2/include/git2/branch.h +1 -1
- data/vendor/libgit2/include/git2/buffer.h +2 -2
- data/vendor/libgit2/include/git2/checkout.h +20 -19
- data/vendor/libgit2/include/git2/cherrypick.h +6 -4
- data/vendor/libgit2/include/git2/clone.h +11 -9
- data/vendor/libgit2/include/git2/commit.h +30 -2
- data/vendor/libgit2/include/git2/common.h +54 -4
- data/vendor/libgit2/include/git2/config.h +18 -7
- data/vendor/libgit2/include/git2/deprecated.h +253 -0
- data/vendor/libgit2/include/git2/describe.h +30 -7
- data/vendor/libgit2/include/git2/diff.h +193 -143
- data/vendor/libgit2/include/git2/errors.h +54 -46
- data/vendor/libgit2/include/git2/ignore.h +2 -2
- data/vendor/libgit2/include/git2/index.h +72 -51
- data/vendor/libgit2/include/git2/indexer.h +30 -4
- data/vendor/libgit2/include/git2/mailmap.h +115 -0
- data/vendor/libgit2/include/git2/merge.h +29 -8
- data/vendor/libgit2/include/git2/net.h +1 -1
- data/vendor/libgit2/include/git2/notes.h +1 -1
- data/vendor/libgit2/include/git2/object.h +16 -16
- data/vendor/libgit2/include/git2/odb.h +10 -10
- data/vendor/libgit2/include/git2/odb_backend.h +7 -7
- data/vendor/libgit2/include/git2/oid.h +1 -1
- data/vendor/libgit2/include/git2/pack.h +2 -2
- data/vendor/libgit2/include/git2/proxy.h +9 -5
- data/vendor/libgit2/include/git2/rebase.h +7 -4
- data/vendor/libgit2/include/git2/refs.h +14 -15
- data/vendor/libgit2/include/git2/refspec.h +17 -0
- data/vendor/libgit2/include/git2/remote.h +92 -16
- data/vendor/libgit2/include/git2/repository.h +52 -37
- data/vendor/libgit2/include/git2/revert.h +5 -3
- data/vendor/libgit2/include/git2/revwalk.h +7 -7
- data/vendor/libgit2/include/git2/signature.h +2 -2
- data/vendor/libgit2/include/git2/stash.h +13 -10
- data/vendor/libgit2/include/git2/status.h +8 -4
- data/vendor/libgit2/include/git2/submodule.h +11 -10
- data/vendor/libgit2/include/git2/sys/alloc.h +101 -0
- data/vendor/libgit2/include/git2/sys/commit.h +1 -1
- data/vendor/libgit2/include/git2/sys/config.h +13 -13
- data/vendor/libgit2/include/git2/sys/filter.h +6 -6
- data/vendor/libgit2/include/git2/sys/index.h +3 -0
- data/vendor/libgit2/include/git2/sys/mempack.h +35 -35
- data/vendor/libgit2/include/git2/sys/merge.h +9 -4
- data/vendor/libgit2/include/git2/sys/odb_backend.h +19 -19
- data/vendor/libgit2/include/git2/sys/path.h +64 -0
- data/vendor/libgit2/include/git2/sys/refdb_backend.h +19 -19
- data/vendor/libgit2/include/git2/sys/stream.h +92 -12
- data/vendor/libgit2/include/git2/sys/transport.h +127 -81
- data/vendor/libgit2/include/git2/tag.h +2 -2
- data/vendor/libgit2/include/git2/trace.h +1 -1
- data/vendor/libgit2/include/git2/transaction.h +1 -0
- data/vendor/libgit2/include/git2/transport.h +47 -18
- data/vendor/libgit2/include/git2/tree.h +3 -3
- data/vendor/libgit2/include/git2/types.h +35 -28
- data/vendor/libgit2/include/git2/version.h +4 -4
- data/vendor/libgit2/include/git2/worktree.h +47 -12
- data/vendor/libgit2/src/CMakeLists.txt +87 -26
- data/vendor/libgit2/src/alloc.c +55 -0
- data/vendor/libgit2/src/alloc.h +40 -0
- data/vendor/libgit2/src/annotated_commit.c +15 -8
- data/vendor/libgit2/src/apply.c +490 -14
- data/vendor/libgit2/src/apply.h +3 -1
- data/vendor/libgit2/src/array.h +2 -2
- data/vendor/libgit2/src/attr.c +11 -11
- data/vendor/libgit2/src/attr_file.c +20 -15
- data/vendor/libgit2/src/attrcache.c +11 -11
- data/vendor/libgit2/src/blame.c +30 -15
- data/vendor/libgit2/src/blame.h +1 -0
- data/vendor/libgit2/src/blame_git.c +16 -13
- data/vendor/libgit2/src/blob.c +50 -28
- data/vendor/libgit2/src/blob.h +18 -1
- data/vendor/libgit2/src/branch.c +38 -38
- data/vendor/libgit2/src/buf_text.c +7 -6
- data/vendor/libgit2/src/buffer.c +55 -50
- data/vendor/libgit2/src/buffer.h +1 -1
- data/vendor/libgit2/src/cache.c +16 -16
- data/vendor/libgit2/src/cache.h +2 -2
- data/vendor/libgit2/src/cc-compat.h +15 -3
- data/vendor/libgit2/src/checkout.c +83 -74
- data/vendor/libgit2/src/cherrypick.c +6 -6
- data/vendor/libgit2/src/clone.c +20 -20
- data/vendor/libgit2/src/commit.c +53 -33
- data/vendor/libgit2/src/commit.h +1 -0
- data/vendor/libgit2/src/commit_list.c +6 -10
- data/vendor/libgit2/src/common.h +32 -30
- data/vendor/libgit2/src/config.c +167 -147
- data/vendor/libgit2/src/config.h +1 -14
- data/vendor/libgit2/src/config_backend.h +84 -0
- data/vendor/libgit2/src/config_cache.c +7 -1
- data/vendor/libgit2/src/config_entries.c +259 -0
- data/vendor/libgit2/src/config_entries.h +23 -0
- data/vendor/libgit2/src/config_file.c +167 -439
- data/vendor/libgit2/src/config_mem.c +224 -0
- data/vendor/libgit2/src/config_parse.c +69 -38
- data/vendor/libgit2/src/config_parse.h +4 -4
- data/vendor/libgit2/src/crlf.c +215 -186
- data/vendor/libgit2/src/delta.c +25 -18
- data/vendor/libgit2/src/describe.c +23 -23
- data/vendor/libgit2/src/diff.c +12 -12
- data/vendor/libgit2/src/diff_driver.c +14 -15
- data/vendor/libgit2/src/diff_file.c +10 -10
- data/vendor/libgit2/src/diff_generate.c +29 -23
- data/vendor/libgit2/src/diff_generate.h +1 -1
- data/vendor/libgit2/src/diff_parse.c +3 -3
- data/vendor/libgit2/src/diff_print.c +17 -17
- data/vendor/libgit2/src/diff_stats.c +22 -7
- data/vendor/libgit2/src/diff_tform.c +12 -12
- data/vendor/libgit2/src/diff_xdiff.c +15 -3
- data/vendor/libgit2/src/errors.c +42 -20
- data/vendor/libgit2/src/features.h.in +2 -1
- data/vendor/libgit2/src/fetch.c +3 -3
- data/vendor/libgit2/src/fetchhead.c +16 -16
- data/vendor/libgit2/src/filebuf.c +28 -28
- data/vendor/libgit2/src/fileops.c +54 -54
- data/vendor/libgit2/src/fileops.h +1 -1
- data/vendor/libgit2/src/filter.c +30 -30
- data/vendor/libgit2/src/filter.h +0 -10
- data/vendor/libgit2/src/global.c +36 -23
- data/vendor/libgit2/src/hash.h +4 -1
- data/vendor/libgit2/src/hash/hash_collisiondetect.h +6 -2
- data/vendor/libgit2/src/hash/hash_common_crypto.h +5 -1
- data/vendor/libgit2/src/hash/hash_generic.h +5 -1
- data/vendor/libgit2/src/hash/hash_mbedtls.c +38 -0
- data/vendor/libgit2/src/hash/hash_mbedtls.h +24 -0
- data/vendor/libgit2/src/hash/hash_openssl.h +8 -4
- data/vendor/libgit2/src/hash/hash_win32.c +13 -13
- data/vendor/libgit2/src/hashsig.c +4 -4
- data/vendor/libgit2/src/idxmap.c +25 -5
- data/vendor/libgit2/src/idxmap.h +4 -18
- data/vendor/libgit2/src/ignore.c +9 -9
- data/vendor/libgit2/src/index.c +280 -198
- data/vendor/libgit2/src/index.h +16 -0
- data/vendor/libgit2/src/indexer.c +311 -139
- data/vendor/libgit2/src/integer.h +32 -22
- data/vendor/libgit2/src/iterator.c +116 -49
- data/vendor/libgit2/src/iterator.h +15 -0
- data/vendor/libgit2/src/khash.h +3 -1
- data/vendor/libgit2/src/mailmap.c +485 -0
- data/vendor/libgit2/src/mailmap.h +35 -0
- data/vendor/libgit2/src/merge.c +89 -59
- data/vendor/libgit2/src/merge_driver.c +7 -7
- data/vendor/libgit2/src/merge_file.c +1 -1
- data/vendor/libgit2/src/mwindow.c +8 -8
- data/vendor/libgit2/src/netops.c +22 -13
- data/vendor/libgit2/src/netops.h +2 -0
- data/vendor/libgit2/src/notes.c +15 -10
- data/vendor/libgit2/src/object.c +118 -67
- data/vendor/libgit2/src/object.h +20 -9
- data/vendor/libgit2/src/object_api.c +8 -8
- data/vendor/libgit2/src/odb.c +72 -72
- data/vendor/libgit2/src/odb.h +7 -7
- data/vendor/libgit2/src/odb_loose.c +46 -46
- data/vendor/libgit2/src/odb_mempack.c +14 -14
- data/vendor/libgit2/src/odb_pack.c +14 -10
- data/vendor/libgit2/src/offmap.c +30 -0
- data/vendor/libgit2/src/offmap.h +20 -11
- data/vendor/libgit2/src/oid.c +6 -6
- data/vendor/libgit2/src/oidmap.c +20 -0
- data/vendor/libgit2/src/oidmap.h +9 -12
- data/vendor/libgit2/src/pack-objects.c +71 -63
- data/vendor/libgit2/src/pack-objects.h +1 -7
- data/vendor/libgit2/src/pack.c +58 -58
- data/vendor/libgit2/src/pack.h +6 -6
- data/vendor/libgit2/src/parse.h +1 -1
- data/vendor/libgit2/src/patch.c +3 -3
- data/vendor/libgit2/src/patch_generate.c +18 -18
- data/vendor/libgit2/src/patch_parse.c +13 -13
- data/vendor/libgit2/src/path.c +93 -225
- data/vendor/libgit2/src/path.h +2 -84
- data/vendor/libgit2/src/pathspec.c +6 -6
- data/vendor/libgit2/src/posix.c +3 -3
- data/vendor/libgit2/src/proxy.c +1 -1
- data/vendor/libgit2/src/push.c +27 -26
- data/vendor/libgit2/src/push.h +2 -1
- data/vendor/libgit2/src/reader.c +265 -0
- data/vendor/libgit2/src/reader.h +107 -0
- data/vendor/libgit2/src/rebase.c +49 -52
- data/vendor/libgit2/src/refdb.c +3 -3
- data/vendor/libgit2/src/refdb_fs.c +181 -103
- data/vendor/libgit2/src/reflog.c +3 -3
- data/vendor/libgit2/src/refs.c +98 -74
- data/vendor/libgit2/src/refs.h +5 -3
- data/vendor/libgit2/src/refspec.c +47 -21
- data/vendor/libgit2/src/refspec.h +1 -1
- data/vendor/libgit2/src/remote.c +219 -166
- data/vendor/libgit2/src/remote.h +9 -0
- data/vendor/libgit2/src/repository.c +173 -133
- data/vendor/libgit2/src/repository.h +6 -3
- data/vendor/libgit2/src/reset.c +8 -8
- data/vendor/libgit2/src/revert.c +6 -6
- data/vendor/libgit2/src/revparse.c +30 -30
- data/vendor/libgit2/src/revwalk.c +60 -30
- data/vendor/libgit2/src/revwalk.h +2 -1
- data/vendor/libgit2/src/settings.c +42 -10
- data/vendor/libgit2/src/signature.c +11 -11
- data/vendor/libgit2/src/sortedcache.c +13 -13
- data/vendor/libgit2/src/stash.c +91 -45
- data/vendor/libgit2/src/status.c +13 -13
- data/vendor/libgit2/src/stdalloc.c +120 -0
- data/vendor/libgit2/src/{streams/curl.h → stdalloc.h} +6 -6
- data/vendor/libgit2/src/stream.h +17 -2
- data/vendor/libgit2/src/streams/mbedtls.c +483 -0
- data/vendor/libgit2/src/streams/mbedtls.h +23 -0
- data/vendor/libgit2/src/streams/openssl.c +204 -114
- data/vendor/libgit2/src/streams/openssl.h +4 -108
- data/vendor/libgit2/src/streams/registry.c +118 -0
- data/vendor/libgit2/src/streams/registry.h +19 -0
- data/vendor/libgit2/src/streams/socket.c +54 -29
- data/vendor/libgit2/src/streams/stransport.c +57 -32
- data/vendor/libgit2/src/streams/stransport.h +5 -0
- data/vendor/libgit2/src/streams/tls.c +50 -19
- data/vendor/libgit2/src/streams/tls.h +12 -4
- data/vendor/libgit2/src/strmap.c +22 -2
- data/vendor/libgit2/src/strmap.h +18 -15
- data/vendor/libgit2/src/submodule.c +179 -155
- data/vendor/libgit2/src/sysdir.c +18 -18
- data/vendor/libgit2/src/tag.c +31 -26
- data/vendor/libgit2/src/tag.h +2 -1
- data/vendor/libgit2/src/trace.c +1 -1
- data/vendor/libgit2/src/trace.h +1 -1
- data/vendor/libgit2/src/trailer.c +6 -6
- data/vendor/libgit2/src/transaction.c +23 -23
- data/vendor/libgit2/src/transport.c +5 -5
- data/vendor/libgit2/src/transports/auth.c +7 -4
- data/vendor/libgit2/src/transports/auth.h +1 -1
- data/vendor/libgit2/src/transports/auth_negotiate.c +12 -11
- data/vendor/libgit2/src/transports/cred.c +18 -18
- data/vendor/libgit2/src/transports/git.c +15 -15
- data/vendor/libgit2/src/transports/http.c +606 -216
- data/vendor/libgit2/src/transports/http.h +2 -0
- data/vendor/libgit2/src/transports/local.c +26 -26
- data/vendor/libgit2/src/transports/smart.c +54 -31
- data/vendor/libgit2/src/transports/smart.h +1 -2
- data/vendor/libgit2/src/transports/smart_pkt.c +43 -40
- data/vendor/libgit2/src/transports/smart_protocol.c +61 -57
- data/vendor/libgit2/src/transports/ssh.c +34 -33
- data/vendor/libgit2/src/transports/winhttp.c +99 -119
- data/vendor/libgit2/src/tree-cache.c +5 -5
- data/vendor/libgit2/src/tree.c +96 -121
- data/vendor/libgit2/src/tree.h +1 -12
- data/vendor/libgit2/src/unix/map.c +2 -2
- data/vendor/libgit2/src/util.c +22 -6
- data/vendor/libgit2/src/util.h +12 -135
- data/vendor/libgit2/src/vector.c +4 -4
- data/vendor/libgit2/src/win32/dir.c +3 -3
- data/vendor/libgit2/src/win32/findfile.c +3 -3
- data/vendor/libgit2/src/win32/map.c +6 -6
- data/vendor/libgit2/src/win32/msvc-compat.h +6 -0
- data/vendor/libgit2/src/win32/path_w32.c +101 -7
- data/vendor/libgit2/src/win32/path_w32.h +18 -0
- data/vendor/libgit2/src/win32/posix_w32.c +24 -43
- data/vendor/libgit2/src/win32/w32_buffer.c +2 -2
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.c +96 -2
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.h +28 -75
- data/vendor/libgit2/src/win32/w32_stack.c +2 -2
- data/vendor/libgit2/src/win32/w32_util.c +1 -69
- data/vendor/libgit2/src/win32/w32_util.h +1 -19
- data/vendor/libgit2/src/worktree.c +75 -54
- data/vendor/libgit2/src/worktree.h +2 -0
- data/vendor/libgit2/src/xdiff/xdiffi.c +7 -5
- data/vendor/libgit2/src/xdiff/xhistogram.c +1 -1
- data/vendor/libgit2/src/xdiff/xmerge.c +15 -15
- data/vendor/libgit2/src/zstream.c +4 -4
- metadata +33 -7
- data/vendor/libgit2/src/config_file.h +0 -73
- data/vendor/libgit2/src/streams/curl.c +0 -385
data/vendor/libgit2/src/reflog.c
CHANGED
@@ -81,7 +81,7 @@ int git_reflog_append(git_reflog *reflog, const git_oid *new_oid, const git_sign
|
|
81
81
|
assert(reflog && new_oid && committer);
|
82
82
|
|
83
83
|
entry = git__calloc(1, sizeof(git_reflog_entry));
|
84
|
-
|
84
|
+
GIT_ERROR_CHECK_ALLOC(entry);
|
85
85
|
|
86
86
|
if ((git_signature_dup(&entry->committer, committer)) < 0)
|
87
87
|
goto cleanup;
|
@@ -94,7 +94,7 @@ int git_reflog_append(git_reflog *reflog, const git_oid *new_oid, const git_sign
|
|
94
94
|
|
95
95
|
if (newline) {
|
96
96
|
if (newline[1] != '\0') {
|
97
|
-
|
97
|
+
git_error_set(GIT_ERROR_INVALID, "reflog message cannot contain newline");
|
98
98
|
goto cleanup;
|
99
99
|
}
|
100
100
|
|
@@ -194,7 +194,7 @@ int git_reflog_drop(git_reflog *reflog, size_t idx, int rewrite_previous_entry)
|
|
194
194
|
entry = (git_reflog_entry *)git_reflog_entry_byindex(reflog, idx);
|
195
195
|
|
196
196
|
if (entry == NULL) {
|
197
|
-
|
197
|
+
git_error_set(GIT_ERROR_REFERENCE, "no reflog entry at index %"PRIuZ, idx);
|
198
198
|
return GIT_ENOTFOUND;
|
199
199
|
}
|
200
200
|
|
data/vendor/libgit2/src/refs.c
CHANGED
@@ -59,7 +59,7 @@ git_reference *git_reference__alloc_symbolic(
|
|
59
59
|
if (!ref)
|
60
60
|
return NULL;
|
61
61
|
|
62
|
-
ref->type =
|
62
|
+
ref->type = GIT_REFERENCE_SYMBOLIC;
|
63
63
|
|
64
64
|
if ((ref->target.symbolic = git__strdup(target)) == NULL) {
|
65
65
|
git__free(ref);
|
@@ -82,7 +82,7 @@ git_reference *git_reference__alloc(
|
|
82
82
|
if (!ref)
|
83
83
|
return NULL;
|
84
84
|
|
85
|
-
ref->type =
|
85
|
+
ref->type = GIT_REFERENCE_DIRECT;
|
86
86
|
git_oid_cpy(&ref->target.oid, oid);
|
87
87
|
|
88
88
|
if (peel != NULL)
|
@@ -108,12 +108,12 @@ git_reference *git_reference__set_name(
|
|
108
108
|
|
109
109
|
int git_reference_dup(git_reference **dest, git_reference *source)
|
110
110
|
{
|
111
|
-
if (source->type ==
|
111
|
+
if (source->type == GIT_REFERENCE_SYMBOLIC)
|
112
112
|
*dest = git_reference__alloc_symbolic(source->name, source->target.symbolic);
|
113
113
|
else
|
114
114
|
*dest = git_reference__alloc(source->name, &source->target.oid, &source->peel);
|
115
115
|
|
116
|
-
|
116
|
+
GIT_ERROR_CHECK_ALLOC(*dest);
|
117
117
|
|
118
118
|
(*dest)->db = source->db;
|
119
119
|
GIT_REFCOUNT_INC((*dest)->db);
|
@@ -126,7 +126,7 @@ void git_reference_free(git_reference *reference)
|
|
126
126
|
if (reference == NULL)
|
127
127
|
return;
|
128
128
|
|
129
|
-
if (reference->type ==
|
129
|
+
if (reference->type == GIT_REFERENCE_SYMBOLIC)
|
130
130
|
git__free(reference->target.symbolic);
|
131
131
|
|
132
132
|
if (reference->db)
|
@@ -140,7 +140,7 @@ int git_reference_delete(git_reference *ref)
|
|
140
140
|
const git_oid *old_id = NULL;
|
141
141
|
const char *old_target = NULL;
|
142
142
|
|
143
|
-
if (ref->type ==
|
143
|
+
if (ref->type == GIT_REFERENCE_DIRECT)
|
144
144
|
old_id = &ref->target.oid;
|
145
145
|
else
|
146
146
|
old_target = ref->target.symbolic;
|
@@ -186,14 +186,14 @@ static int reference_normalize_for_repo(
|
|
186
186
|
bool validate)
|
187
187
|
{
|
188
188
|
int precompose;
|
189
|
-
unsigned int flags =
|
189
|
+
unsigned int flags = GIT_REFERENCE_FORMAT_ALLOW_ONELEVEL;
|
190
190
|
|
191
191
|
if (!git_repository__cvar(&precompose, repo, GIT_CVAR_PRECOMPOSE) &&
|
192
192
|
precompose)
|
193
|
-
flags |=
|
193
|
+
flags |= GIT_REFERENCE_FORMAT__PRECOMPOSE_UNICODE;
|
194
194
|
|
195
195
|
if (!validate)
|
196
|
-
flags |=
|
196
|
+
flags |= GIT_REFERENCE_FORMAT__VALIDATION_DISABLE;
|
197
197
|
|
198
198
|
return git_reference_normalize_name(out, GIT_REFNAME_MAX, name, flags);
|
199
199
|
}
|
@@ -205,7 +205,7 @@ int git_reference_lookup_resolved(
|
|
205
205
|
int max_nesting)
|
206
206
|
{
|
207
207
|
git_refname_t scan_name;
|
208
|
-
|
208
|
+
git_reference_t scan_type;
|
209
209
|
int error = 0, nesting;
|
210
210
|
git_reference *ref = NULL;
|
211
211
|
git_refdb *refdb;
|
@@ -219,7 +219,7 @@ int git_reference_lookup_resolved(
|
|
219
219
|
else if (max_nesting < 0)
|
220
220
|
max_nesting = DEFAULT_NESTING_LEVEL;
|
221
221
|
|
222
|
-
scan_type =
|
222
|
+
scan_type = GIT_REFERENCE_SYMBOLIC;
|
223
223
|
|
224
224
|
if ((error = reference_normalize_for_repo(scan_name, repo, name, true)) < 0)
|
225
225
|
return error;
|
@@ -228,7 +228,7 @@ int git_reference_lookup_resolved(
|
|
228
228
|
return error;
|
229
229
|
|
230
230
|
for (nesting = max_nesting;
|
231
|
-
nesting >= 0 && scan_type ==
|
231
|
+
nesting >= 0 && scan_type == GIT_REFERENCE_SYMBOLIC;
|
232
232
|
nesting--)
|
233
233
|
{
|
234
234
|
if (nesting != max_nesting) {
|
@@ -242,8 +242,8 @@ int git_reference_lookup_resolved(
|
|
242
242
|
scan_type = ref->type;
|
243
243
|
}
|
244
244
|
|
245
|
-
if (scan_type !=
|
246
|
-
|
245
|
+
if (scan_type != GIT_REFERENCE_DIRECT && max_nesting != 0) {
|
246
|
+
git_error_set(GIT_ERROR_REFERENCE,
|
247
247
|
"cannot resolve reference (>%u levels deep)", max_nesting);
|
248
248
|
git_reference_free(ref);
|
249
249
|
return -1;
|
@@ -282,7 +282,7 @@ int git_reference__read_head(
|
|
282
282
|
|
283
283
|
out:
|
284
284
|
git__free(name);
|
285
|
-
|
285
|
+
git_buf_dispose(&reference);
|
286
286
|
|
287
287
|
return error;
|
288
288
|
}
|
@@ -339,22 +339,22 @@ int git_reference_dwim(git_reference **out, git_repository *repo, const char *re
|
|
339
339
|
cleanup:
|
340
340
|
if (error && !foundvalid) {
|
341
341
|
/* never found a valid reference name */
|
342
|
-
|
342
|
+
git_error_set(GIT_ERROR_REFERENCE,
|
343
343
|
"could not use '%s' as valid reference name", git_buf_cstr(&name));
|
344
344
|
}
|
345
345
|
|
346
346
|
if (error == GIT_ENOTFOUND)
|
347
|
-
|
347
|
+
git_error_set(GIT_ERROR_REFERENCE, "no reference found for shorthand '%s'", refname);
|
348
348
|
|
349
|
-
|
350
|
-
|
349
|
+
git_buf_dispose(&name);
|
350
|
+
git_buf_dispose(&refnamebuf);
|
351
351
|
return error;
|
352
352
|
}
|
353
353
|
|
354
354
|
/**
|
355
355
|
* Getters
|
356
356
|
*/
|
357
|
-
|
357
|
+
git_reference_t git_reference_type(const git_reference *ref)
|
358
358
|
{
|
359
359
|
assert(ref);
|
360
360
|
return ref->type;
|
@@ -376,7 +376,7 @@ const git_oid *git_reference_target(const git_reference *ref)
|
|
376
376
|
{
|
377
377
|
assert(ref);
|
378
378
|
|
379
|
-
if (ref->type !=
|
379
|
+
if (ref->type != GIT_REFERENCE_DIRECT)
|
380
380
|
return NULL;
|
381
381
|
|
382
382
|
return &ref->target.oid;
|
@@ -386,7 +386,7 @@ const git_oid *git_reference_target_peel(const git_reference *ref)
|
|
386
386
|
{
|
387
387
|
assert(ref);
|
388
388
|
|
389
|
-
if (ref->type !=
|
389
|
+
if (ref->type != GIT_REFERENCE_DIRECT || git_oid_iszero(&ref->peel))
|
390
390
|
return NULL;
|
391
391
|
|
392
392
|
return &ref->peel;
|
@@ -396,7 +396,7 @@ const char *git_reference_symbolic_target(const git_reference *ref)
|
|
396
396
|
{
|
397
397
|
assert(ref);
|
398
398
|
|
399
|
-
if (ref->type !=
|
399
|
+
if (ref->type != GIT_REFERENCE_SYMBOLIC)
|
400
400
|
return NULL;
|
401
401
|
|
402
402
|
return ref->target.symbolic;
|
@@ -436,8 +436,8 @@ static int reference__create(
|
|
436
436
|
if (oid != NULL) {
|
437
437
|
assert(symbolic == NULL);
|
438
438
|
|
439
|
-
if (!git_object__is_valid(repo, oid,
|
440
|
-
|
439
|
+
if (!git_object__is_valid(repo, oid, GIT_OBJECT_ANY)) {
|
440
|
+
git_error_set(GIT_ERROR_REFERENCE,
|
441
441
|
"target OID for the reference doesn't exist on the repository");
|
442
442
|
return -1;
|
443
443
|
}
|
@@ -455,7 +455,7 @@ static int reference__create(
|
|
455
455
|
ref = git_reference__alloc_symbolic(normalized, normalized_target);
|
456
456
|
}
|
457
457
|
|
458
|
-
|
458
|
+
GIT_ERROR_CHECK_ALLOC(ref);
|
459
459
|
|
460
460
|
if ((error = git_refdb_write(refdb, ref, force, signature, log_message, old_id, old_target)) < 0) {
|
461
461
|
git_reference_free(ref);
|
@@ -566,10 +566,10 @@ int git_reference_symbolic_create(
|
|
566
566
|
|
567
567
|
static int ensure_is_an_updatable_direct_reference(git_reference *ref)
|
568
568
|
{
|
569
|
-
if (ref->type ==
|
569
|
+
if (ref->type == GIT_REFERENCE_DIRECT)
|
570
570
|
return 0;
|
571
571
|
|
572
|
-
|
572
|
+
git_error_set(GIT_ERROR_REFERENCE, "cannot set OID on symbolic reference");
|
573
573
|
return -1;
|
574
574
|
}
|
575
575
|
|
@@ -594,10 +594,10 @@ int git_reference_set_target(
|
|
594
594
|
|
595
595
|
static int ensure_is_an_updatable_symbolic_reference(git_reference *ref)
|
596
596
|
{
|
597
|
-
if (ref->type ==
|
597
|
+
if (ref->type == GIT_REFERENCE_SYMBOLIC)
|
598
598
|
return 0;
|
599
599
|
|
600
|
-
|
600
|
+
git_error_set(GIT_ERROR_REFERENCE, "cannot set symbolic target on a direct reference");
|
601
601
|
return -1;
|
602
602
|
}
|
603
603
|
|
@@ -631,7 +631,7 @@ static int update_wt_heads(git_repository *repo, const char *path, void *payload
|
|
631
631
|
int error;
|
632
632
|
|
633
633
|
if ((error = git_reference__read_head(&head, repo, path)) < 0) {
|
634
|
-
|
634
|
+
git_error_set(GIT_ERROR_REFERENCE, "could not read HEAD when renaming references");
|
635
635
|
goto out;
|
636
636
|
}
|
637
637
|
|
@@ -640,7 +640,7 @@ static int update_wt_heads(git_repository *repo, const char *path, void *payload
|
|
640
640
|
goto out;
|
641
641
|
}
|
642
642
|
|
643
|
-
if (git_reference_type(head) !=
|
643
|
+
if (git_reference_type(head) != GIT_REFERENCE_SYMBOLIC ||
|
644
644
|
git__strcmp(head->target.symbolic, data->old_name) != 0) {
|
645
645
|
error = 0;
|
646
646
|
goto out;
|
@@ -648,7 +648,7 @@ static int update_wt_heads(git_repository *repo, const char *path, void *payload
|
|
648
648
|
|
649
649
|
/* Update HEAD it was pointing to the reference being renamed */
|
650
650
|
if ((error = git_repository_create_head(gitdir, data->new_name)) < 0) {
|
651
|
-
|
651
|
+
git_error_set(GIT_ERROR_REFERENCE, "failed to update HEAD after renaming reference");
|
652
652
|
goto out;
|
653
653
|
}
|
654
654
|
|
@@ -723,14 +723,14 @@ int git_reference_rename(
|
|
723
723
|
int git_reference_resolve(git_reference **ref_out, const git_reference *ref)
|
724
724
|
{
|
725
725
|
switch (git_reference_type(ref)) {
|
726
|
-
case
|
726
|
+
case GIT_REFERENCE_DIRECT:
|
727
727
|
return git_reference_lookup(ref_out, ref->db->repo, ref->name);
|
728
728
|
|
729
|
-
case
|
729
|
+
case GIT_REFERENCE_SYMBOLIC:
|
730
730
|
return git_reference_lookup_resolved(ref_out, ref->db->repo, ref->target.symbolic, -1);
|
731
731
|
|
732
732
|
default:
|
733
|
-
|
733
|
+
git_error_set(GIT_ERROR_REFERENCE, "invalid reference");
|
734
734
|
return -1;
|
735
735
|
}
|
736
736
|
}
|
@@ -749,7 +749,7 @@ int git_reference_foreach(
|
|
749
749
|
|
750
750
|
while (!(error = git_reference_next(&ref, iter))) {
|
751
751
|
if ((error = callback(ref, payload)) != 0) {
|
752
|
-
|
752
|
+
git_error_set_after_callback(error);
|
753
753
|
break;
|
754
754
|
}
|
755
755
|
}
|
@@ -775,7 +775,7 @@ int git_reference_foreach_name(
|
|
775
775
|
|
776
776
|
while (!(error = git_reference_next_name(&refname, iter))) {
|
777
777
|
if ((error = callback(refname, payload)) != 0) {
|
778
|
-
|
778
|
+
git_error_set_after_callback(error);
|
779
779
|
break;
|
780
780
|
}
|
781
781
|
}
|
@@ -802,7 +802,7 @@ int git_reference_foreach_glob(
|
|
802
802
|
|
803
803
|
while (!(error = git_reference_next_name(&refname, iter))) {
|
804
804
|
if ((error = callback(refname, payload)) != 0) {
|
805
|
-
|
805
|
+
git_error_set_after_callback(error);
|
806
806
|
break;
|
807
807
|
}
|
808
808
|
}
|
@@ -856,7 +856,7 @@ void git_reference_iterator_free(git_reference_iterator *iter)
|
|
856
856
|
static int cb__reflist_add(const char *ref, void *data)
|
857
857
|
{
|
858
858
|
char *name = git__strdup(ref);
|
859
|
-
|
859
|
+
GIT_ERROR_CHECK_ALLOC(name);
|
860
860
|
return git_vector_insert((git_vector *)data, name);
|
861
861
|
}
|
862
862
|
|
@@ -970,7 +970,7 @@ int git_reference__normalize_name(
|
|
970
970
|
int segment_len, segments_count = 0, error = GIT_EINVALIDSPEC;
|
971
971
|
unsigned int process_flags;
|
972
972
|
bool normalize = (buf != NULL);
|
973
|
-
bool validate = (flags &
|
973
|
+
bool validate = (flags & GIT_REFERENCE_FORMAT__VALIDATION_DISABLE) == 0;
|
974
974
|
|
975
975
|
#ifdef GIT_USE_ICONV
|
976
976
|
git_path_iconv_t ic = GIT_PATH_ICONV_INIT;
|
@@ -988,7 +988,7 @@ int git_reference__normalize_name(
|
|
988
988
|
git_buf_clear(buf);
|
989
989
|
|
990
990
|
#ifdef GIT_USE_ICONV
|
991
|
-
if ((flags &
|
991
|
+
if ((flags & GIT_REFERENCE_FORMAT__PRECOMPOSE_UNICODE) != 0) {
|
992
992
|
size_t namelen = strlen(current);
|
993
993
|
if ((error = git_path_iconv_init_precompose(&ic)) < 0 ||
|
994
994
|
(error = git_path_iconv(&ic, ¤t, &namelen)) < 0)
|
@@ -1007,11 +1007,11 @@ int git_reference__normalize_name(
|
|
1007
1007
|
while (true) {
|
1008
1008
|
segment_len = ensure_segment_validity(current);
|
1009
1009
|
if (segment_len < 0) {
|
1010
|
-
if ((process_flags &
|
1010
|
+
if ((process_flags & GIT_REFERENCE_FORMAT_REFSPEC_PATTERN) &&
|
1011
1011
|
current[0] == '*' &&
|
1012
1012
|
(current[1] == '\0' || current[1] == '/')) {
|
1013
1013
|
/* Accept one wildcard as a full refname component. */
|
1014
|
-
process_flags &= ~
|
1014
|
+
process_flags &= ~GIT_REFERENCE_FORMAT_REFSPEC_PATTERN;
|
1015
1015
|
segment_len = 1;
|
1016
1016
|
} else
|
1017
1017
|
goto cleanup;
|
@@ -1056,13 +1056,13 @@ int git_reference__normalize_name(
|
|
1056
1056
|
if (current[segment_len - 1] == '/')
|
1057
1057
|
goto cleanup;
|
1058
1058
|
|
1059
|
-
if ((segments_count == 1 ) && !(flags &
|
1059
|
+
if ((segments_count == 1 ) && !(flags & GIT_REFERENCE_FORMAT_ALLOW_ONELEVEL))
|
1060
1060
|
goto cleanup;
|
1061
1061
|
|
1062
1062
|
if ((segments_count == 1 ) &&
|
1063
|
-
!(flags &
|
1063
|
+
!(flags & GIT_REFERENCE_FORMAT_REFSPEC_SHORTHAND) &&
|
1064
1064
|
!(is_all_caps_and_underscore(name, (size_t)segment_len) ||
|
1065
|
-
((flags &
|
1065
|
+
((flags & GIT_REFERENCE_FORMAT_REFSPEC_PATTERN) && !strcmp("*", name))))
|
1066
1066
|
goto cleanup;
|
1067
1067
|
|
1068
1068
|
if ((segments_count > 1)
|
@@ -1073,12 +1073,12 @@ int git_reference__normalize_name(
|
|
1073
1073
|
|
1074
1074
|
cleanup:
|
1075
1075
|
if (error == GIT_EINVALIDSPEC)
|
1076
|
-
|
1077
|
-
|
1076
|
+
git_error_set(
|
1077
|
+
GIT_ERROR_REFERENCE,
|
1078
1078
|
"the given reference name '%s' is not valid", name);
|
1079
1079
|
|
1080
1080
|
if (error && normalize)
|
1081
|
-
|
1081
|
+
git_buf_dispose(buf);
|
1082
1082
|
|
1083
1083
|
#ifdef GIT_USE_ICONV
|
1084
1084
|
git_path_iconv_clear(&ic);
|
@@ -1100,8 +1100,8 @@ int git_reference_normalize_name(
|
|
1100
1100
|
goto cleanup;
|
1101
1101
|
|
1102
1102
|
if (git_buf_len(&buf) > buffer_size - 1) {
|
1103
|
-
|
1104
|
-
|
1103
|
+
git_error_set(
|
1104
|
+
GIT_ERROR_REFERENCE,
|
1105
1105
|
"the provided buffer is too short to hold the normalization of '%s'", name);
|
1106
1106
|
error = GIT_EBUFS;
|
1107
1107
|
goto cleanup;
|
@@ -1112,17 +1112,17 @@ int git_reference_normalize_name(
|
|
1112
1112
|
error = 0;
|
1113
1113
|
|
1114
1114
|
cleanup:
|
1115
|
-
|
1115
|
+
git_buf_dispose(&buf);
|
1116
1116
|
return error;
|
1117
1117
|
}
|
1118
1118
|
|
1119
|
-
#define
|
1119
|
+
#define GIT_REFERENCE_TYPEMASK (GIT_REFERENCE_DIRECT | GIT_REFERENCE_SYMBOLIC)
|
1120
1120
|
|
1121
1121
|
int git_reference_cmp(
|
1122
1122
|
const git_reference *ref1,
|
1123
1123
|
const git_reference *ref2)
|
1124
1124
|
{
|
1125
|
-
|
1125
|
+
git_reference_t type1, type2;
|
1126
1126
|
assert(ref1 && ref2);
|
1127
1127
|
|
1128
1128
|
type1 = git_reference_type(ref1);
|
@@ -1130,9 +1130,9 @@ int git_reference_cmp(
|
|
1130
1130
|
|
1131
1131
|
/* let's put symbolic refs before OIDs */
|
1132
1132
|
if (type1 != type2)
|
1133
|
-
return (type1 ==
|
1133
|
+
return (type1 == GIT_REFERENCE_SYMBOLIC) ? -1 : 1;
|
1134
1134
|
|
1135
|
-
if (type1 ==
|
1135
|
+
if (type1 == GIT_REFERENCE_SYMBOLIC)
|
1136
1136
|
return strcmp(ref1->target.symbolic, ref2->target.symbolic);
|
1137
1137
|
|
1138
1138
|
return git_oid__cmp(&ref1->target.oid, &ref2->target.oid);
|
@@ -1148,7 +1148,7 @@ static int get_terminal(git_reference **out, git_repository *repo, const char *r
|
|
1148
1148
|
int error = 0;
|
1149
1149
|
|
1150
1150
|
if (nesting > MAX_NESTING_LEVEL) {
|
1151
|
-
|
1151
|
+
git_error_set(GIT_ERROR_REFERENCE, "reference chain too deep (%d)", nesting);
|
1152
1152
|
return GIT_ENOTFOUND;
|
1153
1153
|
}
|
1154
1154
|
|
@@ -1158,7 +1158,7 @@ static int get_terminal(git_reference **out, git_repository *repo, const char *r
|
|
1158
1158
|
return error;
|
1159
1159
|
}
|
1160
1160
|
|
1161
|
-
if (git_reference_type(ref) ==
|
1161
|
+
if (git_reference_type(ref) == GIT_REFERENCE_DIRECT) {
|
1162
1162
|
*out = ref;
|
1163
1163
|
error = 0;
|
1164
1164
|
} else {
|
@@ -1197,16 +1197,16 @@ int git_reference__update_terminal(
|
|
1197
1197
|
|
1198
1198
|
/* found a dangling symref */
|
1199
1199
|
if (error == GIT_ENOTFOUND && ref) {
|
1200
|
-
assert(git_reference_type(ref) ==
|
1201
|
-
|
1200
|
+
assert(git_reference_type(ref) == GIT_REFERENCE_SYMBOLIC);
|
1201
|
+
git_error_clear();
|
1202
1202
|
error = reference__create(&ref2, repo, ref->target.symbolic, oid, NULL, 0, to_use,
|
1203
1203
|
log_message, NULL, NULL);
|
1204
1204
|
} else if (error == GIT_ENOTFOUND) {
|
1205
|
-
|
1205
|
+
git_error_clear();
|
1206
1206
|
error = reference__create(&ref2, repo, ref_name, oid, NULL, 0, to_use,
|
1207
1207
|
log_message, NULL, NULL);
|
1208
1208
|
} else if (error == 0) {
|
1209
|
-
assert(git_reference_type(ref) ==
|
1209
|
+
assert(git_reference_type(ref) == GIT_REFERENCE_DIRECT);
|
1210
1210
|
error = reference__create(&ref2, repo, ref->name, oid, NULL, 1, to_use,
|
1211
1211
|
log_message, &ref->target.oid, NULL);
|
1212
1212
|
}
|
@@ -1264,7 +1264,7 @@ int git_reference__update_for_commit(
|
|
1264
1264
|
|
1265
1265
|
done:
|
1266
1266
|
git_reference_free(ref_new);
|
1267
|
-
|
1267
|
+
git_buf_dispose(&reflog_msg);
|
1268
1268
|
git_commit_free(commit);
|
1269
1269
|
return error;
|
1270
1270
|
}
|
@@ -1341,8 +1341,8 @@ int git_reference_is_note(const git_reference *ref)
|
|
1341
1341
|
|
1342
1342
|
static int peel_error(int error, const git_reference *ref, const char* msg)
|
1343
1343
|
{
|
1344
|
-
|
1345
|
-
|
1344
|
+
git_error_set(
|
1345
|
+
GIT_ERROR_INVALID,
|
1346
1346
|
"the reference '%s' cannot be peeled - %s", git_reference_name(ref), msg);
|
1347
1347
|
return error;
|
1348
1348
|
}
|
@@ -1350,7 +1350,7 @@ static int peel_error(int error, const git_reference *ref, const char* msg)
|
|
1350
1350
|
int git_reference_peel(
|
1351
1351
|
git_object **peeled,
|
1352
1352
|
const git_reference *ref,
|
1353
|
-
|
1353
|
+
git_object_t target_type)
|
1354
1354
|
{
|
1355
1355
|
const git_reference *resolved = NULL;
|
1356
1356
|
git_reference *allocated = NULL;
|
@@ -1359,7 +1359,7 @@ int git_reference_peel(
|
|
1359
1359
|
|
1360
1360
|
assert(ref);
|
1361
1361
|
|
1362
|
-
if (ref->type ==
|
1362
|
+
if (ref->type == GIT_REFERENCE_DIRECT) {
|
1363
1363
|
resolved = ref;
|
1364
1364
|
} else {
|
1365
1365
|
if ((error = git_reference_resolve(&allocated, ref)) < 0)
|
@@ -1374,12 +1374,12 @@ int git_reference_peel(
|
|
1374
1374
|
* to a commit. So we only want to use the peeled value
|
1375
1375
|
* if it is not zero and the target is not a tag.
|
1376
1376
|
*/
|
1377
|
-
if (target_type !=
|
1377
|
+
if (target_type != GIT_OBJECT_TAG && !git_oid_iszero(&resolved->peel)) {
|
1378
1378
|
error = git_object_lookup(&target,
|
1379
|
-
git_reference_owner(ref), &resolved->peel,
|
1379
|
+
git_reference_owner(ref), &resolved->peel, GIT_OBJECT_ANY);
|
1380
1380
|
} else {
|
1381
1381
|
error = git_object_lookup(&target,
|
1382
|
-
git_reference_owner(ref), &resolved->target.oid,
|
1382
|
+
git_reference_owner(ref), &resolved->target.oid, GIT_OBJECT_ANY);
|
1383
1383
|
}
|
1384
1384
|
|
1385
1385
|
if (error < 0) {
|
@@ -1387,7 +1387,7 @@ int git_reference_peel(
|
|
1387
1387
|
goto cleanup;
|
1388
1388
|
}
|
1389
1389
|
|
1390
|
-
if (target_type ==
|
1390
|
+
if (target_type == GIT_OBJECT_ANY && git_object_type(target) != GIT_OBJECT_TAG)
|
1391
1391
|
error = git_object_dup(peeled, target);
|
1392
1392
|
else
|
1393
1393
|
error = git_object_peel(peeled, target, target_type);
|
@@ -1402,7 +1402,7 @@ cleanup:
|
|
1402
1402
|
int git_reference__is_valid_name(const char *refname, unsigned int flags)
|
1403
1403
|
{
|
1404
1404
|
if (git_reference__normalize_name(NULL, refname, flags) < 0) {
|
1405
|
-
|
1405
|
+
git_error_clear();
|
1406
1406
|
return false;
|
1407
1407
|
}
|
1408
1408
|
|
@@ -1411,7 +1411,7 @@ int git_reference__is_valid_name(const char *refname, unsigned int flags)
|
|
1411
1411
|
|
1412
1412
|
int git_reference_is_valid_name(const char *refname)
|
1413
1413
|
{
|
1414
|
-
return git_reference__is_valid_name(refname,
|
1414
|
+
return git_reference__is_valid_name(refname, GIT_REFERENCE_FORMAT_ALLOW_ONELEVEL);
|
1415
1415
|
}
|
1416
1416
|
|
1417
1417
|
const char *git_reference__shorthand(const char *name)
|
@@ -1433,3 +1433,27 @@ const char *git_reference_shorthand(const git_reference *ref)
|
|
1433
1433
|
{
|
1434
1434
|
return git_reference__shorthand(ref->name);
|
1435
1435
|
}
|
1436
|
+
|
1437
|
+
int git_reference__is_unborn_head(bool *unborn, const git_reference *ref, git_repository *repo)
|
1438
|
+
{
|
1439
|
+
int error;
|
1440
|
+
git_reference *tmp_ref;
|
1441
|
+
assert(unborn && ref && repo);
|
1442
|
+
|
1443
|
+
if (ref->type == GIT_REFERENCE_DIRECT) {
|
1444
|
+
*unborn = 0;
|
1445
|
+
return 0;
|
1446
|
+
}
|
1447
|
+
|
1448
|
+
error = git_reference_lookup_resolved(&tmp_ref, repo, ref->name, -1);
|
1449
|
+
git_reference_free(tmp_ref);
|
1450
|
+
|
1451
|
+
if (error != 0 && error != GIT_ENOTFOUND)
|
1452
|
+
return error;
|
1453
|
+
else if (error == GIT_ENOTFOUND && git__strcmp(ref->name, GIT_HEAD_FILE) == 0)
|
1454
|
+
*unborn = true;
|
1455
|
+
else
|
1456
|
+
*unborn = false;
|
1457
|
+
|
1458
|
+
return 0;
|
1459
|
+
}
|