Sync with 1.8.5.2
* maint: Git 1.8.5.2 cmd_repack(): remove redundant local variable "nr_packs"
This commit is contained in:
20
Documentation/RelNotes/1.8.5.2.txt
Normal file
20
Documentation/RelNotes/1.8.5.2.txt
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
Git v1.8.5.2 Release Notes
|
||||||
|
==========================
|
||||||
|
|
||||||
|
Fixes since v1.8.5.1
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
* "git diff -- ':(icase)makefile'" was unnecessarily rejected at the
|
||||||
|
command line parser.
|
||||||
|
|
||||||
|
* "git cat-file --batch-check=ok" did not check the existence of
|
||||||
|
the named object.
|
||||||
|
|
||||||
|
* "git am --abort" sometimes complained about not being able to write
|
||||||
|
a tree with an 0{40} object in it.
|
||||||
|
|
||||||
|
* Two processes creating loose objects at the same time could have
|
||||||
|
failed unnecessarily when the name of their new objects started
|
||||||
|
with the same byte value, due to a race condition.
|
||||||
|
|
||||||
|
Also contains typofixes, documentation updates and trivial code clean-ups.
|
@ -43,9 +43,10 @@ unreleased) version of Git, that is available from 'master'
|
|||||||
branch of the `git.git` repository.
|
branch of the `git.git` repository.
|
||||||
Documentation for older releases are available here:
|
Documentation for older releases are available here:
|
||||||
|
|
||||||
* link:v1.8.5.1/git.html[documentation for release 1.8.5.1]
|
* link:v1.8.5.2/git.html[documentation for release 1.8.5.2]
|
||||||
|
|
||||||
* release notes for
|
* release notes for
|
||||||
|
link:RelNotes/1.8.5.2.txt[1.8.5.2],
|
||||||
link:RelNotes/1.8.5.1.txt[1.8.5.1],
|
link:RelNotes/1.8.5.1.txt[1.8.5.1],
|
||||||
link:RelNotes/1.8.5.txt[1.8.5].
|
link:RelNotes/1.8.5.txt[1.8.5].
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
|
|||||||
struct string_list rollback = STRING_LIST_INIT_NODUP;
|
struct string_list rollback = STRING_LIST_INIT_NODUP;
|
||||||
struct string_list existing_packs = STRING_LIST_INIT_DUP;
|
struct string_list existing_packs = STRING_LIST_INIT_DUP;
|
||||||
struct strbuf line = STRBUF_INIT;
|
struct strbuf line = STRBUF_INIT;
|
||||||
int nr_packs, ext, ret, failed;
|
int ext, ret, failed;
|
||||||
FILE *out;
|
FILE *out;
|
||||||
|
|
||||||
/* variables to be filled by option parsing */
|
/* variables to be filled by option parsing */
|
||||||
@ -233,13 +233,11 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
nr_packs = 0;
|
|
||||||
out = xfdopen(cmd.out, "r");
|
out = xfdopen(cmd.out, "r");
|
||||||
while (strbuf_getline(&line, out, '\n') != EOF) {
|
while (strbuf_getline(&line, out, '\n') != EOF) {
|
||||||
if (line.len != 40)
|
if (line.len != 40)
|
||||||
die("repack: Expecting 40 character sha1 lines only from pack-objects.");
|
die("repack: Expecting 40 character sha1 lines only from pack-objects.");
|
||||||
string_list_append(&names, line.buf);
|
string_list_append(&names, line.buf);
|
||||||
nr_packs++;
|
|
||||||
}
|
}
|
||||||
fclose(out);
|
fclose(out);
|
||||||
ret = finish_command(&cmd);
|
ret = finish_command(&cmd);
|
||||||
@ -247,7 +245,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
|
|||||||
return ret;
|
return ret;
|
||||||
argv_array_clear(&cmd_args);
|
argv_array_clear(&cmd_args);
|
||||||
|
|
||||||
if (!nr_packs && !quiet)
|
if (!names.nr && !quiet)
|
||||||
printf("Nothing new to pack.\n");
|
printf("Nothing new to pack.\n");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user