Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Junio C Hamano committed May 19, 2010
2 parents 1c9eecf + d07ef71 commit 636e87d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Documentation/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1525,7 +1525,7 @@ receive.denyDeletes::
the ref. Use this to prevent such a ref deletion via a push.

receive.denyCurrentBranch::
If set to true or "refuse", receive-pack will deny a ref update
If set to true or "refuse", git-receive-pack will deny a ref update
to the currently checked out branch of a non-bare repository.
Such a push is potentially dangerous because it brings the HEAD
out of sync with the index and working tree. If set to "warn",
Expand Down
1 change: 1 addition & 0 deletions Documentation/git-rebase.txt
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ link:howto/revert-a-faulty-merge.txt[revert-a-faulty-merge How-To] for details).
--ignore-date::
These flags are passed to 'git am' to easily change the dates
of the rebased commits (see linkgit:git-am[1]).
Incompatible with the --interactive option.

-i::
--interactive::
Expand Down
4 changes: 2 additions & 2 deletions Documentation/gitdiffcore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ changes that touch a specified string, and is controlled by the
commands.

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

Expand Down
7 changes: 4 additions & 3 deletions sha1_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -2448,6 +2448,8 @@ int index_fd(unsigned char *sha1, int fd, struct stat *st, int write_object,
else
ret = -1;
strbuf_release(&sbuf);
} else if (!size) {
ret = index_mem(sha1, NULL, size, write_object, type, path);
} else if (size <= SMALL_FILE_SIZE) {
char *buf = xmalloc(size);
if (size == read_in_full(fd, buf, size))
Expand All @@ -2456,12 +2458,11 @@ int index_fd(unsigned char *sha1, int fd, struct stat *st, int write_object,
else
ret = error("short read %s", strerror(errno));
free(buf);
} else if (size) {
} else {
void *buf = xmmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);
ret = index_mem(sha1, buf, size, write_object, type, path);
munmap(buf, size);
} else
ret = index_mem(sha1, NULL, size, write_object, type, path);
}
close(fd);
return ret;
}
Expand Down

0 comments on commit 636e87d

Please sign in to comment.