Skip to content

Commit 636e87d

Browse files
committed
Merge branch 'maint'
* maint: Documentation/gitdiffcore: fix order in pickaxe description Documentation: fix minor inconsistency Documentation: rebase -i ignores options passed to "git am" hash_object: correction for zero length file
2 parents 1c9eecf + d07ef71 commit 636e87d

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

Documentation/config.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1525,7 +1525,7 @@ receive.denyDeletes::
15251525
the ref. Use this to prevent such a ref deletion via a push.
15261526

15271527
receive.denyCurrentBranch::
1528-
If set to true or "refuse", receive-pack will deny a ref update
1528+
If set to true or "refuse", git-receive-pack will deny a ref update
15291529
to the currently checked out branch of a non-bare repository.
15301530
Such a push is potentially dangerous because it brings the HEAD
15311531
out of sync with the index and working tree. If set to "warn",

Documentation/git-rebase.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ link:howto/revert-a-faulty-merge.txt[revert-a-faulty-merge How-To] for details).
295295
--ignore-date::
296296
These flags are passed to 'git am' to easily change the dates
297297
of the rebased commits (see linkgit:git-am[1]).
298+
Incompatible with the --interactive option.
298299

299300
-i::
300301
--interactive::

Documentation/gitdiffcore.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ changes that touch a specified string, and is controlled by the
227227
commands.
228228

229229
When diffcore-pickaxe is in use, it checks if there are
230-
filepairs whose "original" side has the specified string and
231-
whose "result" side does not. Such a filepair represents "the
230+
filepairs whose "result" side has the specified string and
231+
whose "origin" side does not. Such a filepair represents "the
232232
string appeared in this changeset". It also checks for the
233233
opposite case that loses the specified string.
234234

sha1_file.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2448,6 +2448,8 @@ int index_fd(unsigned char *sha1, int fd, struct stat *st, int write_object,
24482448
else
24492449
ret = -1;
24502450
strbuf_release(&sbuf);
2451+
} else if (!size) {
2452+
ret = index_mem(sha1, NULL, size, write_object, type, path);
24512453
} else if (size <= SMALL_FILE_SIZE) {
24522454
char *buf = xmalloc(size);
24532455
if (size == read_in_full(fd, buf, size))
@@ -2456,12 +2458,11 @@ int index_fd(unsigned char *sha1, int fd, struct stat *st, int write_object,
24562458
else
24572459
ret = error("short read %s", strerror(errno));
24582460
free(buf);
2459-
} else if (size) {
2461+
} else {
24602462
void *buf = xmmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);
24612463
ret = index_mem(sha1, buf, size, write_object, type, path);
24622464
munmap(buf, size);
2463-
} else
2464-
ret = index_mem(sha1, NULL, size, write_object, type, path);
2465+
}
24652466
close(fd);
24662467
return ret;
24672468
}

0 commit comments

Comments
 (0)