Hello community,

here is the log from the commit of package git for openSUSE:Factory checked in 
at 2016-02-25 22:00:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-02-09 16:49:11.000000000 
+0100
+++ /work/SRC/openSUSE:Factory/.git.new/git.changes     2016-02-25 
22:43:29.000000000 +0100
@@ -1,0 +2,19 @@
+Tue Feb 23 10:14:22 UTC 2016 - astie...@suse.com
+
+- git 2.7.2:
+  * improvements placing conflict markers with different line
+    terminators
+  * "git worktree" fixes for manually moved paths
+  * "git push --force-with-lease" has been taught to report if the
+    push needed to force (or fast-forwarded).
+  * vimdiff backend improvements for "git mergetool": buffer order
+  * improvements for handling paths added to index with "add -N"
+    which are not in the index yet
+
+-------------------------------------------------------------------
+Mon Feb 15 15:02:44 UTC 2016 - astie...@suse.com
+
+- fix test failures with grep 2.23
+  add git-2.7.1-fix-tests-grep-2.23.patch
+
+-------------------------------------------------------------------

Old:
----
  git-2.7.1.tar.sign
  git-2.7.1.tar.xz

New:
----
  git-2.7.1-fix-tests-grep-2.23.patch
  git-2.7.2.tar.sign
  git-2.7.2.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ git.spec ++++++
--- /var/tmp/diff_new_pack.25tZgX/_old  2016-02-25 22:43:31.000000000 +0100
+++ /var/tmp/diff_new_pack.25tZgX/_new  2016-02-25 22:43:31.000000000 +0100
@@ -26,7 +26,7 @@
 %endif
 
 Name:           git
-Version:        2.7.1
+Version:        2.7.2
 Release:        0
 Summary:        Fast, scalable, distributed revision control system
 License:        GPL-2.0
@@ -51,6 +51,7 @@
 Patch6:         git-tcsh-completion-fixes.diff
 # adapt paths in zsh completion (bnc#853183)
 Patch7:         git-zsh-completion-fixes.diff
+Patch8:         git-2.7.1-fix-tests-grep-2.23.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  apache2
 BuildRequires:  asciidoc
@@ -241,6 +242,7 @@
 %patch5 -p1
 %patch6 -p1
 %patch7 -p1
+%patch8 -p1
 
 %build
 cat > .make <<'EOF'

++++++ git-2.7.1-fix-tests-grep-2.23.patch ++++++
From: Andreas Stieger <astie...@suse.com>
Date: Mon, 15 Feb 2016 15:00:57 +0000
Subject: fix build with GNU grep 2.23
References: http://permalink.gmane.org/gmane.comp.version-control.git/285733
Upstream: it's on the mailing list

grep 2.23 changed binary matching

[ 1421s] *** t8005-blame-i18n.sh ***
[ 1421s] not ok 2 - blame respects i18n.commitencoding
[ 1421s] #      
[ 1421s] #              git blame --incremental file | \
[ 1421s] #                      egrep "^(author|summary) " &gt; actual 
&amp;&amp;
[ 1421s] #              test_cmp actual expected
[ 1421s] #      
[ 1421s] not ok 3 - blame respects i18n.logoutputencoding
[ 1421s] #      
[ 1421s] #              git config i18n.logoutputencoding eucJP &amp;&amp;
[ 1421s] #              git blame --incremental file | \
[ 1421s] #                      egrep "^(author|summary) " &gt; actual 
&amp;&amp;
[ 1421s] #              test_cmp actual expected
[ 1421s] #      
[ 1421s] not ok 4 - blame respects --encoding=UTF-8
[ 1421s] #      
[ 1421s] #              git blame --incremental --encoding=UTF-8 file | \
[ 1421s] #                      egrep "^(author|summary) " &gt; actual 
&amp;&amp;
[ 1421s] #              test_cmp actual expected
[ 1421s] #      
[ 1422s] not ok 5 - blame respects --encoding=none
[ 1422s] #      
[ 1422s] #              git blame --incremental --encoding=none file | \
[ 1422s] #                      egrep "^(author|summary) " &gt; actual 
&amp;&amp;
[ 1422s] #              test_cmp actual expected
[ 1422s] #      
[ 1422s] # failed 4 among 5 test(s)
[ 1422s] 1..5
[ 1422s] Makefile:44: recipe for target 't8005-blame-i18n.sh' failed

Index: git-2.7.1/t/t8005-blame-i18n.sh
===================================================================
--- git-2.7.1.orig/t/t8005-blame-i18n.sh        2016-02-06 00:31:08.000000000 
+0100
+++ git-2.7.1/t/t8005-blame-i18n.sh     2016-02-15 15:59:02.557155352 +0100
@@ -36,7 +36,7 @@ EOF
 test_expect_success !MINGW \
        'blame respects i18n.commitencoding' '
        git blame --incremental file | \
-               egrep "^(author|summary) " > actual &&
+               egrep -a "^(author|summary) " > actual &&
        test_cmp actual expected
 '
 
@@ -53,7 +53,7 @@ test_expect_success !MINGW \
        'blame respects i18n.logoutputencoding' '
        git config i18n.logoutputencoding eucJP &&
        git blame --incremental file | \
-               egrep "^(author|summary) " > actual &&
+               egrep -a "^(author|summary) " > actual &&
        test_cmp actual expected
 '
 
@@ -69,7 +69,7 @@ EOF
 test_expect_success !MINGW \
        'blame respects --encoding=UTF-8' '
        git blame --incremental --encoding=UTF-8 file | \
-               egrep "^(author|summary) " > actual &&
+               egrep -a "^(author|summary) " > actual &&
        test_cmp actual expected
 '
 
@@ -85,7 +85,7 @@ EOF
 test_expect_success !MINGW \
        'blame respects --encoding=none' '
        git blame --incremental --encoding=none file | \
-               egrep "^(author|summary) " > actual &&
+               egrep -a "^(author|summary) " > actual &&
        test_cmp actual expected
 '
 
Index: git-2.7.1/t/t9200-git-cvsexportcommit.sh
===================================================================
--- git-2.7.1.orig/t/t9200-git-cvsexportcommit.sh       2016-02-06 
00:31:08.000000000 +0100
+++ git-2.7.1/t/t9200-git-cvsexportcommit.sh    2016-02-15 15:59:44.445790113 
+0100
@@ -35,7 +35,7 @@ exit 1
 
 check_entries () {
        # $1 == directory, $2 == expected
-       grep '^/' "$1/CVS/Entries" | sort | cut -d/ -f2,3,5 >actual
+       grep -a '^/' "$1/CVS/Entries" | sort | cut -d/ -f2,3,5 >actual
        if test -z "$2"
        then
                >expected
++++++ git-2.7.1.tar.xz -> git-2.7.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/Documentation/RelNotes/2.7.2.txt 
new/git-2.7.2/Documentation/RelNotes/2.7.2.txt
--- old/git-2.7.1/Documentation/RelNotes/2.7.2.txt      1970-01-01 
01:00:00.000000000 +0100
+++ new/git-2.7.2/Documentation/RelNotes/2.7.2.txt      2016-02-22 
23:02:26.000000000 +0100
@@ -0,0 +1,41 @@
+Git v2.7.2 Release Notes
+========================
+
+Fixes since v2.7.1
+------------------
+
+ * The low-level merge machinery has been taught to use CRLF line
+   termination when inserting conflict markers to merged contents that
+   are themselves CRLF line-terminated.
+
+ * "git worktree" had a broken code that attempted to auto-fix
+   possible inconsistency that results from end-users moving a
+   worktree to different places without telling Git (the original
+   repository needs to maintain backpointers to its worktrees, but
+   "mv" run by end-users who are not familiar with that fact will
+   obviously not adjust them), which actually made things worse
+   when triggered.
+
+ * "git push --force-with-lease" has been taught to report if the push
+   needed to force (or fast-forwarded).
+
+ * The emulated "yes" command used in our test scripts has been
+   tweaked not to spend too much time generating unnecessary output
+   that is not used, to help those who test on Windows where it would
+   not stop until it fills the pipe buffer due to lack of SIGPIPE.
+
+ * The vimdiff backend for "git mergetool" has been tweaked to arrange
+   and number buffers in the order that would match the expectation of
+   majority of people who read left to right, then top down and assign
+   buffers 1 2 3 4 "mentally" to local base remote merge windows based
+   on that order.
+
+ * The documentation for "git clean" has been corrected; it mentioned
+   that .git/modules/* are removed by giving two "-f", which has never
+   been the case.
+
+ * Paths that have been told the index about with "add -N" are not
+   quite yet in the index, but a few commands behaved as if they
+   already are in a harmful way.
+
+Also includes tiny documentation and test updates.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/Documentation/git-clean.txt 
new/git-2.7.2/Documentation/git-clean.txt
--- old/git-2.7.1/Documentation/git-clean.txt   2016-02-06 00:31:08.000000000 
+0100
+++ new/git-2.7.2/Documentation/git-clean.txt   2016-02-22 23:02:26.000000000 
+0100
@@ -37,9 +37,7 @@
        to false, 'git clean' will refuse to delete files or directories
        unless given -f, -n or -i. Git will refuse to delete directories
        with .git sub directory or file unless a second -f
-       is given. This affects also git submodules where the storage area
-       of the removed submodule under .git/modules/ is not removed until
-       -f is given twice.
+       is given.
 
 -i::
 --interactive::
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/Documentation/git-worktree.txt 
new/git-2.7.2/Documentation/git-worktree.txt
--- old/git-2.7.1/Documentation/git-worktree.txt        2016-02-06 
00:31:08.000000000 +0100
+++ new/git-2.7.2/Documentation/git-worktree.txt        2016-02-22 
23:02:26.000000000 +0100
@@ -32,11 +32,9 @@
 `git worktree prune` in the main or any linked working tree to
 clean up any stale administrative files.
 
-If you move a linked working tree to another file system, or
-within a file system that does not support hard links, you need to run
-at least one git command inside the linked working tree
-(e.g. `git status`) in order to update its administrative files in the
-repository so that they do not get automatically pruned.
+If you move a linked working tree, you need to manually update the
+administrative files so that they do not get pruned automatically. See
+section "DETAILS" for more information.
 
 If a linked working tree is stored on a portable device or network share
 which is not always mounted, you can prevent its administrative files from
@@ -137,6 +135,13 @@
 $GIT_DIR or $GIT_COMMON_DIR when you need to directly access something
 inside $GIT_DIR. Use `git rev-parse --git-path` to get the final path.
 
+If you move a linked working tree, you need to update the 'gitdir' file
+in the entry's directory. For example, if a linked working tree is moved
+to `/newpath/test-next` and its `.git` file points to
+`/path/main/.git/worktrees/test-next`, then update
+`/path/main/.git/worktrees/test-next/gitdir` to reference `/newpath/test-next`
+instead.
+
 To prevent a $GIT_DIR/worktrees entry from being pruned (which
 can be useful in some situations, such as when the
 entry's working tree is stored on a portable device), add a file named
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/Documentation/git.txt 
new/git-2.7.2/Documentation/git.txt
--- old/git-2.7.1/Documentation/git.txt 2016-02-06 00:31:08.000000000 +0100
+++ new/git-2.7.2/Documentation/git.txt 2016-02-22 23:02:26.000000000 +0100
@@ -43,9 +43,10 @@
 branch of the `git.git` repository.
 Documentation for older releases are available here:
 
-* link:v2.7.1/git.html[documentation for release 2.7.1]
+* link:v2.7.2/git.html[documentation for release 2.7.2]
 
 * release notes for
+  link:RelNotes/2.7.2.txt[2.7.2],
   link:RelNotes/2.7.1.txt[2.7.1],
   link:RelNotes/2.7.0.txt[2.7].
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/GIT-VERSION-GEN 
new/git-2.7.2/GIT-VERSION-GEN
--- old/git-2.7.1/GIT-VERSION-GEN       2016-02-06 00:31:08.000000000 +0100
+++ new/git-2.7.2/GIT-VERSION-GEN       2016-02-22 23:02:26.000000000 +0100
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 GVF=GIT-VERSION-FILE
-DEF_VER=v2.7.1
+DEF_VER=v2.7.2
 
 LF='
 '
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/RelNotes new/git-2.7.2/RelNotes
--- old/git-2.7.1/RelNotes      2016-02-25 22:43:33.000000000 +0100
+++ new/git-2.7.2/RelNotes      2016-02-25 22:43:33.000000000 +0100
@@ -1 +1 @@
-symbolic link to Documentation/RelNotes/2.7.1.txt
+symbolic link to Documentation/RelNotes/2.7.2.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/builtin/blame.c 
new/git-2.7.2/builtin/blame.c
--- old/git-2.7.1/builtin/blame.c       2016-02-06 00:31:08.000000000 +0100
+++ new/git-2.7.2/builtin/blame.c       2016-02-22 23:02:26.000000000 +0100
@@ -2392,11 +2392,6 @@
        ce->ce_mode = create_ce_mode(mode);
        add_cache_entry(ce, ADD_CACHE_OK_TO_ADD|ADD_CACHE_OK_TO_REPLACE);
 
-       /*
-        * We are not going to write this out, so this does not matter
-        * right now, but someday we might optimize diff-index --cached
-        * with cache-tree information.
-        */
        cache_tree_invalidate_path(&the_index, path);
 
        return commit;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/builtin/grep.c new/git-2.7.2/builtin/grep.c
--- old/git-2.7.1/builtin/grep.c        2016-02-06 00:31:08.000000000 +0100
+++ new/git-2.7.2/builtin/grep.c        2016-02-22 23:02:26.000000000 +0100
@@ -375,7 +375,7 @@
 
        for (nr = 0; nr < active_nr; nr++) {
                const struct cache_entry *ce = active_cache[nr];
-               if (!S_ISREG(ce->ce_mode))
+               if (!S_ISREG(ce->ce_mode) || ce_intent_to_add(ce))
                        continue;
                if (!ce_path_match(ce, pathspec, NULL))
                        continue;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/builtin/rm.c new/git-2.7.2/builtin/rm.c
--- old/git-2.7.1/builtin/rm.c  2016-02-06 00:31:08.000000000 +0100
+++ new/git-2.7.2/builtin/rm.c  2016-02-22 23:02:26.000000000 +0100
@@ -211,7 +211,7 @@
                 * "intent to add" entry.
                 */
                if (local_changes && staged_changes) {
-                       if (!index_only || !(ce->ce_flags & CE_INTENT_TO_ADD))
+                       if (!index_only || !ce_intent_to_add(ce))
                                string_list_append(&files_staged, name);
                }
                else if (!index_only) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/builtin/stripspace.c 
new/git-2.7.2/builtin/stripspace.c
--- old/git-2.7.1/builtin/stripspace.c  2016-02-06 00:31:08.000000000 +0100
+++ new/git-2.7.2/builtin/stripspace.c  2016-02-22 23:02:26.000000000 +0100
@@ -35,7 +35,7 @@
                            N_("skip and remove all lines starting with comment 
character"),
                            STRIP_COMMENTS),
                OPT_CMDMODE('c', "comment-lines", &mode,
-                           N_("prepend comment character and blank to each 
line"),
+                           N_("prepend comment character and space to each 
line"),
                            COMMENT_LINES),
                OPT_END()
        };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/cache-tree.c new/git-2.7.2/cache-tree.c
--- old/git-2.7.1/cache-tree.c  2016-02-06 00:31:08.000000000 +0100
+++ new/git-2.7.2/cache-tree.c  2016-02-22 23:02:26.000000000 +0100
@@ -377,7 +377,7 @@
                 * they are not part of generated trees. Invalidate up
                 * to root to force cache-tree users to read elsewhere.
                 */
-               if (ce->ce_flags & CE_INTENT_TO_ADD) {
+               if (ce_intent_to_add(ce)) {
                        to_invalidate = 1;
                        continue;
                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/cache.h new/git-2.7.2/cache.h
--- old/git-2.7.1/cache.h       2016-02-06 00:31:08.000000000 +0100
+++ new/git-2.7.2/cache.h       2016-02-22 23:02:26.000000000 +0100
@@ -259,6 +259,7 @@
 #define ce_uptodate(ce) ((ce)->ce_flags & CE_UPTODATE)
 #define ce_skip_worktree(ce) ((ce)->ce_flags & CE_SKIP_WORKTREE)
 #define ce_mark_uptodate(ce) ((ce)->ce_flags |= CE_UPTODATE)
+#define ce_intent_to_add(ce) ((ce)->ce_flags & CE_INTENT_TO_ADD)
 
 #define ce_permissions(mode) (((mode) & 0100) ? 0755 : 0644)
 static inline unsigned int create_ce_mode(unsigned int mode)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/configure new/git-2.7.2/configure
--- old/git-2.7.1/configure     2016-02-06 00:31:08.000000000 +0100
+++ new/git-2.7.2/configure     2016-02-22 23:02:26.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.1.
+# Generated by GNU Autoconf 2.69 for git 2.7.2.
 #
 # Report bugs to <g...@vger.kernel.org>.
 #
@@ -580,8 +580,8 @@
 # Identity of this package.
 PACKAGE_NAME='git'
 PACKAGE_TARNAME='git'
-PACKAGE_VERSION='2.7.1'
-PACKAGE_STRING='git 2.7.1'
+PACKAGE_VERSION='2.7.2'
+PACKAGE_STRING='git 2.7.2'
 PACKAGE_BUGREPORT='g...@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.1 to adapt to many kinds of systems.
+\`configure' configures git 2.7.2 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.1:";;
+     short | recursive ) echo "Configuration of git 2.7.2:";;
    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.1
+git configure 2.7.2
 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.1, which was
+It was created by git $as_me 2.7.2, 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.1, which was
+This file was extended by git $as_me 2.7.2, 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.1
+git config.status 2.7.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.7.1/contrib/completion/git-completion.bash 
new/git-2.7.2/contrib/completion/git-completion.bash
--- old/git-2.7.1/contrib/completion/git-completion.bash        2016-02-06 
00:31:08.000000000 +0100
+++ new/git-2.7.2/contrib/completion/git-completion.bash        2016-02-22 
23:02:26.000000000 +0100
@@ -2413,8 +2413,8 @@
                show,--*|branch,--*)
                        ;;
                branch,*)
-                 if [ $cword -eq 3 ]; then
-                       __gitcomp_nl "$(__git_refs)";
+                       if [ $cword -eq 3 ]; then
+                               __gitcomp_nl "$(__git_refs)";
                        else
                                __gitcomp_nl "$(git --git-dir="$(__gitdir)" 
stash list \
                                                | sed -n -e 's/:.*//p')"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/git-cvsserver.perl 
new/git-2.7.2/git-cvsserver.perl
--- old/git-2.7.1/git-cvsserver.perl    2016-02-06 00:31:08.000000000 +0100
+++ new/git-2.7.2/git-cvsserver.perl    2016-02-22 23:02:26.000000000 +0100
@@ -2664,7 +2664,7 @@
     #   co  # Obtain list directly.
     #   remove # HERE: TEST: MAYBE client does the recursion for us,
     #          # since it only makes sense to remove stuff already in
-    #          # the sandobx?
+    #          # the sandbox?
     #   ci # HERE: Similar to remove...
     #      # Don't try to implement the confusing/weird
     #      # ci -r bug er.."feature".
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/git.spec new/git-2.7.2/git.spec
--- old/git-2.7.1/git.spec      2016-02-06 00:31:08.000000000 +0100
+++ new/git-2.7.2/git.spec      2016-02-22 23:02:26.000000000 +0100
@@ -1,7 +1,7 @@
 # Pass --without docs to rpmbuild if you don't want the documentation
 
 Name:          git
-Version:       2.7.1
+Version:       2.7.2
 Release:       1%{?dist}
 Summary:       Core git tools
 License:       GPL
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/mergetools/vimdiff 
new/git-2.7.2/mergetools/vimdiff
--- old/git-2.7.1/mergetools/vimdiff    2016-02-06 00:31:08.000000000 +0100
+++ new/git-2.7.2/mergetools/vimdiff    2016-02-22 23:02:26.000000000 +0100
@@ -9,8 +9,8 @@
        gvimdiff|vimdiff)
                if $base_present
                then
-                       "$merge_tool_path" -f -d -c 'wincmd J' \
-                               "$MERGED" "$LOCAL" "$BASE" "$REMOTE"
+                       "$merge_tool_path" -f -d -c '4wincmd w | wincmd J' \
+                               "$LOCAL" "$BASE" "$REMOTE" "$MERGED"
                else
                        "$merge_tool_path" -f -d -c 'wincmd l' \
                                "$LOCAL" "$MERGED" "$REMOTE"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/read-cache.c new/git-2.7.2/read-cache.c
--- old/git-2.7.1/read-cache.c  2016-02-06 00:31:08.000000000 +0100
+++ new/git-2.7.2/read-cache.c  2016-02-22 23:02:26.000000000 +0100
@@ -327,7 +327,7 @@
         * by definition never matches what is in the work tree until it
         * actually gets added.
         */
-       if (ce->ce_flags & CE_INTENT_TO_ADD)
+       if (ce_intent_to_add(ce))
                return DATA_CHANGED | TYPE_CHANGED | MODE_CHANGED;
 
        changed = ce_match_stat_basic(ce, st);
@@ -1237,7 +1237,7 @@
 
                        if (cache_errno == ENOENT)
                                fmt = deleted_fmt;
-                       else if (ce->ce_flags & CE_INTENT_TO_ADD)
+                       else if (ce_intent_to_add(ce))
                                fmt = added_fmt; /* must be before other checks 
*/
                        else if (changed & TYPE_CHANGED)
                                fmt = typechange_fmt;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/remote.c new/git-2.7.2/remote.c
--- old/git-2.7.1/remote.c      2016-02-06 00:31:08.000000000 +0100
+++ new/git-2.7.2/remote.c      2016-02-22 23:02:26.000000000 +0100
@@ -1545,11 +1545,8 @@
                }
 
                /*
-                * Bypass the usual "must fast-forward" check but
-                * replace it with a weaker "the old value must be
-                * this value we observed".  If the remote ref has
-                * moved and is now different from what we expect,
-                * reject any push.
+                * If the remote ref has moved and is now different
+                * from what we expect, reject any push.
                 *
                 * It also is an error if the user told us to check
                 * with the remote-tracking branch to find the value
@@ -1560,10 +1557,14 @@
                        if (ref->expect_old_no_trackback ||
                            oidcmp(&ref->old_oid, &ref->old_oid_expect))
                                reject_reason = REF_STATUS_REJECT_STALE;
+                       else
+                               /* If the ref isn't stale then force the 
update. */
+                               force_ref_update = 1;
                }
 
                /*
-                * The usual "must fast-forward" rules.
+                * If the update isn't already rejected then check
+                * the usual "must fast-forward" rules.
                 *
                 * Decide whether an individual refspec A:B can be
                 * pushed.  The push will succeed if any of the
@@ -1582,7 +1583,7 @@
                 *     passing the --force argument
                 */
 
-               else if (!ref->deletion && !is_null_oid(&ref->old_oid)) {
+               if (!reject_reason && !ref->deletion && 
!is_null_oid(&ref->old_oid)) {
                        if (starts_with(ref->name, "refs/tags/"))
                                reject_reason = 
REF_STATUS_REJECT_ALREADY_EXISTS;
                        else if (!has_object_file(&ref->old_oid))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/setup.c new/git-2.7.2/setup.c
--- old/git-2.7.1/setup.c       2016-02-06 00:31:08.000000000 +0100
+++ new/git-2.7.2/setup.c       2016-02-22 23:02:26.000000000 +0100
@@ -451,17 +451,6 @@
        return ret;
 }
 
-static void update_linked_gitdir(const char *gitfile, const char *gitdir)
-{
-       struct strbuf path = STRBUF_INIT;
-       struct stat st;
-
-       strbuf_addf(&path, "%s/gitdir", gitdir);
-       if (stat(path.buf, &st) || st.st_mtime + 24 * 3600 < time(NULL))
-               write_file(path.buf, "%s", gitfile);
-       strbuf_release(&path);
-}
-
 /*
  * Try to read the location of the git directory from the .git file,
  * return path to git directory if found.
@@ -531,7 +520,6 @@
                error_code = READ_GITFILE_ERR_NOT_A_REPO;
                goto cleanup_return;
        }
-       update_linked_gitdir(path, dir);
        path = real_path(dir);
 
 cleanup_return:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/t/t5533-push-cas.sh 
new/git-2.7.2/t/t5533-push-cas.sh
--- old/git-2.7.1/t/t5533-push-cas.sh   2016-02-06 00:31:08.000000000 +0100
+++ new/git-2.7.2/t/t5533-push-cas.sh   2016-02-22 23:02:26.000000000 +0100
@@ -25,7 +25,8 @@
        (
                cd dst &&
                test_commit D &&
-               test_must_fail git push --force-with-lease=master:master origin 
master
+               test_must_fail git push --force-with-lease=master:master origin 
master 2>err &&
+               grep "stale info" err
        ) &&
        git ls-remote . refs/heads/master >expect &&
        git ls-remote src refs/heads/master >actual &&
@@ -37,7 +38,8 @@
        (
                cd dst &&
                test_commit D &&
-               git push --force --force-with-lease=master:master origin master
+               git push --force --force-with-lease=master:master origin master 
2>err &&
+               grep "forced update" err
        ) &&
        git ls-remote dst refs/heads/master >expect &&
        git ls-remote src refs/heads/master >actual &&
@@ -101,7 +103,8 @@
        (
                cd dst &&
                test_commit D &&
-               git push --force-with-lease=master origin master
+               git push --force-with-lease=master origin master 2>err &&
+               ! grep "forced update" err
        ) &&
        git ls-remote dst refs/heads/master >expect &&
        git ls-remote src refs/heads/master >actual &&
@@ -114,7 +117,8 @@
                cd dst &&
                git reset --hard HEAD^ &&
                test_commit D &&
-               git push --force-with-lease=master origin master
+               git push --force-with-lease=master origin master 2>err &&
+               grep "forced update" err
        ) &&
        git ls-remote dst refs/heads/master >expect &&
        git ls-remote src refs/heads/master >actual &&
@@ -147,7 +151,8 @@
        setup_srcdst_basic &&
        (
                cd dst &&
-               git push --force-with-lease=master origin :master
+               git push --force-with-lease=master origin :master 2>err &&
+               grep deleted err
        ) &&
        >expect &&
        git ls-remote src refs/heads/master >actual &&
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/t/t6023-merge-file.sh 
new/git-2.7.2/t/t6023-merge-file.sh
--- old/git-2.7.1/t/t6023-merge-file.sh 2016-02-06 00:31:08.000000000 +0100
+++ new/git-2.7.2/t/t6023-merge-file.sh 2016-02-22 23:02:26.000000000 +0100
@@ -346,4 +346,17 @@
         printf "line1\nline2\nline3x\nline3y" >expect.txt &&
         test_cmp expect.txt output.txt'
 
+test_expect_success 'conflict sections match existing line endings' '
+       printf "1\\r\\n2\\r\\n3" >crlf-orig.txt &&
+       printf "1\\r\\n2\\r\\n4" >crlf-diff1.txt &&
+       printf "1\\r\\n2\\r\\n5" >crlf-diff2.txt &&
+       test_must_fail git -c core.eol=crlf merge-file -p \
+               crlf-diff1.txt crlf-orig.txt crlf-diff2.txt >crlf.txt &&
+       test $(tr "\015" Q <crlf.txt | grep "^[<=>].*Q$" | wc -l) = 3 &&
+       test $(tr "\015" Q <crlf.txt | grep "[345]Q$" | wc -l) = 3 &&
+       test_must_fail git -c core.eol=crlf merge-file -p \
+               nolf-diff1.txt nolf-orig.txt nolf-diff2.txt >nolf.txt &&
+       test $(tr "\015" Q <nolf.txt | grep "^[<=>].*Q$" | wc -l) = 0
+'
+
 test_done
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/t/test-lib.sh new/git-2.7.2/t/test-lib.sh
--- old/git-2.7.1/t/test-lib.sh 2016-02-06 00:31:08.000000000 +0100
+++ new/git-2.7.2/t/test-lib.sh 2016-02-22 23:02:26.000000000 +0100
@@ -907,9 +907,11 @@
                y="$*"
        fi
 
-       while echo "$y"
+       i=0
+       while test $i -lt 99
        do
-               :
+               echo "$y"
+               i=$(($i+1))
        done
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/version new/git-2.7.2/version
--- old/git-2.7.1/version       2016-02-06 00:31:08.000000000 +0100
+++ new/git-2.7.2/version       2016-02-22 23:02:26.000000000 +0100
@@ -1 +1 @@
-2.7.1
+2.7.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/worktree.c new/git-2.7.2/worktree.c
--- old/git-2.7.1/worktree.c    2016-02-06 00:31:08.000000000 +0100
+++ new/git-2.7.2/worktree.c    2016-02-22 23:02:26.000000000 +0100
@@ -176,10 +176,10 @@
                        if (!strcmp(d->d_name, ".") || !strcmp(d->d_name, ".."))
                                continue;
 
-                               if ((linked = get_linked_worktree(d->d_name))) {
-                                       ALLOC_GROW(list, counter + 1, alloc);
-                                       list[counter++] = linked;
-                               }
+                       if ((linked = get_linked_worktree(d->d_name))) {
+                               ALLOC_GROW(list, counter + 1, alloc);
+                               list[counter++] = linked;
+                       }
                }
                closedir(dir);
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-2.7.1/xdiff/xmerge.c new/git-2.7.2/xdiff/xmerge.c
--- old/git-2.7.1/xdiff/xmerge.c        2016-02-06 00:31:08.000000000 +0100
+++ new/git-2.7.2/xdiff/xmerge.c        2016-02-22 23:02:26.000000000 +0100
@@ -109,7 +109,7 @@
        return 0;
 }
 
-static int xdl_recs_copy_0(int use_orig, xdfenv_t *xe, int i, int count, int 
add_nl, char *dest)
+static int xdl_recs_copy_0(int use_orig, xdfenv_t *xe, int i, int count, int 
needs_cr, int add_nl, char *dest)
 {
        xrecord_t **recs;
        int size = 0;
@@ -125,6 +125,12 @@
        if (add_nl) {
                i = recs[count - 1]->size;
                if (i == 0 || recs[count - 1]->ptr[i - 1] != '\n') {
+                       if (needs_cr) {
+                               if (dest)
+                                       dest[size] = '\r';
+                               size++;
+                       }
+
                        if (dest)
                                dest[size] = '\n';
                        size++;
@@ -133,14 +139,58 @@
        return size;
 }
 
-static int xdl_recs_copy(xdfenv_t *xe, int i, int count, int add_nl, char 
*dest)
+static int xdl_recs_copy(xdfenv_t *xe, int i, int count, int needs_cr, int 
add_nl, char *dest)
+{
+       return xdl_recs_copy_0(0, xe, i, count, needs_cr, add_nl, dest);
+}
+
+static int xdl_orig_copy(xdfenv_t *xe, int i, int count, int needs_cr, int 
add_nl, char *dest)
+{
+       return xdl_recs_copy_0(1, xe, i, count, needs_cr, add_nl, dest);
+}
+
+/*
+ * Returns 1 if the i'th line ends in CR/LF (if it is the last line and
+ * has no eol, the preceding line, if any), 0 if it ends in LF-only, and
+ * -1 if the line ending cannot be determined.
+ */
+static int is_eol_crlf(xdfile_t *file, int i)
 {
-       return xdl_recs_copy_0(0, xe, i, count, add_nl, dest);
+       long size;
+
+       if (i < file->nrec - 1)
+               /* All lines before the last *must* end in LF */
+               return (size = file->recs[i]->size) > 1 &&
+                       file->recs[i]->ptr[size - 2] == '\r';
+       if (!file->nrec)
+               /* Cannot determine eol style from empty file */
+               return -1;
+       if ((size = file->recs[i]->size) &&
+                       file->recs[i]->ptr[size - 1] == '\n')
+               /* Last line; ends in LF; Is it CR/LF? */
+               return size > 1 &&
+                       file->recs[i]->ptr[size - 2] == '\r';
+       if (!i)
+               /* The only line has no eol */
+               return -1;
+       /* Determine eol from second-to-last line */
+       return (size = file->recs[i - 1]->size) > 1 &&
+               file->recs[i - 1]->ptr[size - 2] == '\r';
 }
 
-static int xdl_orig_copy(xdfenv_t *xe, int i, int count, int add_nl, char 
*dest)
+static int is_cr_needed(xdfenv_t *xe1, xdfenv_t *xe2, xdmerge_t *m)
 {
-       return xdl_recs_copy_0(1, xe, i, count, add_nl, dest);
+       int needs_cr;
+
+       /* Match post-images' preceding, or first, lines' end-of-line style */
+       needs_cr = is_eol_crlf(&xe1->xdf2, m->i1 ? m->i1 - 1 : 0);
+       if (needs_cr)
+               needs_cr = is_eol_crlf(&xe2->xdf2, m->i2 ? m->i2 - 1 : 0);
+       /* Look at pre-image's first line, unless we already settled on LF */
+       if (needs_cr)
+               needs_cr = is_eol_crlf(&xe1->xdf1, 0);
+       /* If still undecided, use LF-only */
+       return needs_cr < 0 ? 0 : needs_cr;
 }
 
 static int fill_conflict_hunk(xdfenv_t *xe1, const char *name1,
@@ -152,16 +202,17 @@
        int marker1_size = (name1 ? strlen(name1) + 1 : 0);
        int marker2_size = (name2 ? strlen(name2) + 1 : 0);
        int marker3_size = (name3 ? strlen(name3) + 1 : 0);
+       int needs_cr = is_cr_needed(xe1, xe2, m);
 
        if (marker_size <= 0)
                marker_size = DEFAULT_CONFLICT_MARKER_SIZE;
 
        /* Before conflicting part */
-       size += xdl_recs_copy(xe1, i, m->i1 - i, 0,
+       size += xdl_recs_copy(xe1, i, m->i1 - i, 0, 0,
                              dest ? dest + size : NULL);
 
        if (!dest) {
-               size += marker_size + 1 + marker1_size;
+               size += marker_size + 1 + needs_cr + marker1_size;
        } else {
                memset(dest + size, '<', marker_size);
                size += marker_size;
@@ -170,17 +221,19 @@
                        memcpy(dest + size + 1, name1, marker1_size - 1);
                        size += marker1_size;
                }
+               if (needs_cr)
+                       dest[size++] = '\r';
                dest[size++] = '\n';
        }
 
        /* Postimage from side #1 */
-       size += xdl_recs_copy(xe1, m->i1, m->chg1, 1,
+       size += xdl_recs_copy(xe1, m->i1, m->chg1, needs_cr, 1,
                              dest ? dest + size : NULL);
 
        if (style == XDL_MERGE_DIFF3) {
                /* Shared preimage */
                if (!dest) {
-                       size += marker_size + 1 + marker3_size;
+                       size += marker_size + 1 + needs_cr + marker3_size;
                } else {
                        memset(dest + size, '|', marker_size);
                        size += marker_size;
@@ -189,25 +242,29 @@
                                memcpy(dest + size + 1, name3, marker3_size - 
1);
                                size += marker3_size;
                        }
+                       if (needs_cr)
+                               dest[size++] = '\r';
                        dest[size++] = '\n';
                }
-               size += xdl_orig_copy(xe1, m->i0, m->chg0, 1,
+               size += xdl_orig_copy(xe1, m->i0, m->chg0, needs_cr, 1,
                                      dest ? dest + size : NULL);
        }
 
        if (!dest) {
-               size += marker_size + 1;
+               size += marker_size + 1 + needs_cr;
        } else {
                memset(dest + size, '=', marker_size);
                size += marker_size;
+               if (needs_cr)
+                       dest[size++] = '\r';
                dest[size++] = '\n';
        }
 
        /* Postimage from side #2 */
-       size += xdl_recs_copy(xe2, m->i2, m->chg2, 1,
+       size += xdl_recs_copy(xe2, m->i2, m->chg2, needs_cr, 1,
                              dest ? dest + size : NULL);
        if (!dest) {
-               size += marker_size + 1 + marker2_size;
+               size += marker_size + 1 + needs_cr + marker2_size;
        } else {
                memset(dest + size, '>', marker_size);
                size += marker_size;
@@ -216,6 +273,8 @@
                        memcpy(dest + size + 1, name2, marker2_size - 1);
                        size += marker2_size;
                }
+               if (needs_cr)
+                       dest[size++] = '\r';
                dest[size++] = '\n';
        }
        return size;
@@ -241,21 +300,24 @@
                                                  marker_size);
                else if (m->mode & 3) {
                        /* Before conflicting part */
-                       size += xdl_recs_copy(xe1, i, m->i1 - i, 0,
+                       size += xdl_recs_copy(xe1, i, m->i1 - i, 0, 0,
                                              dest ? dest + size : NULL);
                        /* Postimage from side #1 */
-                       if (m->mode & 1)
-                               size += xdl_recs_copy(xe1, m->i1, m->chg1, 
(m->mode & 2),
+                       if (m->mode & 1) {
+                               int needs_cr = is_cr_needed(xe1, xe2, m);
+
+                               size += xdl_recs_copy(xe1, m->i1, m->chg1, 
needs_cr, (m->mode & 2),
                                                      dest ? dest + size : 
NULL);
+                       }
                        /* Postimage from side #2 */
                        if (m->mode & 2)
-                               size += xdl_recs_copy(xe2, m->i2, m->chg2, 0,
+                               size += xdl_recs_copy(xe2, m->i2, m->chg2, 0, 0,
                                                      dest ? dest + size : 
NULL);
                } else
                        continue;
                i = m->i1 + m->chg1;
        }
-       size += xdl_recs_copy(xe1, i, xe1->xdf2.nrec - i, 0,
+       size += xdl_recs_copy(xe1, i, xe1->xdf2.nrec - i, 0, 0,
                              dest ? dest + size : NULL);
        return size;
 }


Reply via email to