rugged 0.25.1.1 → 0.26.0b1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/include/git2/common.h +10 -0
- data/vendor/libgit2/include/git2/merge.h +2 -1
- data/vendor/libgit2/include/git2/oid.h +4 -5
- data/vendor/libgit2/include/git2/submodule.h +2 -11
- data/vendor/libgit2/include/git2/sys/repository.h +29 -0
- data/vendor/libgit2/include/git2/tree.h +13 -0
- data/vendor/libgit2/src/apply.c +2 -2
- data/vendor/libgit2/src/attr_file.c +5 -5
- data/vendor/libgit2/src/attrcache.c +9 -7
- data/vendor/libgit2/src/blob.c +3 -3
- data/vendor/libgit2/src/branch.c +10 -10
- data/vendor/libgit2/src/buffer.c +4 -4
- data/vendor/libgit2/src/cache.c +1 -1
- data/vendor/libgit2/src/checkout.c +29 -25
- data/vendor/libgit2/src/cherrypick.c +2 -2
- data/vendor/libgit2/src/commit.c +2 -2
- data/vendor/libgit2/src/commit_list.c +2 -2
- data/vendor/libgit2/src/common.h +1 -1
- data/vendor/libgit2/src/config.c +12 -12
- data/vendor/libgit2/src/config_file.c +9 -9
- data/vendor/libgit2/src/crlf.c +1 -1
- data/vendor/libgit2/src/delta.c +4 -4
- data/vendor/libgit2/src/describe.c +11 -11
- data/vendor/libgit2/src/diff_driver.c +1 -1
- data/vendor/libgit2/src/diff_file.c +1 -1
- data/vendor/libgit2/src/diff_generate.c +2 -2
- data/vendor/libgit2/src/diff_print.c +5 -5
- data/vendor/libgit2/src/diff_tform.c +1 -1
- data/vendor/libgit2/src/diff_xdiff.c +2 -2
- data/vendor/libgit2/src/fetch.c +1 -1
- data/vendor/libgit2/src/fetchhead.c +8 -8
- data/vendor/libgit2/src/filebuf.c +9 -9
- data/vendor/libgit2/src/fileops.c +27 -27
- data/vendor/libgit2/src/filter.c +4 -4
- data/vendor/libgit2/src/hashsig.c +2 -2
- data/vendor/libgit2/src/ignore.c +4 -4
- data/vendor/libgit2/src/index.c +15 -15
- data/vendor/libgit2/src/indexer.c +39 -6
- data/vendor/libgit2/src/integer.h +6 -6
- data/vendor/libgit2/src/merge.c +12 -12
- data/vendor/libgit2/src/merge_file.c +1 -1
- data/vendor/libgit2/src/mwindow.c +1 -1
- data/vendor/libgit2/src/netops.c +4 -4
- data/vendor/libgit2/src/notes.c +3 -3
- data/vendor/libgit2/src/object.c +5 -5
- data/vendor/libgit2/src/odb.c +12 -12
- data/vendor/libgit2/src/odb_loose.c +6 -6
- data/vendor/libgit2/src/oid.c +5 -5
- data/vendor/libgit2/src/openssl_stream.c +3 -3
- data/vendor/libgit2/src/pack-objects.c +6 -6
- data/vendor/libgit2/src/pack.c +19 -10
- data/vendor/libgit2/src/pack.h +1 -0
- data/vendor/libgit2/src/patch_generate.c +5 -3
- data/vendor/libgit2/src/path.c +15 -15
- data/vendor/libgit2/src/pathspec.c +2 -2
- data/vendor/libgit2/src/posix.c +1 -1
- data/vendor/libgit2/src/push.c +6 -6
- data/vendor/libgit2/src/rebase.c +12 -12
- data/vendor/libgit2/src/refdb.c +1 -1
- data/vendor/libgit2/src/refdb_fs.c +12 -12
- data/vendor/libgit2/src/reflog.c +2 -2
- data/vendor/libgit2/src/refs.c +34 -17
- data/vendor/libgit2/src/refs.h +3 -0
- data/vendor/libgit2/src/remote.c +3 -3
- data/vendor/libgit2/src/repository.c +46 -13
- data/vendor/libgit2/src/repository.h +2 -1
- data/vendor/libgit2/src/reset.c +1 -1
- data/vendor/libgit2/src/revert.c +2 -2
- data/vendor/libgit2/src/revparse.c +5 -5
- data/vendor/libgit2/src/revwalk.c +3 -3
- data/vendor/libgit2/src/settings.c +6 -1
- data/vendor/libgit2/src/sha1_lookup.c +1 -1
- data/vendor/libgit2/src/signature.c +1 -1
- data/vendor/libgit2/src/socket_stream.c +5 -5
- data/vendor/libgit2/src/sortedcache.c +5 -5
- data/vendor/libgit2/src/stash.c +6 -6
- data/vendor/libgit2/src/status.c +4 -4
- data/vendor/libgit2/src/submodule.c +159 -110
- data/vendor/libgit2/src/submodule.h +3 -0
- data/vendor/libgit2/src/sysdir.c +2 -2
- data/vendor/libgit2/src/tag.c +14 -14
- data/vendor/libgit2/src/trace.c +1 -1
- data/vendor/libgit2/src/transport.c +1 -1
- data/vendor/libgit2/src/transports/auth_negotiate.c +4 -4
- data/vendor/libgit2/src/transports/cred.c +1 -1
- data/vendor/libgit2/src/transports/git.c +3 -3
- data/vendor/libgit2/src/transports/http.c +6 -6
- data/vendor/libgit2/src/transports/local.c +2 -2
- data/vendor/libgit2/src/transports/smart.c +5 -5
- data/vendor/libgit2/src/transports/smart_pkt.c +4 -4
- data/vendor/libgit2/src/transports/smart_protocol.c +1 -1
- data/vendor/libgit2/src/transports/ssh.c +9 -9
- data/vendor/libgit2/src/transports/winhttp.c +155 -118
- data/vendor/libgit2/src/tree-cache.c +2 -2
- data/vendor/libgit2/src/tree.c +35 -20
- data/vendor/libgit2/src/unix/map.c +1 -1
- data/vendor/libgit2/src/util.c +3 -3
- data/vendor/libgit2/src/vector.c +3 -0
- data/vendor/libgit2/src/win32/dir.c +3 -3
- data/vendor/libgit2/src/win32/findfile.c +1 -1
- data/vendor/libgit2/src/win32/map.c +6 -6
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.c +2 -2
- data/vendor/libgit2/src/win32/w32_util.c +1 -1
- data/vendor/libgit2/src/win32/w32_util.h +1 -1
- data/vendor/libgit2/src/zstream.c +1 -1
- metadata +4 -4
@@ -130,13 +130,13 @@ int git_cherrypick_commit(
|
|
130
130
|
if (git_commit_parentcount(cherrypick_commit) > 1) {
|
131
131
|
if (!mainline)
|
132
132
|
return cherrypick_seterr(cherrypick_commit,
|
133
|
-
"
|
133
|
+
"mainline branch is not specified but %s is a merge commit");
|
134
134
|
|
135
135
|
parent = mainline;
|
136
136
|
} else {
|
137
137
|
if (mainline)
|
138
138
|
return cherrypick_seterr(cherrypick_commit,
|
139
|
-
"
|
139
|
+
"mainline branch specified but %s is not a merge commit");
|
140
140
|
|
141
141
|
parent = git_commit_parentcount(cherrypick_commit);
|
142
142
|
}
|
data/vendor/libgit2/src/commit.c
CHANGED
@@ -468,7 +468,7 @@ int git_commit__parse(void *_commit, git_odb_object *odb_obj)
|
|
468
468
|
return 0;
|
469
469
|
|
470
470
|
bad_buffer:
|
471
|
-
giterr_set(GITERR_OBJECT, "
|
471
|
+
giterr_set(GITERR_OBJECT, "failed to parse bad commit object");
|
472
472
|
return -1;
|
473
473
|
}
|
474
474
|
|
@@ -598,7 +598,7 @@ int git_commit_parent(
|
|
598
598
|
|
599
599
|
parent_id = git_commit_parent_id(commit, n);
|
600
600
|
if (parent_id == NULL) {
|
601
|
-
giterr_set(GITERR_INVALID, "
|
601
|
+
giterr_set(GITERR_INVALID, "parent %u does not exist", n);
|
602
602
|
return GIT_ENOTFOUND;
|
603
603
|
}
|
604
604
|
|
@@ -61,7 +61,7 @@ static int commit_error(git_commit_list_node *commit, const char *msg)
|
|
61
61
|
git_oid_fmt(commit_oid, &commit->oid);
|
62
62
|
commit_oid[GIT_OID_HEXSZ] = '\0';
|
63
63
|
|
64
|
-
giterr_set(GITERR_ODB, "
|
64
|
+
giterr_set(GITERR_ODB, "failed to parse commit %s - %s", commit_oid, msg);
|
65
65
|
|
66
66
|
return -1;
|
67
67
|
}
|
@@ -191,7 +191,7 @@ int git_commit_list_parse(git_revwalk *walk, git_commit_list_node *commit)
|
|
191
191
|
return error;
|
192
192
|
|
193
193
|
if (obj->cached.type != GIT_OBJ_COMMIT) {
|
194
|
-
giterr_set(GITERR_INVALID, "
|
194
|
+
giterr_set(GITERR_INVALID, "object is no commit object");
|
195
195
|
error = -1;
|
196
196
|
} else
|
197
197
|
error = commit_quick_parse(
|
data/vendor/libgit2/src/common.h
CHANGED
@@ -188,7 +188,7 @@ GIT_INLINE(int) giterr__check_version(const void *structure, unsigned int expect
|
|
188
188
|
if (actual > 0 && actual <= expected_max)
|
189
189
|
return 0;
|
190
190
|
|
191
|
-
giterr_set(GITERR_INVALID, "
|
191
|
+
giterr_set(GITERR_INVALID, "invalid version %d on %s", actual, name);
|
192
192
|
return -1;
|
193
193
|
}
|
194
194
|
#define GITERR_CHECK_VERSION(S,V,N) if (giterr__check_version(S,V,N) < 0) return -1
|
data/vendor/libgit2/src/config.c
CHANGED
@@ -109,7 +109,7 @@ int git_config_add_file_ondisk(
|
|
109
109
|
|
110
110
|
res = p_stat(path, &st);
|
111
111
|
if (res < 0 && errno != ENOENT) {
|
112
|
-
giterr_set(GITERR_CONFIG, "
|
112
|
+
giterr_set(GITERR_CONFIG, "failed to stat '%s'", path);
|
113
113
|
return -1;
|
114
114
|
}
|
115
115
|
|
@@ -203,7 +203,7 @@ static int find_internal_file_by_level(
|
|
203
203
|
|
204
204
|
if (pos == -1) {
|
205
205
|
giterr_set(GITERR_CONFIG,
|
206
|
-
"
|
206
|
+
"no config file exists for the given level '%i'", (int)level);
|
207
207
|
return GIT_ENOTFOUND;
|
208
208
|
}
|
209
209
|
|
@@ -218,7 +218,7 @@ static int duplicate_level(void **old_raw, void *new_raw)
|
|
218
218
|
|
219
219
|
GIT_UNUSED(new_raw);
|
220
220
|
|
221
|
-
giterr_set(GITERR_CONFIG, "
|
221
|
+
giterr_set(GITERR_CONFIG, "a file with the same level (%i) has already been added to the config", (int)(*old)->level);
|
222
222
|
return GIT_EEXISTS;
|
223
223
|
}
|
224
224
|
|
@@ -579,7 +579,7 @@ int git_config_foreach_match(
|
|
579
579
|
static int config_error_nofiles(const char *name)
|
580
580
|
{
|
581
581
|
giterr_set(GITERR_CONFIG,
|
582
|
-
"
|
582
|
+
"cannot set value for '%s' when no config files exist", name);
|
583
583
|
return GIT_ENOTFOUND;
|
584
584
|
}
|
585
585
|
|
@@ -620,7 +620,7 @@ int git_config_set_string(git_config *cfg, const char *name, const char *value)
|
|
620
620
|
file_internal *internal;
|
621
621
|
|
622
622
|
if (!value) {
|
623
|
-
giterr_set(GITERR_CONFIG, "
|
623
|
+
giterr_set(GITERR_CONFIG, "the value to set cannot be NULL");
|
624
624
|
return -1;
|
625
625
|
}
|
626
626
|
|
@@ -674,7 +674,7 @@ int git_config__update_entry(
|
|
674
674
|
|
675
675
|
static int config_error_notfound(const char *name)
|
676
676
|
{
|
677
|
-
giterr_set(GITERR_CONFIG, "
|
677
|
+
giterr_set(GITERR_CONFIG, "config value '%s' was not found", name);
|
678
678
|
return GIT_ENOTFOUND;
|
679
679
|
}
|
680
680
|
|
@@ -1236,7 +1236,7 @@ int git_config_lookup_map_value(
|
|
1236
1236
|
}
|
1237
1237
|
|
1238
1238
|
fail_parse:
|
1239
|
-
giterr_set(GITERR_CONFIG, "
|
1239
|
+
giterr_set(GITERR_CONFIG, "failed to map '%s'", value);
|
1240
1240
|
return -1;
|
1241
1241
|
}
|
1242
1242
|
|
@@ -1270,7 +1270,7 @@ int git_config_parse_bool(int *out, const char *value)
|
|
1270
1270
|
return 0;
|
1271
1271
|
}
|
1272
1272
|
|
1273
|
-
giterr_set(GITERR_CONFIG, "
|
1273
|
+
giterr_set(GITERR_CONFIG, "failed to parse '%s' as a boolean value", value);
|
1274
1274
|
return -1;
|
1275
1275
|
}
|
1276
1276
|
|
@@ -1313,7 +1313,7 @@ int git_config_parse_int64(int64_t *out, const char *value)
|
|
1313
1313
|
}
|
1314
1314
|
|
1315
1315
|
fail_parse:
|
1316
|
-
giterr_set(GITERR_CONFIG, "
|
1316
|
+
giterr_set(GITERR_CONFIG, "failed to parse '%s' as an integer", value ? value : "(null)");
|
1317
1317
|
return -1;
|
1318
1318
|
}
|
1319
1319
|
|
@@ -1333,7 +1333,7 @@ int git_config_parse_int32(int32_t *out, const char *value)
|
|
1333
1333
|
return 0;
|
1334
1334
|
|
1335
1335
|
fail_parse:
|
1336
|
-
giterr_set(GITERR_CONFIG, "
|
1336
|
+
giterr_set(GITERR_CONFIG, "failed to parse '%s' as a 32-bit integer", value ? value : "(null)");
|
1337
1337
|
return -1;
|
1338
1338
|
}
|
1339
1339
|
|
@@ -1398,7 +1398,7 @@ int git_config__normalize_name(const char *in, char **out)
|
|
1398
1398
|
|
1399
1399
|
invalid:
|
1400
1400
|
git__free(name);
|
1401
|
-
giterr_set(GITERR_CONFIG, "
|
1401
|
+
giterr_set(GITERR_CONFIG, "invalid config item name '%s'", in);
|
1402
1402
|
return GIT_EINVALIDSPEC;
|
1403
1403
|
}
|
1404
1404
|
|
@@ -1461,7 +1461,7 @@ int git_config_rename_section(
|
|
1461
1461
|
replace.ptr, strchr(replace.ptr, '.'))) < 0)
|
1462
1462
|
{
|
1463
1463
|
giterr_set(
|
1464
|
-
GITERR_CONFIG, "
|
1464
|
+
GITERR_CONFIG, "invalid config section '%s'", new_section_name);
|
1465
1465
|
goto cleanup;
|
1466
1466
|
}
|
1467
1467
|
|
@@ -126,7 +126,7 @@ static int config_snapshot(git_config_backend **out, git_config_backend *in);
|
|
126
126
|
|
127
127
|
static void set_parse_error(struct reader *reader, int col, const char *error_str)
|
128
128
|
{
|
129
|
-
giterr_set(GITERR_CONFIG, "
|
129
|
+
giterr_set(GITERR_CONFIG, "failed to parse config file: %s (in %s:%d, column %d)",
|
130
130
|
error_str, reader->file_path, reader->line_number, col);
|
131
131
|
}
|
132
132
|
|
@@ -233,7 +233,7 @@ static refcounted_strmap *refcounted_strmap_take(diskfile_header *h)
|
|
233
233
|
refcounted_strmap *map;
|
234
234
|
|
235
235
|
if (git_mutex_lock(&h->values_mutex) < 0) {
|
236
|
-
giterr_set(GITERR_OS, "
|
236
|
+
giterr_set(GITERR_OS, "failed to lock config backend");
|
237
237
|
return NULL;
|
238
238
|
}
|
239
239
|
|
@@ -322,7 +322,7 @@ static int config__refresh(git_config_backend *cfg)
|
|
322
322
|
goto out;
|
323
323
|
|
324
324
|
if ((error = git_mutex_lock(&b->header.values_mutex)) < 0) {
|
325
|
-
giterr_set(GITERR_OS, "
|
325
|
+
giterr_set(GITERR_OS, "failed to lock config backend");
|
326
326
|
goto out;
|
327
327
|
}
|
328
328
|
|
@@ -479,7 +479,7 @@ static int config_set(git_config_backend *cfg, const char *name, const char *val
|
|
479
479
|
cvar_t *existing = git_strmap_value_at(values, pos);
|
480
480
|
|
481
481
|
if (existing->next != NULL) {
|
482
|
-
giterr_set(GITERR_CONFIG, "
|
482
|
+
giterr_set(GITERR_CONFIG, "multivar incompatible with simple set");
|
483
483
|
ret = -1;
|
484
484
|
goto out;
|
485
485
|
}
|
@@ -611,7 +611,7 @@ static int config_delete(git_config_backend *cfg, const char *name)
|
|
611
611
|
|
612
612
|
if (!git_strmap_valid_index(values, pos)) {
|
613
613
|
refcounted_strmap_free(map);
|
614
|
-
giterr_set(GITERR_CONFIG, "
|
614
|
+
giterr_set(GITERR_CONFIG, "could not find key '%s' to delete", name);
|
615
615
|
return GIT_ENOTFOUND;
|
616
616
|
}
|
617
617
|
|
@@ -619,7 +619,7 @@ static int config_delete(git_config_backend *cfg, const char *name)
|
|
619
619
|
refcounted_strmap_free(map);
|
620
620
|
|
621
621
|
if (var->next != NULL) {
|
622
|
-
giterr_set(GITERR_CONFIG, "
|
622
|
+
giterr_set(GITERR_CONFIG, "cannot delete multivar with a single delete");
|
623
623
|
return -1;
|
624
624
|
}
|
625
625
|
|
@@ -651,7 +651,7 @@ static int config_delete_multivar(git_config_backend *cfg, const char *name, con
|
|
651
651
|
if (!git_strmap_valid_index(values, pos)) {
|
652
652
|
refcounted_strmap_free(map);
|
653
653
|
git__free(key);
|
654
|
-
giterr_set(GITERR_CONFIG, "
|
654
|
+
giterr_set(GITERR_CONFIG, "could not find key '%s' to delete", name);
|
655
655
|
return GIT_ENOTFOUND;
|
656
656
|
}
|
657
657
|
|
@@ -1325,7 +1325,7 @@ static int unescape_line(
|
|
1325
1325
|
*fixed++ = escaped[esc - escapes];
|
1326
1326
|
} else {
|
1327
1327
|
git__free(str);
|
1328
|
-
giterr_set(GITERR_CONFIG, "
|
1328
|
+
giterr_set(GITERR_CONFIG, "invalid escape at %s", ptr);
|
1329
1329
|
return -1;
|
1330
1330
|
}
|
1331
1331
|
}
|
@@ -1639,7 +1639,7 @@ static int config_read(git_strmap *values, diskfile_backend *cfg_file, struct re
|
|
1639
1639
|
struct parse_data parse_data;
|
1640
1640
|
|
1641
1641
|
if (depth >= MAX_INCLUDE_DEPTH) {
|
1642
|
-
giterr_set(GITERR_CONFIG, "
|
1642
|
+
giterr_set(GITERR_CONFIG, "maximum config include depth reached");
|
1643
1643
|
return -1;
|
1644
1644
|
}
|
1645
1645
|
|
data/vendor/libgit2/src/crlf.c
CHANGED
@@ -218,7 +218,7 @@ static const char *line_ending(struct crlf_attrs *ca)
|
|
218
218
|
return "\r\n";
|
219
219
|
|
220
220
|
line_ending_error:
|
221
|
-
giterr_set(GITERR_INVALID, "
|
221
|
+
giterr_set(GITERR_INVALID, "invalid input to line ending filter");
|
222
222
|
return NULL;
|
223
223
|
}
|
224
224
|
|
data/vendor/libgit2/src/delta.c
CHANGED
@@ -131,7 +131,7 @@ static int lookup_index_alloc(
|
|
131
131
|
GITERR_CHECK_ALLOC_ADD(&index_len, index_len, hash_len);
|
132
132
|
|
133
133
|
if (!git__is_ulong(index_len)) {
|
134
|
-
giterr_set(GITERR_NOMEMORY, "
|
134
|
+
giterr_set(GITERR_NOMEMORY, "overly large delta");
|
135
135
|
return -1;
|
136
136
|
}
|
137
137
|
|
@@ -544,12 +544,12 @@ int git_delta_apply(
|
|
544
544
|
* base object, resulting in data corruption or segfault.
|
545
545
|
*/
|
546
546
|
if ((hdr_sz(&base_sz, &delta, delta_end) < 0) || (base_sz != base_len)) {
|
547
|
-
giterr_set(GITERR_INVALID, "
|
547
|
+
giterr_set(GITERR_INVALID, "failed to apply delta: base size does not match given data");
|
548
548
|
return -1;
|
549
549
|
}
|
550
550
|
|
551
551
|
if (hdr_sz(&res_sz, &delta, delta_end) < 0) {
|
552
|
-
giterr_set(GITERR_INVALID, "
|
552
|
+
giterr_set(GITERR_INVALID, "failed to apply delta: base size does not match given data");
|
553
553
|
return -1;
|
554
554
|
}
|
555
555
|
|
@@ -614,6 +614,6 @@ fail:
|
|
614
614
|
*out = NULL;
|
615
615
|
*out_len = 0;
|
616
616
|
|
617
|
-
giterr_set(GITERR_INVALID, "
|
617
|
+
giterr_set(GITERR_INVALID, "failed to apply delta");
|
618
618
|
return -1;
|
619
619
|
}
|
@@ -335,14 +335,14 @@ static int display_name(git_buf *buf, git_repository *repo, struct commit_name *
|
|
335
335
|
{
|
336
336
|
if (n->prio == 2 && !n->tag) {
|
337
337
|
if (git_tag_lookup(&n->tag, repo, &n->sha1) < 0) {
|
338
|
-
giterr_set(GITERR_TAG, "
|
338
|
+
giterr_set(GITERR_TAG, "annotated tag '%s' not available", n->path);
|
339
339
|
return -1;
|
340
340
|
}
|
341
341
|
}
|
342
342
|
|
343
343
|
if (n->tag && !n->name_checked) {
|
344
344
|
if (!git_tag_name(n->tag)) {
|
345
|
-
giterr_set(GITERR_TAG, "
|
345
|
+
giterr_set(GITERR_TAG, "annotated tag '%s' has no embedded name", n->path);
|
346
346
|
return -1;
|
347
347
|
}
|
348
348
|
|
@@ -471,7 +471,7 @@ static int describe(
|
|
471
471
|
if (!data->opts->max_candidates_tags) {
|
472
472
|
error = describe_not_found(
|
473
473
|
git_commit_id(commit),
|
474
|
-
"
|
474
|
+
"cannot describe - no tag exactly matches '%s'");
|
475
475
|
|
476
476
|
goto cleanup;
|
477
477
|
}
|
@@ -564,15 +564,15 @@ static int describe(
|
|
564
564
|
}
|
565
565
|
if (unannotated_cnt) {
|
566
566
|
error = describe_not_found(git_commit_id(commit),
|
567
|
-
"
|
568
|
-
"
|
569
|
-
"
|
567
|
+
"cannot describe - "
|
568
|
+
"no annotated tags can describe '%s'; "
|
569
|
+
"however, there were unannotated tags.");
|
570
570
|
goto cleanup;
|
571
571
|
}
|
572
572
|
else {
|
573
573
|
error = describe_not_found(git_commit_id(commit),
|
574
|
-
"
|
575
|
-
"
|
574
|
+
"cannot describe - "
|
575
|
+
"no tags can describe '%s'.");
|
576
576
|
goto cleanup;
|
577
577
|
}
|
578
578
|
}
|
@@ -695,8 +695,8 @@ int git_describe_commit(
|
|
695
695
|
goto cleanup;
|
696
696
|
|
697
697
|
if (git_oidmap_size(data.names) == 0 && !opts->show_commit_oid_as_fallback) {
|
698
|
-
giterr_set(GITERR_DESCRIBE, "
|
699
|
-
"
|
698
|
+
giterr_set(GITERR_DESCRIBE, "cannot describe - "
|
699
|
+
"no reference found, cannot describe anything.");
|
700
700
|
error = -1;
|
701
701
|
goto cleanup;
|
702
702
|
}
|
@@ -793,7 +793,7 @@ int git_describe_format(git_buf *out, const git_describe_result *result, const g
|
|
793
793
|
|
794
794
|
|
795
795
|
if (opts.always_use_long_format && opts.abbreviated_size == 0) {
|
796
|
-
giterr_set(GITERR_DESCRIBE, "
|
796
|
+
giterr_set(GITERR_DESCRIBE, "cannot describe - "
|
797
797
|
"'always_use_long_format' is incompatible with a zero"
|
798
798
|
"'abbreviated_size'");
|
799
799
|
return -1;
|
@@ -151,7 +151,7 @@ static git_diff_driver_registry *git_repository_driver_registry(
|
|
151
151
|
}
|
152
152
|
|
153
153
|
if (!repo->diff_drivers)
|
154
|
-
giterr_set(GITERR_REPOSITORY, "
|
154
|
+
giterr_set(GITERR_REPOSITORY, "unable to create diff driver registry");
|
155
155
|
|
156
156
|
return repo->diff_drivers;
|
157
157
|
}
|
@@ -304,7 +304,7 @@ static int diff_file_content_load_workdir_symlink(
|
|
304
304
|
|
305
305
|
read_len = p_readlink(git_buf_cstr(path), fc->map.data, alloc_len);
|
306
306
|
if (read_len < 0) {
|
307
|
-
giterr_set(GITERR_OS, "
|
307
|
+
giterr_set(GITERR_OS, "failed to read symlink '%s'", fc->file->path);
|
308
308
|
return -1;
|
309
309
|
}
|
310
310
|
|
@@ -624,7 +624,7 @@ int git_diff__oid_for_entry(
|
|
624
624
|
error = git_odb__hashlink(out, full_path.ptr);
|
625
625
|
diff->base.perf.oid_calculations++;
|
626
626
|
} else if (!git__is_sizet(entry.file_size)) {
|
627
|
-
giterr_set(GITERR_OS, "
|
627
|
+
giterr_set(GITERR_OS, "file size overflow (for 32-bits) on '%s'",
|
628
628
|
entry.path);
|
629
629
|
error = -1;
|
630
630
|
} else if (!(error = git_filter_list_load(&fl,
|
@@ -1587,7 +1587,7 @@ int git_diff__commit(
|
|
1587
1587
|
char commit_oidstr[GIT_OID_HEXSZ + 1];
|
1588
1588
|
|
1589
1589
|
error = -1;
|
1590
|
-
giterr_set(GITERR_INVALID, "
|
1590
|
+
giterr_set(GITERR_INVALID, "commit %s is a merge commit",
|
1591
1591
|
git_oid_tostr(commit_oidstr, GIT_OID_HEXSZ + 1, git_commit_id(commit)));
|
1592
1592
|
goto on_error;
|
1593
1593
|
}
|
@@ -222,7 +222,7 @@ static int diff_print_one_raw(
|
|
222
222
|
|
223
223
|
if (pi->id_strlen > id_abbrev) {
|
224
224
|
giterr_set(GITERR_PATCH,
|
225
|
-
"
|
225
|
+
"the patch input contains %d id characters (cannot print %d)",
|
226
226
|
id_abbrev, pi->id_strlen);
|
227
227
|
return -1;
|
228
228
|
}
|
@@ -273,7 +273,7 @@ static int diff_print_oid_range(
|
|
273
273
|
if (delta->old_file.mode &&
|
274
274
|
id_strlen > delta->old_file.id_abbrev) {
|
275
275
|
giterr_set(GITERR_PATCH,
|
276
|
-
"
|
276
|
+
"the patch input contains %d id characters (cannot print %d)",
|
277
277
|
delta->old_file.id_abbrev, id_strlen);
|
278
278
|
return -1;
|
279
279
|
}
|
@@ -281,7 +281,7 @@ static int diff_print_oid_range(
|
|
281
281
|
if ((delta->new_file.mode &&
|
282
282
|
id_strlen > delta->new_file.id_abbrev)) {
|
283
283
|
giterr_set(GITERR_PATCH,
|
284
|
-
"
|
284
|
+
"the patch input contains %d id characters (cannot print %d)",
|
285
285
|
delta->new_file.id_abbrev, id_strlen);
|
286
286
|
return -1;
|
287
287
|
}
|
@@ -680,7 +680,7 @@ int git_diff_print(
|
|
680
680
|
print_file = diff_print_one_name_status;
|
681
681
|
break;
|
682
682
|
default:
|
683
|
-
giterr_set(GITERR_INVALID, "
|
683
|
+
giterr_set(GITERR_INVALID, "unknown diff output format (%d)", format);
|
684
684
|
return -1;
|
685
685
|
}
|
686
686
|
|
@@ -708,7 +708,7 @@ int git_diff_print_callback__to_buf(
|
|
708
708
|
GIT_UNUSED(delta); GIT_UNUSED(hunk);
|
709
709
|
|
710
710
|
if (!output) {
|
711
|
-
giterr_set(GITERR_INVALID, "
|
711
|
+
giterr_set(GITERR_INVALID, "buffer pointer must be provided");
|
712
712
|
return -1;
|
713
713
|
}
|
714
714
|
|
@@ -131,7 +131,7 @@ int git_diff__merge(
|
|
131
131
|
if (ignore_case != ((from->opts.flags & GIT_DIFF_IGNORE_CASE) != 0) ||
|
132
132
|
reversed != ((from->opts.flags & GIT_DIFF_REVERSE) != 0)) {
|
133
133
|
giterr_set(GITERR_INVALID,
|
134
|
-
"
|
134
|
+
"attempt to merge diffs created with conflicting options");
|
135
135
|
return -1;
|
136
136
|
}
|
137
137
|
|
@@ -50,7 +50,7 @@ static int git_xdiff_parse_hunk(git_diff_hunk *hunk, const char *header)
|
|
50
50
|
return 0;
|
51
51
|
|
52
52
|
fail:
|
53
|
-
giterr_set(GITERR_INVALID, "
|
53
|
+
giterr_set(GITERR_INVALID, "malformed hunk header from xdiff");
|
54
54
|
return -1;
|
55
55
|
}
|
56
56
|
|
@@ -99,7 +99,7 @@ static int diff_update_lines(
|
|
99
99
|
info->new_lineno += (int)line->num_lines;
|
100
100
|
break;
|
101
101
|
default:
|
102
|
-
giterr_set(GITERR_INVALID, "
|
102
|
+
giterr_set(GITERR_INVALID, "unknown diff line origin %02x",
|
103
103
|
(unsigned int)line->origin);
|
104
104
|
return -1;
|
105
105
|
}
|