Hello community,
here is the log from the commit of package git for openSUSE:Factory checked in at 2015-06-01 09:29:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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 2015-05-15 09:55:26.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.git.new/git.changes 2015-06-01 09:29:47.000000000 +0200
@@ -1,0 +2,24 @@
+Wed May 27 18:21:16 UTC 2015 - astieger(a)suse.com
+
+- git 2.4.2:
+ * "git rev-list --objects $old --not --all" to see if everything that
+ is reachable from $old is already connected to the existing refs
+ was very inefficient.
+ * "hash-object --literally" introduced in v2.2 was not prepared to
+ take a really long object type name.
+ * "git rebase --quiet" was not quite quiet when there is nothing to
+ do.
+ * The completion for "log --decorate=" parameter value was incorrect.
+ * "filter-branch" corrupted commit log message that ends with an
+ incomplete line on platforms with some "sed" implementations that
+ munge such a line. Work it around by avoiding to use "sed".
+ * "git daemon" fails to build from the source under NO_IPV6
+ configuration (regression in 2.4).
+ * "git stash pop/apply" forgot to make sure that not just the working
+ tree is clean but also the index is clean. The latter is important
+ as a stash application can conflict and the index will be used for
+ conflict resolution.
+ * No longer prepend $GIT_EXEC_PATH and install path to path of
+ executed subprograms and hooks.
+
+-------------------------------------------------------------------
Old:
----
git-2.4.1.tar.sign
git-2.4.1.tar.xz
New:
----
git-2.4.2.tar.sign
git-2.4.2.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ git.spec ++++++
--- /var/tmp/diff_new_pack.Nhs67s/_old 2015-06-01 09:29:48.000000000 +0200
+++ /var/tmp/diff_new_pack.Nhs67s/_new 2015-06-01 09:29:48.000000000 +0200
@@ -26,7 +26,7 @@
%endif
Name: git
-Version: 2.4.1
+Version: 2.4.2
Release: 0
Summary: Fast, scalable, distributed revision control system
License: GPL-2.0
++++++ git-2.4.1.tar.xz -> git-2.4.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.4.1/Documentation/RelNotes/2.4.2.txt new/git-2.4.2/Documentation/RelNotes/2.4.2.txt
--- old/git-2.4.1/Documentation/RelNotes/2.4.2.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/git-2.4.2/Documentation/RelNotes/2.4.2.txt 2015-05-26 22:58:38.000000000 +0200
@@ -0,0 +1,45 @@
+Git v2.4.2 Release Notes
+========================
+
+Fixes since v2.4.1
+------------------
+
+ * "git rev-list --objects $old --not --all" to see if everything that
+ is reachable from $old is already connected to the existing refs
+ was very inefficient.
+
+ * "hash-object --literally" introduced in v2.2 was not prepared to
+ take a really long object type name.
+
+ * "git rebase --quiet" was not quite quiet when there is nothing to
+ do.
+
+ * The completion for "log --decorate=" parameter value was incorrect.
+
+ * "filter-branch" corrupted commit log message that ends with an
+ incomplete line on platforms with some "sed" implementations that
+ munge such a line. Work it around by avoiding to use "sed".
+
+ * "git daemon" fails to build from the source under NO_IPV6
+ configuration (regression in 2.4).
+
+ * "git stash pop/apply" forgot to make sure that not just the working
+ tree is clean but also the index is clean. The latter is important
+ as a stash application can conflict and the index will be used for
+ conflict resolution.
+
+ * We have prepended $GIT_EXEC_PATH and the path "git" is installed in
+ (typically "/usr/bin") to $PATH when invoking subprograms and hooks
+ for almost eternity, but the original use case the latter tried to
+ support was semi-bogus (i.e. install git to /opt/foo/git and run it
+ without having /opt/foo on $PATH), and more importantly it has
+ become less and less relevant as Git grew more mainstream (i.e. the
+ users would _want_ to have it on their $PATH). Stop prepending the
+ path in which "git" is installed to users' $PATH, as that would
+ interfere the command search order people depend on (e.g. they may
+ not like versions of programs that are unrelated to Git in /usr/bin
+ and want to override them by having different ones in /usr/local/bin
+ and have the latter directory earlier in their $PATH).
+
+Also contains typofixes, documentation updates and trivial code
+clean-ups.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.4.1/Documentation/git-hash-object.txt new/git-2.4.2/Documentation/git-hash-object.txt
--- old/git-2.4.1/Documentation/git-hash-object.txt 2015-05-13 23:38:51.000000000 +0200
+++ new/git-2.4.2/Documentation/git-hash-object.txt 2015-05-26 22:58:38.000000000 +0200
@@ -9,7 +9,7 @@
SYNOPSIS
--------
[verse]
-'git hash-object' [-t <type>] [-w] [--path=<file>|--no-filters] [--stdin] [--] <file>...
+'git hash-object' [-t <type>] [-w] [--path=<file>|--no-filters] [--stdin [--literally]] [--] <file>...
'git hash-object' [-t <type>] [-w] --stdin-paths [--no-filters] < <list-of-paths>
DESCRIPTION
@@ -51,7 +51,13 @@
Hash the contents as is, ignoring any input filter that would
have been chosen by the attributes mechanism, including the end-of-line
conversion. If the file is read from standard input then this
- is always implied, unless the --path option is given.
+ is always implied, unless the `--path` option is given.
+
+--literally::
+ Allow `--stdin` to hash any garbage into a loose object which might not
+ otherwise pass standard object parsing or git-fsck checks. Useful for
+ stress-testing Git itself or reproducing characteristics of corrupt or
+ bogus objects encountered in the wild.
GIT
---
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.4.1/Documentation/git.txt new/git-2.4.2/Documentation/git.txt
--- old/git-2.4.1/Documentation/git.txt 2015-05-13 23:38:51.000000000 +0200
+++ new/git-2.4.2/Documentation/git.txt 2015-05-26 22:58:38.000000000 +0200
@@ -43,9 +43,10 @@
branch of the `git.git` repository.
Documentation for older releases are available here:
-* link:v2.4.1/git.html[documentation for release 2.4.1]
+* link:v2.4.2/git.html[documentation for release 2.4.2]
* release notes for
+ link:RelNotes/2.4.2.txt[2.4.2],
link:RelNotes/2.4.1.txt[2.4.1],
link:RelNotes/2.4.0.txt[2.4].
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.4.1/GIT-VERSION-GEN new/git-2.4.2/GIT-VERSION-GEN
--- old/git-2.4.1/GIT-VERSION-GEN 2015-05-13 23:38:51.000000000 +0200
+++ new/git-2.4.2/GIT-VERSION-GEN 2015-05-26 22:58:38.000000000 +0200
@@ -1,7 +1,7 @@
#!/bin/sh
GVF=GIT-VERSION-FILE
-DEF_VER=v2.4.1
+DEF_VER=v2.4.2
LF='
'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.4.1/RelNotes new/git-2.4.2/RelNotes
--- old/git-2.4.1/RelNotes 2015-06-01 09:29:49.000000000 +0200
+++ new/git-2.4.2/RelNotes 2015-06-01 09:29:49.000000000 +0200
@@ -1 +1 @@
-symbolic link to Documentation/RelNotes/2.4.1.txt
+symbolic link to Documentation/RelNotes/2.4.2.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.4.1/builtin/hash-object.c new/git-2.4.2/builtin/hash-object.c
--- old/git-2.4.1/builtin/hash-object.c 2015-05-13 23:38:51.000000000 +0200
+++ new/git-2.4.2/builtin/hash-object.c 2015-05-26 22:58:38.000000000 +0200
@@ -22,10 +22,8 @@
if (strbuf_read(&buf, fd, 4096) < 0)
ret = -1;
- else if (flags & HASH_WRITE_OBJECT)
- ret = write_sha1_file(buf.buf, buf.len, type, sha1);
else
- ret = hash_sha1_file(buf.buf, buf.len, type, sha1);
+ ret = hash_sha1_file_literally(buf.buf, buf.len, type, sha1, flags);
strbuf_release(&buf);
return ret;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.4.1/cache.h new/git-2.4.2/cache.h
--- old/git-2.4.1/cache.h 2015-05-13 23:38:51.000000000 +0200
+++ new/git-2.4.2/cache.h 2015-05-26 22:58:38.000000000 +0200
@@ -874,6 +874,7 @@
extern int sha1_object_info(const unsigned char *, unsigned long *);
extern int hash_sha1_file(const void *buf, unsigned long len, const char *type, unsigned char *sha1);
extern int write_sha1_file(const void *buf, unsigned long len, const char *type, unsigned char *return_sha1);
+extern int hash_sha1_file_literally(const void *buf, unsigned long len, const char *type, unsigned char *sha1, unsigned flags);
extern int pretend_sha1_file(void *, unsigned long, enum object_type, unsigned char *);
extern int force_object_loose(const unsigned char *sha1, time_t mtime);
extern int git_open_noatime(const char *name);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.4.1/configure new/git-2.4.2/configure
--- old/git-2.4.1/configure 2015-05-13 23:38:51.000000000 +0200
+++ new/git-2.4.2/configure 2015-05-26 22:58:38.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for git 2.4.1.
+# Generated by GNU Autoconf 2.69 for git 2.4.2.
#
# Report bugs to <git(a)vger.kernel.org>.
#
@@ -580,8 +580,8 @@
# Identity of this package.
PACKAGE_NAME='git'
PACKAGE_TARNAME='git'
-PACKAGE_VERSION='2.4.1'
-PACKAGE_STRING='git 2.4.1'
+PACKAGE_VERSION='2.4.2'
+PACKAGE_STRING='git 2.4.2'
PACKAGE_BUGREPORT='git(a)vger.kernel.org'
PACKAGE_URL=''
@@ -1251,7 +1251,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.4.1 to adapt to many kinds of systems.
+\`configure' configures git 2.4.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1312,7 +1312,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of git 2.4.1:";;
+ short | recursive ) echo "Configuration of git 2.4.2:";;
esac
cat <<\_ACEOF
@@ -1451,7 +1451,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-git configure 2.4.1
+git configure 2.4.2
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1931,7 +1931,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.4.1, which was
+It was created by git $as_me 2.4.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -8085,7 +8085,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.4.1, which was
+This file was extended by git $as_me 2.4.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -8142,7 +8142,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.4.1
+git config.status 2.4.2
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.4.1/contrib/completion/git-completion.bash new/git-2.4.2/contrib/completion/git-completion.bash
--- old/git-2.4.1/contrib/completion/git-completion.bash 2015-05-13 23:38:51.000000000 +0200
+++ new/git-2.4.2/contrib/completion/git-completion.bash 2015-05-26 22:58:38.000000000 +0200
@@ -1448,7 +1448,7 @@
return
;;
--decorate=*)
- __gitcomp "long short" "" "${cur##--decorate=}"
+ __gitcomp "full short no" "" "${cur##--decorate=}"
return
;;
--*)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.4.1/daemon.c new/git-2.4.2/daemon.c
--- old/git-2.4.1/daemon.c 2015-05-13 23:38:51.000000000 +0200
+++ new/git-2.4.2/daemon.c 2015-05-26 22:58:38.000000000 +0200
@@ -633,7 +633,7 @@
char **ap;
static char addrbuf[HOST_NAME_MAX + 1];
- hent = gethostbyname(hostname.buf);
+ hent = gethostbyname(hi->hostname.buf);
if (hent) {
ap = hent->h_addr_list;
memset(&sa, 0, sizeof sa);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.4.1/exec_cmd.c new/git-2.4.2/exec_cmd.c
--- old/git-2.4.1/exec_cmd.c 2015-05-13 23:38:51.000000000 +0200
+++ new/git-2.4.2/exec_cmd.c 2015-05-26 22:58:38.000000000 +0200
@@ -96,7 +96,6 @@
struct strbuf new_path = STRBUF_INIT;
add_path(&new_path, git_exec_path());
- add_path(&new_path, argv0_path);
if (old_path)
strbuf_addstr(&new_path, old_path);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.4.1/git-filter-branch.sh new/git-2.4.2/git-filter-branch.sh
--- old/git-2.4.1/git-filter-branch.sh 2015-05-13 23:38:51.000000000 +0200
+++ new/git-2.4.2/git-filter-branch.sh 2015-05-26 22:58:38.000000000 +0200
@@ -346,7 +346,15 @@
die "parent filter failed: $filter_parent"
fi
- sed -e '1,/^$/d' <../commit | \
+ {
+ while read -r header_line && test -n "$header_line"
+ do
+ # skip header lines...
+ :;
+ done
+ # and output the actual commit message
+ cat
+ } <../commit |
eval "$filter_msg" > ../message ||
die "msg filter failed: $filter_msg"
workdir=$workdir @SHELL_PATH@ -c "$filter_commit" "git commit-tree" \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.4.1/git-rebase.sh new/git-2.4.2/git-rebase.sh
--- old/git-2.4.1/git-rebase.sh 2015-05-13 23:38:51.000000000 +0200
+++ new/git-2.4.2/git-rebase.sh 2015-05-26 22:58:38.000000000 +0200
@@ -582,7 +582,7 @@
# Lazily switch to the target branch if needed...
test -z "$switch_to" ||
GIT_REFLOG_ACTION="$GIT_REFLOG_ACTION: checkout $switch_to" \
- git checkout "$switch_to" --
+ git checkout -q "$switch_to" --
say "$(eval_gettext "Current branch \$branch_name is up to date.")"
finish_rebase
exit 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.4.1/git-stash.sh new/git-2.4.2/git-stash.sh
--- old/git-2.4.1/git-stash.sh 2015-05-13 23:38:51.000000000 +0200
+++ new/git-2.4.2/git-stash.sh 2015-05-26 22:58:38.000000000 +0200
@@ -442,6 +442,8 @@
assert_stash_like "$@"
git update-index -q --refresh || die "$(gettext "unable to refresh index")"
+ git diff-index --cached --quiet --ignore-submodules HEAD -- ||
+ die "$(gettext "Cannot apply stash: Your index contains uncommitted changes.")"
# current index state
c_tree=$(git write-tree) ||
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.4.1/git.spec new/git-2.4.2/git.spec
--- old/git-2.4.1/git.spec 2015-05-13 23:38:51.000000000 +0200
+++ new/git-2.4.2/git.spec 2015-05-26 22:58:38.000000000 +0200
@@ -1,7 +1,7 @@
# Pass --without docs to rpmbuild if you don't want the documentation
Name: git
-Version: 2.4.1
+Version: 2.4.2
Release: 1%{?dist}
Summary: Core git tools
License: GPL
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.4.1/revision.c new/git-2.4.2/revision.c
--- old/git-2.4.1/revision.c 2015-05-13 23:38:51.000000000 +0200
+++ new/git-2.4.2/revision.c 2015-05-26 22:58:38.000000000 +0200
@@ -345,14 +345,24 @@
die("%s is unknown object", name);
}
-static int everybody_uninteresting(struct commit_list *orig)
+static int everybody_uninteresting(struct commit_list *orig,
+ struct commit **interesting_cache)
{
struct commit_list *list = orig;
+
+ if (*interesting_cache) {
+ struct commit *commit = *interesting_cache;
+ if (!(commit->object.flags & UNINTERESTING))
+ return 0;
+ }
+
while (list) {
struct commit *commit = list->item;
list = list->next;
if (commit->object.flags & UNINTERESTING)
continue;
+ if (interesting_cache)
+ *interesting_cache = commit;
return 0;
}
return 1;
@@ -940,7 +950,8 @@
/* How many extra uninteresting commits we want to see.. */
#define SLOP 5
-static int still_interesting(struct commit_list *src, unsigned long date, int slop)
+static int still_interesting(struct commit_list *src, unsigned long date, int slop,
+ struct commit **interesting_cache)
{
/*
* No source list at all? We're definitely done..
@@ -959,7 +970,7 @@
* Does the source list still have interesting commits in
* it? Definitely not done..
*/
- if (!everybody_uninteresting(src))
+ if (!everybody_uninteresting(src, interesting_cache))
return SLOP;
/* Ok, we're closing in.. */
@@ -1078,6 +1089,7 @@
struct commit_list *newlist = NULL;
struct commit_list **p = &newlist;
struct commit_list *bottom = NULL;
+ struct commit *interesting_cache = NULL;
if (revs->ancestry_path) {
bottom = collect_bottom_commits(list);
@@ -1094,6 +1106,9 @@
list = list->next;
free(entry);
+ if (commit == interesting_cache)
+ interesting_cache = NULL;
+
if (revs->max_age != -1 && (commit->date < revs->max_age))
obj->flags |= UNINTERESTING;
if (add_parents_to_list(revs, commit, &list, NULL) < 0)
@@ -1102,7 +1117,7 @@
mark_parents_uninteresting(commit);
if (revs->show_all)
p = &commit_list_insert(commit, p)->next;
- slop = still_interesting(list, date, slop);
+ slop = still_interesting(list, date, slop, &interesting_cache);
if (slop)
continue;
/* If showing all, add the whole pending list to the end */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.4.1/sha1_file.c new/git-2.4.2/sha1_file.c
--- old/git-2.4.1/sha1_file.c 2015-05-13 23:38:51.000000000 +0200
+++ new/git-2.4.2/sha1_file.c 2015-05-26 22:58:38.000000000 +0200
@@ -3009,9 +3009,8 @@
return 1;
}
-int write_sha1_file(const void *buf, unsigned long len, const char *type, unsigned char *returnsha1)
+int write_sha1_file(const void *buf, unsigned long len, const char *type, unsigned char *sha1)
{
- unsigned char sha1[20];
char hdr[32];
int hdrlen;
@@ -3019,13 +3018,32 @@
* it out into .git/objects/??/?{38} file.
*/
write_sha1_file_prepare(buf, len, type, sha1, hdr, &hdrlen);
- if (returnsha1)
- hashcpy(returnsha1, sha1);
if (freshen_packed_object(sha1) || freshen_loose_object(sha1))
return 0;
return write_loose_object(sha1, hdr, hdrlen, buf, len, 0);
}
+int hash_sha1_file_literally(const void *buf, unsigned long len, const char *type,
+ unsigned char *sha1, unsigned flags)
+{
+ char *header;
+ int hdrlen, status = 0;
+
+ /* type string, SP, %lu of the length plus NUL must fit this */
+ header = xmalloc(strlen(type) + 32);
+ write_sha1_file_prepare(buf, len, type, sha1, header, &hdrlen);
+
+ if (!(flags & HASH_WRITE_OBJECT))
+ goto cleanup;
+ if (freshen_packed_object(sha1) || freshen_loose_object(sha1))
+ goto cleanup;
+ status = write_loose_object(sha1, header, hdrlen, buf, len, 0);
+
+cleanup:
+ free(header);
+ return status;
+}
+
int force_object_loose(const unsigned char *sha1, time_t mtime)
{
void *buf;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.4.1/t/t1007-hash-object.sh new/git-2.4.2/t/t1007-hash-object.sh
--- old/git-2.4.1/t/t1007-hash-object.sh 2015-05-13 23:38:51.000000000 +0200
+++ new/git-2.4.2/t/t1007-hash-object.sh 2015-05-26 22:58:38.000000000 +0200
@@ -209,4 +209,15 @@
test_must_fail git hash-object -t bl --stdin </dev/null
'
+test_expect_success '--literally' '
+ t=1234567890 &&
+ echo example | git hash-object -t $t --literally --stdin
+'
+
+test_expect_success '--literally with extra-long type' '
+ t=12345678901234567890123456789012345678901234567890 &&
+ t="$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t" &&
+ echo example | git hash-object -t $t --literally --stdin
+'
+
test_done
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.4.1/t/t3903-stash.sh new/git-2.4.2/t/t3903-stash.sh
--- old/git-2.4.1/t/t3903-stash.sh 2015-05-13 23:38:51.000000000 +0200
+++ new/git-2.4.2/t/t3903-stash.sh 2015-05-26 22:58:38.000000000 +0200
@@ -10,6 +10,8 @@
test_expect_success 'stash some dirty working directory' '
echo 1 > file &&
git add file &&
+ echo unrelated >other-file &&
+ git add other-file &&
test_tick &&
git commit -m initial &&
echo 2 > file &&
@@ -43,10 +45,15 @@
test_cmp expect file
'
+test_expect_success 'apply requires a clean index' '
+ test_when_finished "git reset --hard" &&
+ echo changed >other-file &&
+ git add other-file &&
+ test_must_fail git stash apply
+'
+
test_expect_success 'apply does not need clean working directory' '
echo 4 >other-file &&
- git add other-file &&
- echo 5 >other-file &&
git stash apply &&
echo 3 >expect &&
test_cmp expect file
@@ -695,8 +702,8 @@
'
test_expect_success 'stash list implies --first-parent -m' '
- cat >expect <<-\EOF &&
- stash@{0}: WIP on master: b27a2bc subdir
+ cat >expect <<-EOF &&
+ stash@{0}
diff --git a/file b/file
index 257cc56..d26b33d 100644
@@ -706,13 +713,13 @@
-foo
+working
EOF
- git stash list -p >actual &&
+ git stash list --format=%gd -p >actual &&
test_cmp expect actual
'
test_expect_success 'stash list --cc shows combined diff' '
cat >expect <<-\EOF &&
- stash@{0}: WIP on master: b27a2bc subdir
+ stash@{0}
diff --cc file
index 257cc56,9015a7a..d26b33d
@@ -723,7 +730,7 @@
-index
++working
EOF
- git stash list -p --cc >actual &&
+ git stash list --format=%gd -p --cc >actual &&
test_cmp expect actual
'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.4.1/t/t7003-filter-branch.sh new/git-2.4.2/t/t7003-filter-branch.sh
--- old/git-2.4.1/t/t7003-filter-branch.sh 2015-05-13 23:38:51.000000000 +0200
+++ new/git-2.4.2/t/t7003-filter-branch.sh 2015-05-26 22:58:38.000000000 +0200
@@ -394,4 +394,14 @@
test $orig_head != `git show-ref --hash --head HEAD`
'
+test_expect_success 'filter commit message without trailing newline' '
+ git reset --hard original &&
+ commit=$(printf "no newline" | git commit-tree HEAD^{tree}) &&
+ git update-ref refs/heads/no-newline $commit &&
+ git filter-branch -f refs/heads/no-newline &&
+ echo $commit >expect &&
+ git rev-parse refs/heads/no-newline >actual &&
+ test_cmp expect actual
+'
+
test_done
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.4.1/version new/git-2.4.2/version
--- old/git-2.4.1/version 2015-05-13 23:38:51.000000000 +0200
+++ new/git-2.4.2/version 2015-05-26 22:58:38.000000000 +0200
@@ -1 +1 @@
-2.4.1
+2.4.2