Hello community,
here is the log from the commit of package git for openSUSE:Factory checked in at 2016-03-29 09:54:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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 2016-03-16 10:26:42.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.git.new/git.changes 2016-03-29 09:54:42.000000000 +0200
@@ -1,0 +2,12 @@
+Thu Mar 17 21:22:02 UTC 2016 - astieger@suse.com
+
+- git 2.7.4:
+ Fix remote code execution via buffer overflow (CVE-2016-2315,
+ CVE-2016-2324, bsc#971328)
+ * plug heap corruption holes
+ * catch integer overflow in the computation of pathname lengths
+ * get rid of the name_path API. Both of
+ These would have resulted in writing over an under-allocated
+ buffer when formulating pathnames while tree traversal.
+
+-------------------------------------------------------------------
Old:
----
git-2.7.3.tar.sign
git-2.7.3.tar.xz
New:
----
git-2.7.4.tar.sign
git-2.7.4.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ git.spec ++++++
--- /var/tmp/diff_new_pack.oQxcFr/_old 2016-03-29 09:54:43.000000000 +0200
+++ /var/tmp/diff_new_pack.oQxcFr/_new 2016-03-29 09:54:43.000000000 +0200
@@ -26,7 +26,7 @@
%endif
Name: git
-Version: 2.7.3
+Version: 2.7.4
Release: 0
Summary: Fast, scalable, distributed revision control system
License: GPL-2.0
++++++ git-2.7.3.tar.xz -> git-2.7.4.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.7.3/Documentation/RelNotes/2.4.11.txt new/git-2.7.4/Documentation/RelNotes/2.4.11.txt
--- old/git-2.7.3/Documentation/RelNotes/2.4.11.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/git-2.7.4/Documentation/RelNotes/2.4.11.txt 2016-03-17 21:47:59.000000000 +0100
@@ -0,0 +1,11 @@
+Git v2.4.11 Release Notes
+=========================
+
+Fixes since v2.4.10
+-------------------
+
+ * Bugfix patches were backported from the 'master' front to plug heap
+ corruption holes, to catch integer overflow in the computation of
+ pathname lengths, and to get rid of the name_path API. Both of
+ these would have resulted in writing over an under-allocated buffer
+ when formulating pathnames while tree traversal.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.7.3/Documentation/RelNotes/2.5.5.txt new/git-2.7.4/Documentation/RelNotes/2.5.5.txt
--- old/git-2.7.3/Documentation/RelNotes/2.5.5.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/git-2.7.4/Documentation/RelNotes/2.5.5.txt 2016-03-17 21:47:59.000000000 +0100
@@ -0,0 +1,11 @@
+Git v2.5.5 Release Notes
+========================
+
+Fixes since v2.5.4
+------------------
+
+ * Bugfix patches were backported from the 'master' front to plug heap
+ corruption holes, to catch integer overflow in the computation of
+ pathname lengths, and to get rid of the name_path API. Both of
+ these would have resulted in writing over an under-allocated buffer
+ when formulating pathnames while tree traversal.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.7.3/Documentation/RelNotes/2.6.6.txt new/git-2.7.4/Documentation/RelNotes/2.6.6.txt
--- old/git-2.7.3/Documentation/RelNotes/2.6.6.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/git-2.7.4/Documentation/RelNotes/2.6.6.txt 2016-03-17 21:47:59.000000000 +0100
@@ -0,0 +1,11 @@
+Git v2.6.6 Release Notes
+========================
+
+Fixes since v2.6.5
+------------------
+
+ * Bugfix patches were backported from the 'master' front to plug heap
+ corruption holes, to catch integer overflow in the computation of
+ pathname lengths, and to get rid of the name_path API. Both of
+ these would have resulted in writing over an under-allocated buffer
+ when formulating pathnames while tree traversal.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.7.3/Documentation/RelNotes/2.7.4.txt new/git-2.7.4/Documentation/RelNotes/2.7.4.txt
--- old/git-2.7.3/Documentation/RelNotes/2.7.4.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/git-2.7.4/Documentation/RelNotes/2.7.4.txt 2016-03-17 21:47:59.000000000 +0100
@@ -0,0 +1,11 @@
+Git v2.7.4 Release Notes
+========================
+
+Fixes since v2.7.3
+------------------
+
+ * Bugfix patches were backported from the 'master' front to plug heap
+ corruption holes, to catch integer overflow in the computation of
+ pathname lengths, and to get rid of the name_path API. Both of
+ these would have resulted in writing over an under-allocated buffer
+ when formulating pathnames while tree traversal.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.7.3/Documentation/git.txt new/git-2.7.4/Documentation/git.txt
--- old/git-2.7.3/Documentation/git.txt 2016-03-10 23:11:15.000000000 +0100
+++ new/git-2.7.4/Documentation/git.txt 2016-03-17 21:47:59.000000000 +0100
@@ -51,9 +51,10 @@
link:RelNotes/2.7.1.txt[2.7.1],
link:RelNotes/2.7.0.txt[2.7].
-* link:v2.6.5/git.html[documentation for release 2.6.5]
+* link:v2.6.6/git.html[documentation for release 2.6.6]
* release notes for
+ link:RelNotes/2.6.6.txt[2.6.6],
link:RelNotes/2.6.5.txt[2.6.5],
link:RelNotes/2.6.4.txt[2.6.4],
link:RelNotes/2.6.3.txt[2.6.3],
@@ -61,18 +62,20 @@
link:RelNotes/2.6.1.txt[2.6.1],
link:RelNotes/2.6.0.txt[2.6].
-* link:v2.5.4/git.html[documentation for release 2.5.4]
+* link:v2.5.5/git.html[documentation for release 2.5.5]
* release notes for
+ link:RelNotes/2.5.5.txt[2.5.5],
link:RelNotes/2.5.4.txt[2.5.4],
link:RelNotes/2.5.3.txt[2.5.3],
link:RelNotes/2.5.2.txt[2.5.2],
link:RelNotes/2.5.1.txt[2.5.1],
link:RelNotes/2.5.0.txt[2.5].
-* link:v2.4.10/git.html[documentation for release 2.4.10]
+* link:v2.4.11/git.html[documentation for release 2.4.11]
* release notes for
+ link:RelNotes/2.4.11.txt[2.4.11],
link:RelNotes/2.4.10.txt[2.4.10],
link:RelNotes/2.4.9.txt[2.4.9],
link:RelNotes/2.4.8.txt[2.4.8],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.7.3/GIT-VERSION-GEN new/git-2.7.4/GIT-VERSION-GEN
--- old/git-2.7.3/GIT-VERSION-GEN 2016-03-10 23:11:15.000000000 +0100
+++ new/git-2.7.4/GIT-VERSION-GEN 2016-03-17 21:47:59.000000000 +0100
@@ -1,7 +1,7 @@
#!/bin/sh
GVF=GIT-VERSION-FILE
-DEF_VER=v2.7.3
+DEF_VER=v2.7.4
LF='
'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.7.3/RelNotes new/git-2.7.4/RelNotes
--- old/git-2.7.3/RelNotes 2016-03-29 09:54:45.000000000 +0200
+++ new/git-2.7.4/RelNotes 2016-03-29 09:54:45.000000000 +0200
@@ -1 +1 @@
-symbolic link to Documentation/RelNotes/2.7.3.txt
+symbolic link to Documentation/RelNotes/2.7.4.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.7.3/builtin/pack-objects.c new/git-2.7.4/builtin/pack-objects.c
--- old/git-2.7.3/builtin/pack-objects.c 2016-03-10 23:11:15.000000000 +0100
+++ new/git-2.7.4/builtin/pack-objects.c 2016-03-17 21:47:59.000000000 +0100
@@ -2285,21 +2285,11 @@
index_commit_for_bitmap(commit);
}
-static void show_object(struct object *obj,
- const struct name_path *path, const char *last,
- void *data)
+static void show_object(struct object *obj, const char *name, void *data)
{
- char *name = path_name(path, last);
-
add_preferred_base_object(name);
add_object_entry(obj->oid.hash, obj->type, name, 0);
obj->flags |= OBJECT_ADDED;
-
- /*
- * We will have generated the hash from the name,
- * but not saved a pointer to it - we can free it
- */
- free((char *)name);
}
static void show_edge(struct commit *commit)
@@ -2481,8 +2471,7 @@
}
static void record_recent_object(struct object *obj,
- const struct name_path *path,
- const char *last,
+ const char *name,
void *data)
{
sha1_array_append(&recent_objects, obj->oid.hash);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.7.3/builtin/rev-list.c new/git-2.7.4/builtin/rev-list.c
--- old/git-2.7.3/builtin/rev-list.c 2016-03-10 23:11:15.000000000 +0100
+++ new/git-2.7.4/builtin/rev-list.c 2016-03-17 21:47:59.000000000 +0100
@@ -177,9 +177,7 @@
free_commit_buffer(commit);
}
-static void finish_object(struct object *obj,
- const struct name_path *path, const char *name,
- void *cb_data)
+static void finish_object(struct object *obj, const char *name, void *cb_data)
{
struct rev_list_info *info = cb_data;
if (obj->type == OBJ_BLOB && !has_object_file(&obj->oid))
@@ -188,15 +186,13 @@
parse_object(obj->oid.hash);
}
-static void show_object(struct object *obj,
- const struct name_path *path, const char *component,
- void *cb_data)
+static void show_object(struct object *obj, const char *name, void *cb_data)
{
struct rev_list_info *info = cb_data;
- finish_object(obj, path, component, cb_data);
+ finish_object(obj, name, cb_data);
if (info->flags & REV_LIST_QUIET)
return;
- show_object_with_name(stdout, obj, path, component);
+ show_object_with_name(stdout, obj, name);
}
static void show_edge(struct commit *commit)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.7.3/configure new/git-2.7.4/configure
--- old/git-2.7.3/configure 2016-03-10 23:11:15.000000000 +0100
+++ new/git-2.7.4/configure 2016-03-17 21:47:59.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for git 2.7.3.
+# Generated by GNU Autoconf 2.69 for git 2.7.4.
#
# Report bugs to .
#
@@ -580,8 +580,8 @@
# Identity of this package.
PACKAGE_NAME='git'
PACKAGE_TARNAME='git'
-PACKAGE_VERSION='2.7.3'
-PACKAGE_STRING='git 2.7.3'
+PACKAGE_VERSION='2.7.4'
+PACKAGE_STRING='git 2.7.4'
PACKAGE_BUGREPORT='git@vger.kernel.org'
PACKAGE_URL=''
@@ -1252,7 +1252,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.7.3 to adapt to many kinds of systems.
+\`configure' configures git 2.7.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1313,7 +1313,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of git 2.7.3:";;
+ short | recursive ) echo "Configuration of git 2.7.4:";;
esac
cat <<\_ACEOF
@@ -1452,7 +1452,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-git configure 2.7.3
+git configure 2.7.4
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1932,7 +1932,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.7.3, which was
+It was created by git $as_me 2.7.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -8249,7 +8249,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.7.3, which was
+This file was extended by git $as_me 2.7.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -8306,7 +8306,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.7.3
+git config.status 2.7.4
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.7.3/git.spec new/git-2.7.4/git.spec
--- old/git-2.7.3/git.spec 2016-03-10 23:11:15.000000000 +0100
+++ new/git-2.7.4/git.spec 2016-03-17 21:47:59.000000000 +0100
@@ -1,7 +1,7 @@
# Pass --without docs to rpmbuild if you don't want the documentation
Name: git
-Version: 2.7.3
+Version: 2.7.4
Release: 1%{?dist}
Summary: Core git tools
License: GPL
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.7.3/http-push.c new/git-2.7.4/http-push.c
--- old/git-2.7.3/http-push.c 2016-03-10 23:11:15.000000000 +0100
+++ new/git-2.7.4/http-push.c 2016-03-17 21:47:59.000000000 +0100
@@ -1277,9 +1277,7 @@
}
static struct object_list **process_blob(struct blob *blob,
- struct object_list **p,
- struct name_path *path,
- const char *name)
+ struct object_list **p)
{
struct object *obj = &blob->object;
@@ -1293,14 +1291,11 @@
}
static struct object_list **process_tree(struct tree *tree,
- struct object_list **p,
- struct name_path *path,
- const char *name)
+ struct object_list **p)
{
struct object *obj = &tree->object;
struct tree_desc desc;
struct name_entry entry;
- struct name_path me;
obj->flags |= LOCAL;
@@ -1310,21 +1305,17 @@
die("bad tree object %s", oid_to_hex(&obj->oid));
obj->flags |= SEEN;
- name = xstrdup(name);
p = add_one_object(obj, p);
- me.up = path;
- me.elem = name;
- me.elem_len = strlen(name);
init_tree_desc(&desc, tree->buffer, tree->size);
while (tree_entry(&desc, &entry))
switch (object_type(entry.mode)) {
case OBJ_TREE:
- p = process_tree(lookup_tree(entry.sha1), p, &me, name);
+ p = process_tree(lookup_tree(entry.sha1), p);
break;
case OBJ_BLOB:
- p = process_blob(lookup_blob(entry.sha1), p, &me, name);
+ p = process_blob(lookup_blob(entry.sha1), p);
break;
default:
/* Subproject commit - not in this repository */
@@ -1343,7 +1334,7 @@
int count = 0;
while ((commit = get_revision(revs)) != NULL) {
- p = process_tree(commit->tree, p, NULL, "");
+ p = process_tree(commit->tree, p);
commit->object.flags |= LOCAL;
if (!(commit->object.flags & UNINTERESTING))
count += add_send_request(&commit->object, lock);
@@ -1362,11 +1353,11 @@
continue;
}
if (obj->type == OBJ_TREE) {
- p = process_tree((struct tree *)obj, p, NULL, name);
+ p = process_tree((struct tree *)obj, p);
continue;
}
if (obj->type == OBJ_BLOB) {
- p = process_blob((struct blob *)obj, p, NULL, name);
+ p = process_blob((struct blob *)obj, p);
continue;
}
die("unknown pending object %s (%s)", oid_to_hex(&obj->oid), name);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.7.3/list-objects.c new/git-2.7.4/list-objects.c
--- old/git-2.7.3/list-objects.c 2016-03-10 23:11:15.000000000 +0100
+++ new/git-2.7.4/list-objects.c 2016-03-17 21:47:59.000000000 +0100
@@ -11,11 +11,12 @@
static void process_blob(struct rev_info *revs,
struct blob *blob,
show_object_fn show,
- struct name_path *path,
+ struct strbuf *path,
const char *name,
void *cb_data)
{
struct object *obj = &blob->object;
+ size_t pathlen;
if (!revs->blob_objects)
return;
@@ -24,7 +25,11 @@
if (obj->flags & (UNINTERESTING | SEEN))
return;
obj->flags |= SEEN;
- show(obj, path, name, cb_data);
+
+ pathlen = path->len;
+ strbuf_addstr(path, name);
+ show(obj, path->buf, cb_data);
+ strbuf_setlen(path, pathlen);
}
/*
@@ -52,7 +57,7 @@
static void process_gitlink(struct rev_info *revs,
const unsigned char *sha1,
show_object_fn show,
- struct name_path *path,
+ struct strbuf *path,
const char *name,
void *cb_data)
{
@@ -62,7 +67,6 @@
static void process_tree(struct rev_info *revs,
struct tree *tree,
show_object_fn show,
- struct name_path *path,
struct strbuf *base,
const char *name,
void *cb_data)
@@ -70,7 +74,6 @@
struct object *obj = &tree->object;
struct tree_desc desc;
struct name_entry entry;
- struct name_path me;
enum interesting match = revs->diffopt.pathspec.nr == 0 ?
all_entries_interesting: entry_not_interesting;
int baselen = base->len;
@@ -86,17 +89,12 @@
return;
die("bad tree object %s", oid_to_hex(&obj->oid));
}
+
obj->flags |= SEEN;
- show(obj, path, name, cb_data);
- me.up = path;
- me.elem = name;
- me.elem_len = strlen(name);
-
- if (!match) {
- strbuf_addstr(base, name);
- if (base->len)
- strbuf_addch(base, '/');
- }
+ strbuf_addstr(base, name);
+ show(obj, base->buf, cb_data);
+ if (base->len)
+ strbuf_addch(base, '/');
init_tree_desc(&desc, tree->buffer, tree->size);
@@ -113,16 +111,16 @@
if (S_ISDIR(entry.mode))
process_tree(revs,
lookup_tree(entry.sha1),
- show, &me, base, entry.path,
+ show, base, entry.path,
cb_data);
else if (S_ISGITLINK(entry.mode))
process_gitlink(revs, entry.sha1,
- show, &me, entry.path,
+ show, base, entry.path,
cb_data);
else
process_blob(revs,
lookup_blob(entry.sha1),
- show, &me, entry.path,
+ show, base, entry.path,
cb_data);
}
strbuf_setlen(base, baselen);
@@ -213,19 +211,19 @@
continue;
if (obj->type == OBJ_TAG) {
obj->flags |= SEEN;
- show_object(obj, NULL, name, data);
+ show_object(obj, name, data);
continue;
}
if (!path)
path = "";
if (obj->type == OBJ_TREE) {
process_tree(revs, (struct tree *)obj, show_object,
- NULL, &base, path, data);
+ &base, path, data);
continue;
}
if (obj->type == OBJ_BLOB) {
process_blob(revs, (struct blob *)obj, show_object,
- NULL, path, data);
+ &base, path, data);
continue;
}
die("unknown pending object %s (%s)",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.7.3/list-objects.h new/git-2.7.4/list-objects.h
--- old/git-2.7.3/list-objects.h 2016-03-10 23:11:15.000000000 +0100
+++ new/git-2.7.4/list-objects.h 2016-03-17 21:47:59.000000000 +0100
@@ -2,7 +2,7 @@
#define LIST_OBJECTS_H
typedef void (*show_commit_fn)(struct commit *, void *);
-typedef void (*show_object_fn)(struct object *, const struct name_path *, const char *, void *);
+typedef void (*show_object_fn)(struct object *, const char *, void *);
void traverse_commit_list(struct rev_info *, show_commit_fn, show_object_fn, void *);
typedef void (*show_edge_fn)(struct commit *);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.7.3/pack-bitmap-write.c new/git-2.7.4/pack-bitmap-write.c
--- old/git-2.7.3/pack-bitmap-write.c 2016-03-10 23:11:15.000000000 +0100
+++ new/git-2.7.4/pack-bitmap-write.c 2016-03-17 21:47:59.000000000 +0100
@@ -148,8 +148,7 @@
return entry->in_pack_pos;
}
-static void show_object(struct object *object, const struct name_path *path,
- const char *last, void *data)
+static void show_object(struct object *object, const char *name, void *data)
{
struct bitmap *base = data;
bitmap_set(base, find_object_pos(object->oid.hash));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.7.3/pack-bitmap.c new/git-2.7.4/pack-bitmap.c
--- old/git-2.7.3/pack-bitmap.c 2016-03-10 23:11:15.000000000 +0100
+++ new/git-2.7.4/pack-bitmap.c 2016-03-17 21:47:59.000000000 +0100
@@ -417,19 +417,15 @@
return bitmap_pos + bitmap_git.pack->num_objects;
}
-static void show_object(struct object *object, const struct name_path *path,
- const char *last, void *data)
+static void show_object(struct object *object, const char *name, void *data)
{
struct bitmap *base = data;
int bitmap_pos;
bitmap_pos = bitmap_position(object->oid.hash);
- if (bitmap_pos < 0) {
- char *name = path_name(path, last);
+ if (bitmap_pos < 0)
bitmap_pos = ext_index_add_object(object, name);
- free(name);
- }
bitmap_set(base, bitmap_pos);
}
@@ -897,9 +893,8 @@
size_t seen;
};
-static void test_show_object(struct object *object,
- const struct name_path *path,
- const char *last, void *data)
+static void test_show_object(struct object *object, const char *name,
+ void *data)
{
struct bitmap_test_data *tdata = data;
int bitmap_pos;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.7.3/reachable.c new/git-2.7.4/reachable.c
--- old/git-2.7.3/reachable.c 2016-03-10 23:11:15.000000000 +0100
+++ new/git-2.7.4/reachable.c 2016-03-17 21:47:59.000000000 +0100
@@ -43,15 +43,14 @@
* The traversal will have already marked us as SEEN, so we
* only need to handle any progress reporting here.
*/
-static void mark_object(struct object *obj, const struct name_path *path,
- const char *name, void *data)
+static void mark_object(struct object *obj, const char *name, void *data)
{
update_progress(data);
}
static void mark_commit(struct commit *c, void *data)
{
- mark_object(&c->object, NULL, NULL, data);
+ mark_object(&c->object, NULL, data);
}
struct recent_data {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.7.3/revision.c new/git-2.7.4/revision.c
--- old/git-2.7.3/revision.c 2016-03-10 23:11:15.000000000 +0100
+++ new/git-2.7.4/revision.c 2016-03-17 21:47:59.000000000 +0100
@@ -25,69 +25,13 @@
static const char *term_bad;
static const char *term_good;
-char *path_name(const struct name_path *path, const char *name)
+void show_object_with_name(FILE *out, struct object *obj, const char *name)
{
- const struct name_path *p;
- char *n, *m;
- int nlen = strlen(name);
- int len = nlen + 1;
-
- for (p = path; p; p = p->up) {
- if (p->elem_len)
- len += p->elem_len + 1;
- }
- n = xmalloc(len);
- m = n + len - (nlen + 1);
- memcpy(m, name, nlen + 1);
- for (p = path; p; p = p->up) {
- if (p->elem_len) {
- m -= p->elem_len + 1;
- memcpy(m, p->elem, p->elem_len);
- m[p->elem_len] = '/';
- }
- }
- return n;
-}
-
-static int show_path_component_truncated(FILE *out, const char *name, int len)
-{
- int cnt;
- for (cnt = 0; cnt < len; cnt++) {
- int ch = name[cnt];
- if (!ch || ch == '\n')
- return -1;
- fputc(ch, out);
- }
- return len;
-}
-
-static int show_path_truncated(FILE *out, const struct name_path *path)
-{
- int emitted, ours;
-
- if (!path)
- return 0;
- emitted = show_path_truncated(out, path->up);
- if (emitted < 0)
- return emitted;
- if (emitted)
- fputc('/', out);
- ours = show_path_component_truncated(out, path->elem, path->elem_len);
- if (ours < 0)
- return ours;
- return ours || emitted;
-}
-
-void show_object_with_name(FILE *out, struct object *obj,
- const struct name_path *path, const char *component)
-{
- struct name_path leaf;
- leaf.up = (struct name_path *)path;
- leaf.elem = component;
- leaf.elem_len = strlen(component);
+ const char *p;
fprintf(out, "%s ", oid_to_hex(&obj->oid));
- show_path_truncated(out, &leaf);
+ for (p = name; *p && *p != '\n'; p++)
+ fputc(*p, out);
fputc('\n', out);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.7.3/revision.h new/git-2.7.4/revision.h
--- old/git-2.7.3/revision.h 2016-03-10 23:11:15.000000000 +0100
+++ new/git-2.7.4/revision.h 2016-03-17 21:47:59.000000000 +0100
@@ -257,16 +257,9 @@
extern void mark_parents_uninteresting(struct commit *commit);
extern void mark_tree_uninteresting(struct tree *tree);
-struct name_path {
- struct name_path *up;
- int elem_len;
- const char *elem;
-};
+char *path_name(struct strbuf *path, const char *name);
-char *path_name(const struct name_path *path, const char *name);
-
-extern void show_object_with_name(FILE *, struct object *,
- const struct name_path *, const char *);
+extern void show_object_with_name(FILE *, struct object *, const char *);
extern void add_pending_object(struct rev_info *revs,
struct object *obj, const char *name);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.7.3/version new/git-2.7.4/version
--- old/git-2.7.3/version 2016-03-10 23:11:15.000000000 +0100
+++ new/git-2.7.4/version 2016-03-17 21:47:59.000000000 +0100
@@ -1 +1 @@
-2.7.3
+2.7.4