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:
Junio C Hamano 2008-07-19 11:28:06 -07:00
commit 679639904d
6 changed files with 31 additions and 16 deletions

View File

@ -28,16 +28,20 @@ Fixes since v1.5.6.3
be huge by saying "no common commits", but this was an unnecessary
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]
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
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.
--
exec >/var/tmp/1
echo O=$(git describe maint)
O=v1.5.6.3-21-gebcce31
git shortlog --no-merges $O..maint
* "git-rev-list --quiet" was not quiet as advertised.
Contains other various documentation fixes.

View File

@ -30,7 +30,7 @@ Functions
start_command() followed by finish_command(). Takes a pointer
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
start_command() followed by finish_command(). The argument argv

View File

@ -590,6 +590,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
revs.commit_format = CMIT_FMT_UNSPECIFIED;
argc = setup_revisions(argc, argv, &revs, NULL);
quiet = DIFF_OPT_TST(&revs.diffopt, QUIET);
for (i = 1 ; i < argc; 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);
continue;
}
if (!strcmp(arg, "--quiet")) {
quiet = 1;
continue;
}
usage(rev_list_usage);
}

View File

@ -146,11 +146,6 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
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);
if (!argc)
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)
setup_work_tree();
newfd = hold_locked_index(&lock_file, 1);
if (read_cache() < 0)
die("index file corrupt");
pathspec = get_pathspec(prefix, argv);
seen = NULL;
for (i = 0; pathspec[i] ; i++)

View File

@ -442,6 +442,8 @@ static int setup_index(struct walker *walker, struct alt_base *repo, unsigned ch
return -1;
new_pack = parse_pack_index(sha1);
if (!new_pack)
return -1; /* parse_pack_index() already issued error message */
new_pack->next = repo->packs;
repo->packs = new_pack;
return 0;

View File

@ -217,4 +217,16 @@ test_expect_success 'Remove nonexistent file returns nonzero exit status' '
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