Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Wed, 19 May 2010 05:39:56 +0000 (22:39 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 19 May 2010 05:39:56 +0000 (22:39 -0700)
* 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

1  2 
Documentation/config.txt
sha1_file.c
diff --combined Documentation/config.txt
index e5aa2cacfadc79a985a9178ea121c0078565c0d9,c3ebd4d07c4b2839a34c48cda0d4e1612ea37f8b..39140bad4d3b3c50a9cf090545299c81001db329
@@@ -481,8 -481,6 +481,8 @@@ core.whitespace:
    error (enabled by default).
  * `indent-with-non-tab` treats a line that is indented with 8 or more
    space characters as an error (not enabled by default).
 +* `tab-in-indent` treats a tab character in the initial indent part of
 +  the line as an error (not enabled by default).
  * `blank-at-eof` treats blank lines added at the end of file as an error
    (enabled by default).
  * `trailing-space` is a short-hand to cover both `blank-at-eol` and
@@@ -1270,13 -1268,6 +1270,13 @@@ log.date:
        following alternatives: {relative,local,default,iso,rfc,short}.
        See linkgit:git-log[1].
  
 +log.decorate::
 +      Print out the ref names of any commits that are shown by the log
 +      command. If 'short' is specified, the ref name prefixes 'refs/heads/',
 +      'refs/tags/' and 'refs/remotes/' will not be printed. If 'full' is
 +      specified, the full ref name (including prefix) will be printed.
 +      This is the same as the log commands '--decorate' option.
 +
  log.showroot::
        If true, the initial commit will be shown as a big creation event.
        This is equivalent to a diff against an empty tree.
@@@ -1525,7 -1516,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",
@@@ -1651,7 -1642,6 +1651,7 @@@ sendemail.smtppass:
  sendemail.suppresscc::
  sendemail.suppressfrom::
  sendemail.to::
 +sendemail.smtpdomain::
  sendemail.smtpserver::
  sendemail.smtpserverport::
  sendemail.smtpuser::
diff --combined sha1_file.c
index 28c056e074d1a89e4a3d266eff49c899bfd35e59,1b551e4609dfde6f047de54c4ee7ed4b006c0ce5..b2074e7a8ee6d55fdb1094b93a2954bd164d5445
@@@ -2448,6 -2448,8 +2448,8 @@@ int index_fd(unsigned char *sha1, int f
                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))
                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;
  }
@@@ -2516,13 -2517,3 +2517,13 @@@ int read_pack_header(int fd, struct pac
                return PH_ERROR_PROTOCOL;
        return 0;
  }
 +
 +void assert_sha1_type(const unsigned char *sha1, enum object_type expect)
 +{
 +      enum object_type type = sha1_object_info(sha1, NULL);
 +      if (type < 0)
 +              die("%s is not a valid object", sha1_to_hex(sha1));
 +      if (type != expect)
 +              die("%s is not a valid '%s' object", sha1_to_hex(sha1),
 +                  typename(expect));
 +}