Skip to content

Commit 7794a68

Browse files
committed
Sync with 1.8.5.2
* maint: Git 1.8.5.2 cmd_repack(): remove redundant local variable "nr_packs"
2 parents b10cd57 + 5512ac5 commit 7794a68

File tree

3 files changed

+24
-5
lines changed

3 files changed

+24
-5
lines changed

Documentation/RelNotes/1.8.5.2.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Git v1.8.5.2 Release Notes
2+
==========================
3+
4+
Fixes since v1.8.5.1
5+
--------------------
6+
7+
* "git diff -- ':(icase)makefile'" was unnecessarily rejected at the
8+
command line parser.
9+
10+
* "git cat-file --batch-check=ok" did not check the existence of
11+
the named object.
12+
13+
* "git am --abort" sometimes complained about not being able to write
14+
a tree with an 0{40} object in it.
15+
16+
* Two processes creating loose objects at the same time could have
17+
failed unnecessarily when the name of their new objects started
18+
with the same byte value, due to a race condition.
19+
20+
Also contains typofixes, documentation updates and trivial code clean-ups.

Documentation/git.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ unreleased) version of Git, that is available from 'master'
4343
branch of the `git.git` repository.
4444
Documentation for older releases are available here:
4545

46-
* link:v1.8.5.1/git.html[documentation for release 1.8.5.1]
46+
* link:v1.8.5.2/git.html[documentation for release 1.8.5.2]
4747

4848
* release notes for
49+
link:RelNotes/1.8.5.2.txt[1.8.5.2],
4950
link:RelNotes/1.8.5.1.txt[1.8.5.1],
5051
link:RelNotes/1.8.5.txt[1.8.5].
5152

builtin/repack.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
123123
struct string_list rollback = STRING_LIST_INIT_NODUP;
124124
struct string_list existing_packs = STRING_LIST_INIT_DUP;
125125
struct strbuf line = STRBUF_INIT;
126-
int nr_packs, ext, ret, failed;
126+
int ext, ret, failed;
127127
FILE *out;
128128

129129
/* variables to be filled by option parsing */
@@ -233,21 +233,19 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
233233
if (ret)
234234
return ret;
235235

236-
nr_packs = 0;
237236
out = xfdopen(cmd.out, "r");
238237
while (strbuf_getline(&line, out, '\n') != EOF) {
239238
if (line.len != 40)
240239
die("repack: Expecting 40 character sha1 lines only from pack-objects.");
241240
string_list_append(&names, line.buf);
242-
nr_packs++;
243241
}
244242
fclose(out);
245243
ret = finish_command(&cmd);
246244
if (ret)
247245
return ret;
248246
argv_array_clear(&cmd_args);
249247

250-
if (!nr_packs && !quiet)
248+
if (!names.nr && !quiet)
251249
printf("Nothing new to pack.\n");
252250

253251
/*

0 commit comments

Comments
 (0)