Hello community, here is the log from the commit of package git for openSUSE:Factory checked in at 2014-08-05 21:10:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/git (Old) and /work/SRC/openSUSE:Factory/.git.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "git" Changes: -------- --- /work/SRC/openSUSE:Factory/git/git.changes 2014-08-01 14:34:30.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.git.new/git.changes 2014-08-05 21:10:55.000000000 +0200 @@ -1,0 +2,6 @@ +Thu Jul 31 16:01:38 UTC 2014 - [email protected] + +- git 2.0.4: + * fix output of "git diff-tree" broken since 2.0.2 + +------------------------------------------------------------------- Old: ---- git-2.0.3.tar.xz New: ---- git-2.0.4.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ git.spec ++++++ --- /var/tmp/diff_new_pack.k7iK8U/_old 2014-08-05 21:10:57.000000000 +0200 +++ /var/tmp/diff_new_pack.k7iK8U/_new 2014-08-05 21:10:57.000000000 +0200 @@ -20,7 +20,7 @@ %define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services Name: git -Version: 2.0.3 +Version: 2.0.4 Release: 0 Summary: Fast, scalable, distributed revision control system License: GPL-2.0 ++++++ git-2.0.3.tar.xz -> git-2.0.4.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.0.3/Documentation/RelNotes/2.0.4.txt new/git-2.0.4/Documentation/RelNotes/2.0.4.txt --- old/git-2.0.3/Documentation/RelNotes/2.0.4.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/git-2.0.4/Documentation/RelNotes/2.0.4.txt 2014-07-31 00:10:29.000000000 +0200 @@ -0,0 +1,5 @@ +Git v2.0.4 Release Notes +======================== + + * An earlier update to v2.0.2 broken output from "git diff-tree", + which is fixed in this release. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.0.3/Documentation/git.txt new/git-2.0.4/Documentation/git.txt --- old/git-2.0.3/Documentation/git.txt 2014-07-24 19:25:27.000000000 +0200 +++ new/git-2.0.4/Documentation/git.txt 2014-07-31 00:10:29.000000000 +0200 @@ -43,9 +43,10 @@ branch of the `git.git` repository. Documentation for older releases are available here: -* link:v2.0.3/git.html[documentation for release 2.0.3] +* link:v2.0.4/git.html[documentation for release 2.0.4] * release notes for + link:RelNotes/2.0.4.txt[2.0.4], link:RelNotes/2.0.3.txt[2.0.3], link:RelNotes/2.0.2.txt[2.0.2], link:RelNotes/2.0.1.txt[2.0.1], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.0.3/GIT-VERSION-GEN new/git-2.0.4/GIT-VERSION-GEN --- old/git-2.0.3/GIT-VERSION-GEN 2014-07-24 19:25:27.000000000 +0200 +++ new/git-2.0.4/GIT-VERSION-GEN 2014-07-31 00:10:29.000000000 +0200 @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v2.0.3 +DEF_VER=v2.0.4 LF=' ' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.0.3/RelNotes new/git-2.0.4/RelNotes --- old/git-2.0.3/RelNotes 2014-08-05 21:10:58.000000000 +0200 +++ new/git-2.0.4/RelNotes 2014-08-05 21:10:58.000000000 +0200 @@ -1 +1 @@ -symbolic link to Documentation/RelNotes/2.0.3.txt +symbolic link to Documentation/RelNotes/2.0.4.txt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.0.3/alloc.c new/git-2.0.4/alloc.c --- old/git-2.0.3/alloc.c 2014-07-24 19:25:27.000000000 +0200 +++ new/git-2.0.4/alloc.c 2014-07-31 00:10:29.000000000 +0200 @@ -18,25 +18,6 @@ #define BLOCKING 1024 -#define DEFINE_ALLOCATOR(name, type) \ -static unsigned int name##_allocs; \ -void *alloc_##name##_node(void) \ -{ \ - static int nr; \ - static type *block; \ - void *ret; \ - \ - if (!nr) { \ - nr = BLOCKING; \ - block = xmalloc(BLOCKING * sizeof(type)); \ - } \ - nr--; \ - name##_allocs++; \ - ret = block++; \ - memset(ret, 0, sizeof(type)); \ - return ret; \ -} - union any_object { struct object object; struct blob blob; @@ -45,17 +26,73 @@ struct tag tag; }; -DEFINE_ALLOCATOR(blob, struct blob) -DEFINE_ALLOCATOR(tree, struct tree) -DEFINE_ALLOCATOR(raw_commit, struct commit) -DEFINE_ALLOCATOR(tag, struct tag) -DEFINE_ALLOCATOR(object, union any_object) +struct alloc_state { + int count; /* total number of nodes allocated */ + int nr; /* number of nodes left in current allocation */ + void *p; /* first free node in current allocation */ +}; + +static inline void *alloc_node(struct alloc_state *s, size_t node_size) +{ + void *ret; + + if (!s->nr) { + s->nr = BLOCKING; + s->p = xmalloc(BLOCKING * node_size); + } + s->nr--; + s->count++; + ret = s->p; + s->p = (char *)s->p + node_size; + memset(ret, 0, node_size); + return ret; +} + +static struct alloc_state blob_state; +void *alloc_blob_node(void) +{ + struct blob *b = alloc_node(&blob_state, sizeof(struct blob)); + b->object.type = OBJ_BLOB; + return b; +} + +static struct alloc_state tree_state; +void *alloc_tree_node(void) +{ + struct tree *t = alloc_node(&tree_state, sizeof(struct tree)); + t->object.type = OBJ_TREE; + return t; +} + +static struct alloc_state tag_state; +void *alloc_tag_node(void) +{ + struct tag *t = alloc_node(&tag_state, sizeof(struct tag)); + t->object.type = OBJ_TAG; + return t; +} + +static struct alloc_state object_state; +void *alloc_object_node(void) +{ + struct object *obj = alloc_node(&object_state, sizeof(union any_object)); + obj->type = OBJ_NONE; + return obj; +} + +static struct alloc_state commit_state; + +unsigned int alloc_commit_index(void) +{ + static unsigned int count; + return count++; +} void *alloc_commit_node(void) { - static int commit_count; - struct commit *c = alloc_raw_commit_node(); - c->index = commit_count++; + struct commit *c = alloc_node(&commit_state, sizeof(struct commit)); + c->object.type = OBJ_COMMIT; + c->index = alloc_commit_index(); return c; } @@ -66,13 +103,13 @@ } #define REPORT(name, type) \ - report(#name, name##_allocs, name##_allocs * sizeof(type) >> 10) + report(#name, name##_state.count, name##_state.count * sizeof(type) >> 10) void alloc_report(void) { REPORT(blob, struct blob); REPORT(tree, struct tree); - REPORT(raw_commit, struct commit); + REPORT(commit, struct commit); REPORT(tag, struct tag); REPORT(object, union any_object); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.0.3/blob.c new/git-2.0.4/blob.c --- old/git-2.0.3/blob.c 2014-07-24 19:25:27.000000000 +0200 +++ new/git-2.0.4/blob.c 2014-07-31 00:10:29.000000000 +0200 @@ -7,15 +7,8 @@ { struct object *obj = lookup_object(sha1); if (!obj) - return create_object(sha1, OBJ_BLOB, alloc_blob_node()); - if (!obj->type) - obj->type = OBJ_BLOB; - if (obj->type != OBJ_BLOB) { - error("Object %s is a %s, not a blob", - sha1_to_hex(sha1), typename(obj->type)); - return NULL; - } - return (struct blob *) obj; + return create_object(sha1, alloc_blob_node()); + return object_as_type(obj, OBJ_BLOB, 0); } int parse_blob_buffer(struct blob *item, void *buffer, unsigned long size) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.0.3/builtin/blame.c new/git-2.0.4/builtin/blame.c --- old/git-2.0.3/builtin/blame.c 2014-07-24 19:25:27.000000000 +0200 +++ new/git-2.0.4/builtin/blame.c 2014-07-31 00:10:29.000000000 +0200 @@ -2041,7 +2041,6 @@ commit = alloc_commit_node(); commit->object.parsed = 1; commit->date = now; - commit->object.type = OBJ_COMMIT; parent_tail = &commit->parents; if (!resolve_ref_unsafe("HEAD", head_sha1, 1, NULL)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.0.3/builtin/diff-tree.c new/git-2.0.4/builtin/diff-tree.c --- old/git-2.0.3/builtin/diff-tree.c 2014-07-24 19:25:27.000000000 +0200 +++ new/git-2.0.4/builtin/diff-tree.c 2014-07-31 00:10:29.000000000 +0200 @@ -72,9 +72,7 @@ line[len-1] = 0; if (get_sha1_hex(line, sha1)) return -1; - obj = lookup_unknown_object(sha1); - if (!obj || !obj->parsed) - obj = parse_object(sha1); + obj = parse_object(sha1); if (!obj) return -1; if (obj->type == OBJ_COMMIT) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.0.3/cache.h new/git-2.0.4/cache.h --- old/git-2.0.3/cache.h 2014-07-24 19:25:27.000000000 +0200 +++ new/git-2.0.4/cache.h 2014-07-31 00:10:29.000000000 +0200 @@ -1354,6 +1354,7 @@ extern void *alloc_tag_node(void); extern void *alloc_object_node(void); extern void alloc_report(void); +extern unsigned int alloc_commit_index(void); /* trace.c */ __attribute__((format (printf, 1, 2))) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.0.3/commit.c new/git-2.0.4/commit.c --- old/git-2.0.3/commit.c 2014-07-24 19:25:27.000000000 +0200 +++ new/git-2.0.4/commit.c 2014-07-31 00:10:29.000000000 +0200 @@ -18,19 +18,6 @@ const char *commit_type = "commit"; -static struct commit *check_commit(struct object *obj, - const unsigned char *sha1, - int quiet) -{ - if (obj->type != OBJ_COMMIT) { - if (!quiet) - error("Object %s is a %s, not a commit", - sha1_to_hex(sha1), typename(obj->type)); - return NULL; - } - return (struct commit *) obj; -} - struct commit *lookup_commit_reference_gently(const unsigned char *sha1, int quiet) { @@ -38,7 +25,7 @@ if (!obj) return NULL; - return check_commit(obj, sha1, quiet); + return object_as_type(obj, OBJ_COMMIT, quiet); } struct commit *lookup_commit_reference(const unsigned char *sha1) @@ -61,13 +48,9 @@ struct commit *lookup_commit(const unsigned char *sha1) { struct object *obj = lookup_object(sha1); - if (!obj) { - struct commit *c = alloc_commit_node(); - return create_object(sha1, OBJ_COMMIT, c); - } - if (!obj->type) - obj->type = OBJ_COMMIT; - return check_commit(obj, sha1, 0); + if (!obj) + return create_object(sha1, alloc_commit_node()); + return object_as_type(obj, OBJ_COMMIT, 0); } struct commit *lookup_commit_reference_by_name(const char *name) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.0.3/configure new/git-2.0.4/configure --- old/git-2.0.3/configure 2014-07-24 19:25:27.000000000 +0200 +++ new/git-2.0.4/configure 2014-07-31 00:10:29.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for git 2.0.3. +# Generated by GNU Autoconf 2.68 for git 2.0.4. # # Report bugs to <[email protected]>. # @@ -560,8 +560,8 @@ # Identity of this package. PACKAGE_NAME='git' PACKAGE_TARNAME='git' -PACKAGE_VERSION='2.0.3' -PACKAGE_STRING='git 2.0.3' +PACKAGE_VERSION='2.0.4' +PACKAGE_STRING='git 2.0.4' PACKAGE_BUGREPORT='[email protected]' PACKAGE_URL='' @@ -1232,7 +1232,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures git 2.0.3 to adapt to many kinds of systems. +\`configure' configures git 2.0.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1293,7 +1293,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of git 2.0.3:";; + short | recursive ) echo "Configuration of git 2.0.4:";; esac cat <<\_ACEOF @@ -1432,7 +1432,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -git configure 2.0.3 +git configure 2.0.4 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1912,7 +1912,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by git $as_me 2.0.3, which was +It was created by git $as_me 2.0.4, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -6984,7 +6984,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by git $as_me 2.0.3, which was +This file was extended by git $as_me 2.0.4, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7041,7 +7041,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -git config.status 2.0.3 +git config.status 2.0.4 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.0.3/git.spec new/git-2.0.4/git.spec --- old/git-2.0.3/git.spec 2014-07-24 19:25:27.000000000 +0200 +++ new/git-2.0.4/git.spec 2014-07-31 00:10:29.000000000 +0200 @@ -1,7 +1,7 @@ # Pass --without docs to rpmbuild if you don't want the documentation Name: git -Version: 2.0.3 +Version: 2.0.4 Release: 1%{?dist} Summary: Core git tools License: GPL diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.0.3/object.c new/git-2.0.4/object.c --- old/git-2.0.3/object.c 2014-07-24 19:25:27.000000000 +0200 +++ new/git-2.0.4/object.c 2014-07-31 00:10:29.000000000 +0200 @@ -141,13 +141,12 @@ obj_hash_size = new_hash_size; } -void *create_object(const unsigned char *sha1, int type, void *o) +void *create_object(const unsigned char *sha1, void *o) { struct object *obj = o; obj->parsed = 0; obj->used = 0; - obj->type = type; obj->flags = 0; hashcpy(obj->sha1, sha1); @@ -159,11 +158,30 @@ return obj; } +void *object_as_type(struct object *obj, enum object_type type, int quiet) +{ + if (obj->type == type) + return obj; + else if (obj->type == OBJ_NONE) { + if (type == OBJ_COMMIT) + ((struct commit *)obj)->index = alloc_commit_index(); + obj->type = type; + return obj; + } + else { + if (!quiet) + error("object %s is a %s, not a %s", + sha1_to_hex(obj->sha1), + typename(obj->type), typename(type)); + return NULL; + } +} + struct object *lookup_unknown_object(const unsigned char *sha1) { struct object *obj = lookup_object(sha1); if (!obj) - obj = create_object(sha1, OBJ_NONE, alloc_object_node()); + obj = create_object(sha1, alloc_object_node()); return obj; } @@ -214,8 +232,6 @@ warning("object %s has unknown type id %d", sha1_to_hex(sha1), type); obj = NULL; } - if (obj && obj->type == OBJ_NONE) - obj->type = type; return obj; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.0.3/object.h new/git-2.0.4/object.h --- old/git-2.0.3/object.h 2014-07-24 19:25:27.000000000 +0200 +++ new/git-2.0.4/object.h 2014-07-31 00:10:29.000000000 +0200 @@ -79,7 +79,9 @@ */ struct object *lookup_object(const unsigned char *sha1); -extern void *create_object(const unsigned char *sha1, int type, void *obj); +extern void *create_object(const unsigned char *sha1, void *obj); + +void *object_as_type(struct object *obj, enum object_type type, int quiet); /* * Returns the object, having parsed it to find out what it is. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.0.3/refs.c new/git-2.0.4/refs.c --- old/git-2.0.3/refs.c 2014-07-24 19:25:27.000000000 +0200 +++ new/git-2.0.4/refs.c 2014-07-31 00:10:29.000000000 +0200 @@ -1520,9 +1520,8 @@ if (o->type == OBJ_NONE) { int type = sha1_object_info(name, NULL); - if (type < 0) + if (type < 0 || !object_as_type(o, type, 0)) return PEEL_INVALID; - o->type = type; } if (o->type != OBJ_TAG) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.0.3/t/t4013-diff-various.sh new/git-2.0.4/t/t4013-diff-various.sh --- old/git-2.0.3/t/t4013-diff-various.sh 2014-07-24 19:25:27.000000000 +0200 +++ new/git-2.0.4/t/t4013-diff-various.sh 2014-07-31 00:10:29.000000000 +0200 @@ -324,4 +324,14 @@ test_cmp "$TEST_DIRECTORY/t4013/diff.diff_--cached_--_file0" result ' +test_expect_success 'diff-tree --stdin with log formatting' ' + cat >expect <<-\EOF && + Side + Third + Second + EOF + git rev-list master | git diff-tree --stdin --format=%s -s >actual && + test_cmp expect actual +' + test_done diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.0.3/t/t7509-commit.sh new/git-2.0.4/t/t7509-commit.sh --- old/git-2.0.3/t/t7509-commit.sh 2014-07-24 19:25:27.000000000 +0200 +++ new/git-2.0.4/t/t7509-commit.sh 2014-07-31 00:10:29.000000000 +0200 @@ -77,6 +77,7 @@ git commit -a --amend -m "amend test" && author_header Initial >expect && author_header HEAD >actual && + test_cmp expect actual && echo "amend test" >expect && message_body HEAD >actual && diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.0.3/tag.c new/git-2.0.4/tag.c --- old/git-2.0.3/tag.c 2014-07-24 19:25:27.000000000 +0200 +++ new/git-2.0.4/tag.c 2014-07-31 00:10:29.000000000 +0200 @@ -40,15 +40,8 @@ { struct object *obj = lookup_object(sha1); if (!obj) - return create_object(sha1, OBJ_TAG, alloc_tag_node()); - if (!obj->type) - obj->type = OBJ_TAG; - if (obj->type != OBJ_TAG) { - error("Object %s is a %s, not a tag", - sha1_to_hex(sha1), typename(obj->type)); - return NULL; - } - return (struct tag *) obj; + return create_object(sha1, alloc_tag_node()); + return object_as_type(obj, OBJ_TAG, 0); } static unsigned long parse_tag_date(const char *buf, const char *tail) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.0.3/tree.c new/git-2.0.4/tree.c --- old/git-2.0.3/tree.c 2014-07-24 19:25:27.000000000 +0200 +++ new/git-2.0.4/tree.c 2014-07-31 00:10:29.000000000 +0200 @@ -183,15 +183,8 @@ { struct object *obj = lookup_object(sha1); if (!obj) - return create_object(sha1, OBJ_TREE, alloc_tree_node()); - if (!obj->type) - obj->type = OBJ_TREE; - if (obj->type != OBJ_TREE) { - error("Object %s is a %s, not a tree", - sha1_to_hex(sha1), typename(obj->type)); - return NULL; - } - return (struct tree *) obj; + return create_object(sha1, alloc_tree_node()); + return object_as_type(obj, OBJ_TREE, 0); } int parse_tree_buffer(struct tree *item, void *buffer, unsigned long size) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.0.3/version new/git-2.0.4/version --- old/git-2.0.3/version 2014-07-24 19:25:27.000000000 +0200 +++ new/git-2.0.4/version 2014-07-31 00:10:29.000000000 +0200 @@ -1 +1 @@ -2.0.3 +2.0.4 -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
