Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* maint:
  format-patch: add MIME-Version header when we add content-type.
  Fixed link in user-manual
  import-tars: Use the "Link indicator" to identify directories
  git name-rev writes beyond the end of malloc() with large generations
  Documentation/branch: fix small typo in -D example
  • Loading branch information
Junio C Hamano committed May 16, 2007
2 parents 7e431ef + 0ab564b commit fdcb769
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Documentation/git-branch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ $ git branch -D test <2>
+
<1> delete remote-tracking branches "todo", "html", "man"
<2> delete "test" branch even if the "master" branch does not have all
commits from todo branch.
commits from test branch.


Notes
Expand Down
2 changes: 1 addition & 1 deletion Documentation/user-manual.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@ $ gitk --merge
These will display all commits which exist only on HEAD or on
MERGE_HEAD, and which touch an unmerged file.

You may also use gitlink:git-mergetool, which lets you merge the
You may also use gitlink:git-mergetool[1], which lets you merge the
unmerged files using external tools such as emacs or kdiff3.

Each time you resolve the conflicts in a file and update the index:
Expand Down
5 changes: 4 additions & 1 deletion builtin-name-rev.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ static void name_rev(struct commit *commit,
parents = parents->next, parent_number++) {
if (parent_number > 1) {
int len = strlen(tip_name);
char *new_name = xmalloc(len + 8);
char *new_name = xmalloc(len +
1 + decimal_length(generation) + /* ~<n> */
1 + 2 + /* ^NN */
1);

if (len > 2 && !strcmp(tip_name + len - 2, "^0"))
len -= 2;
Expand Down
1 change: 1 addition & 0 deletions commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,7 @@ unsigned long pretty_print_commit(enum cmit_fmt fmt,
int sz;
char header[512];
const char *header_fmt =
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=%s\n"
"Content-Transfer-Encoding: 8bit\n";
sz = snprintf(header, sizeof(header), header_fmt,
Expand Down
2 changes: 1 addition & 1 deletion contrib/fast-import/import-tars.perl
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
$mode = oct $mode;
$size = oct $size;
$mtime = oct $mtime;
next if $mode & 0040000;
next if $typeflag == 5; # directory

print FI "blob\n", "mark :$next_mark\n", "data $size\n";
while ($size > 0 && read(I, $_, 512) == 512) {
Expand Down
3 changes: 3 additions & 0 deletions git-compat-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@

#define MSB(x, bits) ((x) & TYPEOF(x)(~0ULL << (sizeof(x) * 8 - (bits))))

/* Approximation of the length of the decimal representation of this type. */
#define decimal_length(x) ((int)(sizeof(x) * 2.56 + 0.5) + 1)

#if !defined(__APPLE__) && !defined(__FreeBSD__)
#define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
Expand Down

0 comments on commit fdcb769

Please sign in to comment.