diff options
author | Junio C Hamano <junkio@cox.net> | 2007-05-16 12:43:05 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-05-16 12:43:05 -0700 |
commit | fdcb769916c93b53517ef1b4cae447a3333c9b86 (patch) | |
tree | 15900032ae854c16292e8d8e0b5d1f089b5c8263 | |
parent | 7e431ef9ab933d7ff899a999e40627ab49774f3a (diff) | |
parent | 0ab564be6e59c66c7aa4fc44997f3fc62ebcd0d9 (diff) | |
download | git-fdcb769916c93b53517ef1b4cae447a3333c9b86.tar.gz |
Merge branch 'maint'
* 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
-rw-r--r-- | Documentation/git-branch.txt | 2 | ||||
-rw-r--r-- | Documentation/user-manual.txt | 2 | ||||
-rw-r--r-- | builtin-name-rev.c | 5 | ||||
-rw-r--r-- | commit.c | 1 | ||||
-rwxr-xr-x | contrib/fast-import/import-tars.perl | 2 | ||||
-rw-r--r-- | git-compat-util.h | 3 |
6 files changed, 11 insertions, 4 deletions
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index 603f87f3b5..8dc5171f5e 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 a7abeaa1d7..8d66886335 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 c022224361..ef16385907 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; @@ -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 1e6fa5a15c..23aeb257b9 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 c08688c8f3..6bd8987b27 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 */ |