aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/git-branch.txt2
-rw-r--r--Documentation/user-manual.txt2
-rw-r--r--builtin-name-rev.c5
-rw-r--r--commit.c1
-rwxr-xr-xcontrib/fast-import/import-tars.perl2
-rw-r--r--git-compat-util.h3
6 files changed, 11 insertions, 4 deletions
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 603f87f3b..8dc5171f5 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -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
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index a7abeaa1d..8d6688633 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -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:
diff --git a/builtin-name-rev.c b/builtin-name-rev.c
index c02222436..ef1638590 100644
--- a/builtin-name-rev.c
+++ b/builtin-name-rev.c
@@ -58,7 +58,10 @@ copy_data:
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;
diff --git a/commit.c b/commit.c
index d01833d81..bee066fa3 100644
--- a/commit.c
+++ b/commit.c
@@ -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,
diff --git a/contrib/fast-import/import-tars.perl b/contrib/fast-import/import-tars.perl
index 1e6fa5a15..23aeb257b 100755
--- a/contrib/fast-import/import-tars.perl
+++ b/contrib/fast-import/import-tars.perl
@@ -75,7 +75,7 @@ foreach my $tar_file (@ARGV)
$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) {
diff --git a/git-compat-util.h b/git-compat-util.h
index c08688c8f..6bd8987b2 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -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 */