Merge branch 'maint'
* maint: GIT 1.5.6.4 builtin-rm: fix index lock file path http-fetch: do not SEGV after fetching a bad pack idx file rev-list: honor --quiet option api-run-command.txt: typofix
This commit is contained in:
commit
679639904d
@ -28,16 +28,20 @@ Fixes since v1.5.6.3
|
|||||||
be huge by saying "no common commits", but this was an unnecessary
|
be huge by saying "no common commits", but this was an unnecessary
|
||||||
noise; it is already known by the user anyway.
|
noise; it is already known by the user anyway.
|
||||||
|
|
||||||
|
* "git-http-fetch" would have segfaulted when pack idx file retrieved
|
||||||
|
from the other side was corrupt.
|
||||||
|
|
||||||
|
* "git-index-pack" used too much memory when dealing with a deep delta chain.
|
||||||
|
|
||||||
* "git-mailinfo" (hence "git-am") did not correctly handle in-body [PATCH]
|
* "git-mailinfo" (hence "git-am") did not correctly handle in-body [PATCH]
|
||||||
line to override the commit title taken from the mail Subject header.
|
line to override the commit title taken from the mail Subject header.
|
||||||
|
|
||||||
* "git-rebase -i -p" lost parents that are not involved in the history
|
* "git-rebase -i -p" lost parents that are not involved in the history
|
||||||
being rewritten.
|
being rewritten.
|
||||||
|
|
||||||
Contains other various documentation fixes.
|
* "git-rm" lost track of where the index file was when GIT_DIR was
|
||||||
|
specified as a relative path.
|
||||||
|
|
||||||
--
|
* "git-rev-list --quiet" was not quiet as advertised.
|
||||||
exec >/var/tmp/1
|
|
||||||
echo O=$(git describe maint)
|
Contains other various documentation fixes.
|
||||||
O=v1.5.6.3-21-gebcce31
|
|
||||||
git shortlog --no-merges $O..maint
|
|
||||||
|
@ -30,7 +30,7 @@ Functions
|
|||||||
start_command() followed by finish_command(). Takes a pointer
|
start_command() followed by finish_command(). Takes a pointer
|
||||||
to a `struct child_process` that specifies the details.
|
to a `struct child_process` that specifies the details.
|
||||||
|
|
||||||
`run_command_v_opt`, `run_command_v_opt_dir`, `run_command_v_opt_cd_env`::
|
`run_command_v_opt`, `run_command_v_opt_cd`, `run_command_v_opt_cd_env`::
|
||||||
|
|
||||||
Convenience functions that encapsulate a sequence of
|
Convenience functions that encapsulate a sequence of
|
||||||
start_command() followed by finish_command(). The argument argv
|
start_command() followed by finish_command(). The argument argv
|
||||||
|
@ -590,6 +590,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
|
|||||||
revs.commit_format = CMIT_FMT_UNSPECIFIED;
|
revs.commit_format = CMIT_FMT_UNSPECIFIED;
|
||||||
argc = setup_revisions(argc, argv, &revs, NULL);
|
argc = setup_revisions(argc, argv, &revs, NULL);
|
||||||
|
|
||||||
|
quiet = DIFF_OPT_TST(&revs.diffopt, QUIET);
|
||||||
for (i = 1 ; i < argc; i++) {
|
for (i = 1 ; i < argc; i++) {
|
||||||
const char *arg = argv[i];
|
const char *arg = argv[i];
|
||||||
|
|
||||||
@ -621,10 +622,6 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
|
|||||||
read_revisions_from_stdin(&revs);
|
read_revisions_from_stdin(&revs);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!strcmp(arg, "--quiet")) {
|
|
||||||
quiet = 1;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
usage(rev_list_usage);
|
usage(rev_list_usage);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
10
builtin-rm.c
10
builtin-rm.c
@ -146,11 +146,6 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
|
|||||||
|
|
||||||
git_config(git_default_config, NULL);
|
git_config(git_default_config, NULL);
|
||||||
|
|
||||||
newfd = hold_locked_index(&lock_file, 1);
|
|
||||||
|
|
||||||
if (read_cache() < 0)
|
|
||||||
die("index file corrupt");
|
|
||||||
|
|
||||||
argc = parse_options(argc, argv, builtin_rm_options, builtin_rm_usage, 0);
|
argc = parse_options(argc, argv, builtin_rm_options, builtin_rm_usage, 0);
|
||||||
if (!argc)
|
if (!argc)
|
||||||
usage_with_options(builtin_rm_usage, builtin_rm_options);
|
usage_with_options(builtin_rm_usage, builtin_rm_options);
|
||||||
@ -158,6 +153,11 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
|
|||||||
if (!index_only)
|
if (!index_only)
|
||||||
setup_work_tree();
|
setup_work_tree();
|
||||||
|
|
||||||
|
newfd = hold_locked_index(&lock_file, 1);
|
||||||
|
|
||||||
|
if (read_cache() < 0)
|
||||||
|
die("index file corrupt");
|
||||||
|
|
||||||
pathspec = get_pathspec(prefix, argv);
|
pathspec = get_pathspec(prefix, argv);
|
||||||
seen = NULL;
|
seen = NULL;
|
||||||
for (i = 0; pathspec[i] ; i++)
|
for (i = 0; pathspec[i] ; i++)
|
||||||
|
@ -442,6 +442,8 @@ static int setup_index(struct walker *walker, struct alt_base *repo, unsigned ch
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
new_pack = parse_pack_index(sha1);
|
new_pack = parse_pack_index(sha1);
|
||||||
|
if (!new_pack)
|
||||||
|
return -1; /* parse_pack_index() already issued error message */
|
||||||
new_pack->next = repo->packs;
|
new_pack->next = repo->packs;
|
||||||
repo->packs = new_pack;
|
repo->packs = new_pack;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -217,4 +217,16 @@ test_expect_success 'Remove nonexistent file returns nonzero exit status' '
|
|||||||
test_must_fail git rm nonexistent
|
test_must_fail git rm nonexistent
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success 'Call "rm" from outside the work tree' '
|
||||||
|
mkdir repo &&
|
||||||
|
cd repo &&
|
||||||
|
git init &&
|
||||||
|
echo something > somefile &&
|
||||||
|
git add somefile &&
|
||||||
|
git commit -m "add a file" &&
|
||||||
|
(cd .. &&
|
||||||
|
git --git-dir=repo/.git --work-tree=repo rm somefile) &&
|
||||||
|
test_must_fail git ls-files --error-unmatch somefile
|
||||||
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
Loading…
Reference in New Issue
Block a user