0ba08c05
|
25
|
die(_("Remote with no URL"));
|
54248706
|
61
|
warning(_("promisor remote name cannot begin with '/': %s"),
|
54248706
|
63
|
return NULL;
|
7bdf0926
|
93
|
previous->next = r->next;
|
7b6e1b04
|
108
|
return git_config_string(&core_partial_clone_filter_default,
|
b21a55f3
|
139
|
return 0;
|
dcc8b4e9
|
202
|
static int remove_fetched_oids(struct object_id **oids, int oid_nr, int to_free)
|
dcc8b4e9
|
204
|
int i, missing_nr = 0;
|
dcc8b4e9
|
205
|
int *missing = xcalloc(oid_nr, sizeof(*missing));
|
dcc8b4e9
|
206
|
struct object_id *old_oids = *oids;
|
dcc8b4e9
|
208
|
int old_fetch_if_missing = fetch_if_missing;
|
dcc8b4e9
|
210
|
fetch_if_missing = 0;
|
dcc8b4e9
|
212
|
for (i = 0; i < oid_nr; i++)
|
dcc8b4e9
|
213
|
if (oid_object_info_extended(the_repository, &old_oids[i], NULL, 0)) {
|
dcc8b4e9
|
214
|
missing[i] = 1;
|
dcc8b4e9
|
215
|
missing_nr++;
|
dcc8b4e9
|
218
|
fetch_if_missing = old_fetch_if_missing;
|
dcc8b4e9
|
220
|
if (missing_nr) {
|
dcc8b4e9
|
221
|
int j = 0;
|
dcc8b4e9
|
222
|
new_oids = xcalloc(missing_nr, sizeof(*new_oids));
|
dcc8b4e9
|
223
|
for (i = 0; i < oid_nr; i++)
|
dcc8b4e9
|
224
|
if (missing[i])
|
dcc8b4e9
|
225
|
oidcpy(&new_oids[j++], &old_oids[i]);
|
dcc8b4e9
|
226
|
*oids = new_oids;
|
dcc8b4e9
|
227
|
if (to_free)
|
dcc8b4e9
|
228
|
free(old_oids);
|
dcc8b4e9
|
231
|
free(missing);
|
dcc8b4e9
|
233
|
return missing_nr;
|
dcc8b4e9
|
248
|
if (missing_nr == 1)
|
dcc8b4e9
|
249
|
continue;
|
dcc8b4e9
|
250
|
missing_nr = remove_fetched_oids(&missing_oids, missing_nr, to_free);
|
dcc8b4e9
|
251
|
if (missing_nr) {
|
dcc8b4e9
|
252
|
to_free = 1;
|
dcc8b4e9
|
253
|
continue;
|
dcc8b4e9
|
261
|
free(missing_oids);
|
Barret Rhoden
|
d0738d94
|
blame: add config options to handle output for ignored lines
|
Barret Rhoden
|
dfb4ee12
|
blame: use a fingerprint heuristic to match ignored lines
|
Barret Rhoden
|
3486d8d4
|
Move init_skiplist() outside of fsck
|
Barret Rhoden
|
a5c91678
|
blame: add the ability to ignore commits and their changes
|
Christian Couder
|
0ba08c05
|
Remove fetch-object.{c,h} in favor of promisor-remote.{c,h}
|
Christian Couder
|
54248706
|
Add initial support for many promisor remotes
|
Christian Couder
|
7bdf0926
|
promisor-remote: use repository_format_partial_clone
|
Christian Couder
|
7b6e1b04
|
Move core_partial_clone_filter_default to promisor-remote.c
|
Christian Couder
|
b21a55f3
|
promisor-remote: parse remote.*.partialclonefilter
|
Christian Couder
|
e265069a
|
Use promisor_remote_get_direct() and has_promisor_remote()
|
Christian Couder
|
dcc8b4e9
|
promisor-remote: implement promisor_remote_get_direct()
|
Jonathan Tan
|
472fbef8
|
http-fetch: support fetching packfiles by URL
|
Jonathan Tan
|
a8d662e3
|
upload-pack: refactor reading of pack-objects out
|
Jonathan Tan
|
820a5361
|
upload-pack: send part of packfile response as uri
|
Jonathan Tan
|
bf01639c
|
fetch-pack: support more than one pack lockfile
|
Josh Steadmon
|
6da1f1a9
|
protocol: advertise multiple supported versions
|
Junio C Hamano
|
65de540e
|
Merge branch 'jt/fetch-cdn-offload' into pu
|
Martin Koegler
|
5efde212
|
zlib.c: use size_t for size
|
Nickolai Belakovski
|
2582083f
|
ref-filter: add worktreepath atom
|
a5e5f399
|
415
|
die(_("'%s' cannot be used with updating paths"),
|
a5e5f399
|
425
|
die(_("'%s' cannot be used with %s"),
|
183fb44f
|
433
|
die(_("neither '%s' or '%s' is specified"),
|
183fb44f
|
437
|
die(_("'%s' must be used when '%s' is not specified"),
|
e3ddd3b5
|
442
|
die(_("'%s' or '%s' cannot be used with %s"),
|
e3ddd3b5
|
447
|
die(_("'%s' or '%s' cannot be used with %s"),
|
183fb44f
|
456
|
patch_mode = "--patch=reset";
|
2f0896ec
|
460
|
BUG("either flag must have been set, worktree=%d, index=%d",
|
183fb44f
|
536
|
die(_("unable to write new index file"));
|
1806c29f
|
656
|
BUG("'switch --orphan' should never accept a commit as starting point");
|
1806c29f
|
1039
|
BUG("'switch --orphan' should never accept a commit as starting point");
|
5c06e269
|
1176
|
die(_("only one reference expected"));
|
7968bef0
|
1300
|
const char *ref = to_free;
|
7968bef0
|
1302
|
if (skip_prefix(ref, "refs/tags/", &ref))
|
7968bef0
|
1303
|
die(_("a branch is expected, got tag '%s'"), ref);
|
7968bef0
|
1304
|
if (skip_prefix(ref, "refs/remotes/", &ref))
|
7968bef0
|
1305
|
die(_("a branch is expected, got remote branch '%s'"), ref);
|
7968bef0
|
1306
|
die(_("a branch is expected, got '%s'"), ref);
|
7968bef0
|
1314
|
die(_("a branch is expected, got '%s'"), branch_info->name);
|
c45f0f52
|
1329
|
die(_("cannot switch branch in the middle of an am session\n"
|
c45f0f52
|
1333
|
die(_("cannot switch branch while rebasing\n"
|
c45f0f52
|
1337
|
die(_("cannot switch branch while cherry-picking\n"
|
c45f0f52
|
1341
|
die(_("cannot switch branch while reverting\n"
|
c45f0f52
|
1345
|
die(_("cannot switch branch while bisecting\n"
|
3ec37ad1
|
1372
|
die(_("'%s' cannot be used with '%s'"), "--discard-changes", "--merge");
|
c9c935f6
|
1510
|
BUG("make up your mind, you need to take _something_");
|
183fb44f
|
1542
|
opts->checkout_index = 0;
|
183fb44f
|
1552
|
BUG("these flags should be non-negative by now");
|
c9c935f6
|
1613
|
die(_("could not resolve %s"), opts->from_treeish);
|
Denton Liu
|
526c03b5
|
rebase: refactor can_fast_forward into goto tower
|
Denton Liu
|
10572de1
|
rebase: fast-forward --onto in more cases
|
Denton Liu
|
f39a9c65
|
remote: add --save-to-push option to git remote set-url
|
Derrick Stolee
|
efeb229e
|
commit-graph: return with errors during write
|
Derrick Stolee
|
d83160e8
|
commit-graph: extract fill_oids_from_packs()
|
Derrick Stolee
|
63a8be62
|
commit-graph: extract fill_oids_from_commit_hex()
|
Derrick Stolee
|
93ba1867
|
commit-graph: extract fill_oids_from_all_packs()
|
Derrick Stolee
|
8520d7fc
|
commit-graph: extract write_commit_graph_file()
|
Derrick Stolee
|
af96fe33
|
midx: add packs to packed_git linked list
|
Elijah Newren
|
328bd099
|
fast-import: support 'encoding' commit header
|
Elijah Newren
|
6a362638
|
fast-export: do automatic reencoding of commit messages only if requested
|
Elijah Newren
|
17683839
|
fast-export: avoid stripping encoding header if we cannot reencode
|
Elijah Newren
|
8e712ef6
|
Honor core.precomposeUnicode in more places
|
Jeff King
|
76a7bc09
|
cmd_{read,write}_tree: rename "unused" variable that is used
|
Jeff King
|
7bd9631b
|
read-cache: drop unused parameter from threaded load
|
Johannes Schindelin
|
dc76852d
|
fsmonitor: demonstrate that it is not refreshed after discard_index()
|
Johannes Schindelin
|
f3a3a021
|
difftool --no-index: error out on --dir-diff (and don't crash)
|
Jonathan Nieder
|
ee70c128
|
index: offer advice for unknown index extensions
|
Nguyễn Thái Ngọc Duy
|
3ec37ad1
|
switch: add --discard-changes
|
Nguyễn Thái Ngọc Duy
|
722abec7
|
worktree add: sanitize worktree names
|
Nguyễn Thái Ngọc Duy
|
324d237f
|
merge: add --quit
|
Nguyễn Thái Ngọc Duy
|
a5e5f399
|
restore: replace --force with --ignore-unmerged
|
Nguyễn Thái Ngọc Duy
|
183fb44f
|
restore: add --worktree and --staged
|
Nguyễn Thái Ngọc Duy
|
e3ddd3b5
|
restore: reject invalid combinations with --staged
|
Nguyễn Thái Ngọc Duy
|
2f0896ec
|
restore: support --patch
|
Nguyễn Thái Ngọc Duy
|
1806c29f
|
switch: make --orphan switch to an empty tree
|
Nguyễn Thái Ngọc Duy
|
5c06e269
|
switch: stop accepting pathspec
|
Nguyễn Thái Ngọc Duy
|
7968bef0
|
switch: only allow explicit detached HEAD
|
Nguyễn Thái Ngọc Duy
|
c45f0f52
|
switch: reject if some operation is in progress
|
Nguyễn Thái Ngọc Duy
|
c9c935f6
|
restore: take tree-ish from --source option instead
|
0609b741
|
146
|
static int add_exec_commands(struct string_list *commands)
|
0609b741
|
148
|
const char *todo_file = rebase_path_todo();
|
0609b741
|
149
|
struct todo_list todo_list = TODO_LIST_INIT;
|
0609b741
|
152
|
if (strbuf_read_file(&todo_list.buf, todo_file, 0) < 0)
|
0609b741
|
153
|
return error_errno(_("could not read '%s'."), todo_file);
|
0609b741
|
155
|
if (todo_list_parse_insn_buffer(the_repository, todo_list.buf.buf,
|
0609b741
|
157
|
todo_list_release(&todo_list);
|
0609b741
|
158
|
return error(_("unusable todo list: '%s'"), todo_file);
|
0609b741
|
161
|
todo_list_add_exec_commands(&todo_list, commands);
|
0609b741
|
162
|
res = todo_list_write_to_file(the_repository, &todo_list,
|
0609b741
|
164
|
todo_list_release(&todo_list);
|
0609b741
|
166
|
if (res)
|
0609b741
|
167
|
return error_errno(_("could not write '%s'."), todo_file);
|
0609b741
|
168
|
return 0;
|
0609b741
|
171
|
static int rearrange_squash_in_todo_file(void)
|
0609b741
|
173
|
const char *todo_file = rebase_path_todo();
|
0609b741
|
174
|
struct todo_list todo_list = TODO_LIST_INIT;
|
0609b741
|
175
|
int res = 0;
|
0609b741
|
177
|
if (strbuf_read_file(&todo_list.buf, todo_file, 0) < 0)
|
0609b741
|
178
|
return error_errno(_("could not read '%s'."), todo_file);
|
0609b741
|
179
|
if (todo_list_parse_insn_buffer(the_repository, todo_list.buf.buf,
|
0609b741
|
181
|
todo_list_release(&todo_list);
|
0609b741
|
182
|
return error(_("unusable todo list: '%s'"), todo_file);
|
0609b741
|
185
|
res = todo_list_rearrange_squash(&todo_list);
|
0609b741
|
186
|
if (!res)
|
0609b741
|
187
|
res = todo_list_write_to_file(the_repository, &todo_list,
|
0609b741
|
190
|
todo_list_release(&todo_list);
|
0609b741
|
192
|
if (res)
|
0609b741
|
193
|
return error_errno(_("could not write '%s'."), todo_file);
|
0609b741
|
194
|
return 0;
|
0609b741
|
204
|
return error_errno(_("could not read '%s'."), todo_file);
|
0609b741
|
208
|
todo_list_release(&todo_list);
|
0609b741
|
209
|
return error(_("unusable todo list: '%s'"), todo_file);
|
0609b741
|
217
|
return error_errno(_("could not write '%s'."), todo_file);
|
0609b741
|
229
|
return error_errno(_("could not read '%s'."), todo_file);
|
0609b741
|
235
|
res = error_errno(_("could not write '%s'"), todo_file);
|
0609b741
|
252
|
return error(_("no HEAD?"));
|
c44c2462
|
279
|
return error_errno(_("could not create temporary %s"), merge_dir());
|
0609b741
|
285
|
return error_errno(_("could not mark as interactive"));
|
0609b741
|
314
|
return -1;
|
0609b741
|
318
|
return -1;
|
0609b741
|
323
|
free(revisions);
|
0609b741
|
324
|
free(shortrevisions);
|
0609b741
|
326
|
return -1;
|
7d3488eb
|
335
|
argv_array_push(&make_script_args,
|
0ea0847e
|
336
|
oid_to_hex(&opts->restrict_revision->object.oid));
|
0609b741
|
343
|
error(_("could not generate todo list"));
|
0609b741
|
348
|
BUG("unusable todo list");
|
460bc3ce
|
382
|
die(_("a base commit must be provided with --upstream or --onto"));
|
460bc3ce
|
419
|
ret = rearrange_squash_in_todo_file();
|
460bc3ce
|
420
|
break;
|
460bc3ce
|
422
|
struct string_list commands = STRING_LIST_INIT_DUP;
|
460bc3ce
|
424
|
split_exec_commands(opts->cmd, &commands);
|
460bc3ce
|
425
|
ret = add_exec_commands(&commands);
|
460bc3ce
|
426
|
string_list_clear(&commands, 0);
|
460bc3ce
|
427
|
break;
|
460bc3ce
|
430
|
BUG("invalid command '%d'", command);
|
0609b741
|
509
|
usage_with_options(builtin_rebase_interactive_usage, options);
|
73fdc535
|
515
|
opts.squash_onto = &squash_onto;
|
0609b741
|
518
|
warning(_("--[no-]rebase-cousins has no effect without "
|
Jeff Hostetler
|
a0897249
|
trace2: refactor setting process starting time
|
Jeff Hostetler
|
bce9db6d
|
trace2: use system/global config for default trace2 settings
|
Jeff Hostetler
|
08881b9a
|
trace2: make SIDs more unique
|
Josh Steadmon
|
22a73383
|
trace2: fix incorrect function pointer check
|
Junio C Hamano
|
5b2d1c0c
|
Merge branch 'jh/trace2-sid-fix'
|
Phillip Wood
|
0609b741
|
rebase -i: combine rebase--interactive.c with rebase.c
|
Phillip Wood
|
c44c2462
|
rebase -i: remove duplication
|
Phillip Wood
|
7d3488eb
|
rebase -i: use struct commit when parsing options
|
Phillip Wood
|
0ea0847e
|
rebase -i: use struct rebase_options in do_interactive_rebase()
|
Phillip Wood
|
460bc3ce
|
rebase -i: run without forking rebase--interactive
|
Phillip Wood
|
73fdc535
|
rebase -i: use struct rebase_options to parse args
|
Phillip Wood
|
33898531
|
rebase -i: use struct object_id for squash_onto
|
Phillip Wood
|
4a72486d
|
fix cherry-pick/revert status after commit
|
Phillip Wood
|
b07d9bfd
|
commit/reset: try to clean up sequencer state
|