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
This commit is contained in:
Junio C Hamano
2007-05-16 12:43:05 -07:00
6 changed files with 11 additions and 4 deletions

View File

@ -136,7 +136,7 @@ $ git branch -D test <2>
+ +
<1> delete remote-tracking branches "todo", "html", "man" <1> delete remote-tracking branches "todo", "html", "man"
<2> delete "test" branch even if the "master" branch does not have all <2> delete "test" branch even if the "master" branch does not have all
commits from todo branch. commits from test branch.
Notes Notes

View File

@ -1357,7 +1357,7 @@ $ gitk --merge
These will display all commits which exist only on HEAD or on These will display all commits which exist only on HEAD or on
MERGE_HEAD, and which touch an unmerged file. 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. unmerged files using external tools such as emacs or kdiff3.
Each time you resolve the conflicts in a file and update the index: Each time you resolve the conflicts in a file and update the index:

View File

@ -58,7 +58,10 @@ copy_data:
parents = parents->next, parent_number++) { parents = parents->next, parent_number++) {
if (parent_number > 1) { if (parent_number > 1) {
int len = strlen(tip_name); 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")) if (len > 2 && !strcmp(tip_name + len - 2, "^0"))
len -= 2; len -= 2;

View File

@ -1063,6 +1063,7 @@ unsigned long pretty_print_commit(enum cmit_fmt fmt,
int sz; int sz;
char header[512]; char header[512];
const char *header_fmt = const char *header_fmt =
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=%s\n" "Content-Type: text/plain; charset=%s\n"
"Content-Transfer-Encoding: 8bit\n"; "Content-Transfer-Encoding: 8bit\n";
sz = snprintf(header, sizeof(header), header_fmt, sz = snprintf(header, sizeof(header), header_fmt,

View File

@ -75,7 +75,7 @@ foreach my $tar_file (@ARGV)
$mode = oct $mode; $mode = oct $mode;
$size = oct $size; $size = oct $size;
$mtime = oct $mtime; $mtime = oct $mtime;
next if $mode & 0040000; next if $typeflag == 5; # directory
print FI "blob\n", "mark :$next_mark\n", "data $size\n"; print FI "blob\n", "mark :$next_mark\n", "data $size\n";
while ($size > 0 && read(I, $_, 512) == 512) { while ($size > 0 && read(I, $_, 512) == 512) {

View File

@ -21,6 +21,9 @@
#define MSB(x, bits) ((x) & TYPEOF(x)(~0ULL << (sizeof(x) * 8 - (bits)))) #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__) #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 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */ #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */