Hello community, here is the log from the commit of package git for openSUSE:Factory checked in at 2015-03-05 15:36:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-02-12 10:20:01.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.git.new/git.changes 2015-03-05 18:15:44.000000000 +0100 @@ -1,0 +2,37 @@ +Thu Feb 26 17:14:53 UTC 2015 - [email protected] + +- git 2.3.1: + * The interactive "show a list and let the user choose from it" + interface "add -i" used showed and prompted to the user even when + the candidate list was empty, against which the only "choice" the + user could have made was to choose nothing. + * "git apply --whitespace=fix" used to under-allocate the memory + when the fix resulted in a longer text than the original patch. + * "git log --help" used to show rev-list options that are irrelevant + to the "log" command. + * The error message from "git commit", when a non-existing author + name was given as value to the "--author=" parameter, has been + reworded to avoid misunderstanding. + * A broken pack .idx file in the receiving repository prevented the + dumb http transport from fetching a good copy of it from the other + side. + * The documentation incorrectly said that C(opy) and R(ename) are the + only ones that can be followed by the score number in the output in + the --raw format. + * Fix a misspelled conditional that is always true. + * Code to read branch name from various files in .git/ directory + would have misbehaved if the code to write them left an empty file. + * The "git push" documentation made the "--repo=<there>" option + easily misunderstood. + * After attempting and failing a password-less authentication + (e.g. kerberos), libcURL refuses to fall back to password based + Basic authentication without a bit of help/encouragement. + * Setting diff.submodule to 'log' made "git format-patch" produce + broken patches. + * "git rerere" (invoked internally from many mergy operations) did + not correctly signal errors when told to update the working tree + files and failed to do so for whatever reason. + * "git blame HEAD -- missing" failed to correctly say "HEAD" when it + tried to say "No such path 'missing' in HEAD". + +------------------------------------------------------------------- Old: ---- git-2.3.0.tar.xz New: ---- git-2.3.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ git.spec ++++++ --- /var/tmp/diff_new_pack.yUD69S/_old 2015-03-05 18:15:45.000000000 +0100 +++ /var/tmp/diff_new_pack.yUD69S/_new 2015-03-05 18:15:45.000000000 +0100 @@ -26,7 +26,7 @@ %endif Name: git -Version: 2.3.0 +Version: 2.3.1 Release: 0 Summary: Fast, scalable, distributed revision control system License: GPL-2.0 ++++++ git-2.3.0.tar.xz -> git-2.3.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/Documentation/RelNotes/2.3.1.txt new/git-2.3.1/Documentation/RelNotes/2.3.1.txt --- old/git-2.3.0/Documentation/RelNotes/2.3.1.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/git-2.3.1/Documentation/RelNotes/2.3.1.txt 2015-02-25 07:24:25.000000000 +0100 @@ -0,0 +1,52 @@ +Git v2.3.1 Release Notes +======================== + +Fixes since v2.3 +---------------- + + * The interactive "show a list and let the user choose from it" + interface "add -i" used showed and prompted to the user even when + the candidate list was empty, against which the only "choice" the + user could have made was to choose nothing. + + * "git apply --whitespace=fix" used to under-allocate the memory + when the fix resulted in a longer text than the original patch. + + * "git log --help" used to show rev-list options that are irrelevant + to the "log" command. + + * The error message from "git commit", when a non-existing author + name was given as value to the "--author=" parameter, has been + reworded to avoid misunderstanding. + + * A broken pack .idx file in the receiving repository prevented the + dumb http transport from fetching a good copy of it from the other + side. + + * The documentation incorrectly said that C(opy) and R(ename) are the + only ones that can be followed by the score number in the output in + the --raw format. + + * Fix a misspelled conditional that is always true. + + * Code to read branch name from various files in .git/ directory + would have misbehaved if the code to write them left an empty file. + + * The "git push" documentation made the "--repo=<there>" option + easily misunderstood. + + * After attempting and failing a password-less authentication + (e.g. kerberos), libcURL refuses to fall back to password based + Basic authentication without a bit of help/encouragement. + + * Setting diff.submodule to 'log' made "git format-patch" produce + broken patches. + + * "git rerere" (invoked internally from many mergy operations) did + not correctly signal errors when told to update the working tree + files and failed to do so for whatever reason. + + * "git blame HEAD -- missing" failed to correctly say "HEAD" when it + tried to say "No such path 'missing' in HEAD". + +Also contains typofixes, documentation updates and trivial code clean-ups. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/Documentation/diff-format.txt new/git-2.3.1/Documentation/diff-format.txt --- old/git-2.3.0/Documentation/diff-format.txt 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/Documentation/diff-format.txt 2015-02-25 07:24:25.000000000 +0100 @@ -66,7 +66,8 @@ Status letters C and R are always followed by a score (denoting the percentage of similarity between the source and target of the move or -copy), and are the only ones to be so. +copy). Status letter M may be followed by a score (denoting the +percentage of dissimilarity) for file rewrites. <sha1> is shown as all 0's if a file is new on the filesystem and it is out of sync with the index. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/Documentation/git-push.txt new/git-2.3.1/Documentation/git-push.txt --- old/git-2.3.0/Documentation/git-push.txt 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/Documentation/git-push.txt 2015-02-25 07:24:25.000000000 +0100 @@ -214,22 +214,8 @@ `<refspec>...` section above for details. --repo=<repository>:: - This option is only relevant if no <repository> argument is - passed in the invocation. In this case, 'git push' derives the - remote name from the current branch: If it tracks a remote - branch, then that remote repository is pushed to. Otherwise, - the name "origin" is used. For this latter case, this option - can be used to override the name "origin". In other words, - the difference between these two commands -+ --------------------------- -git push public #1 -git push --repo=public #2 --------------------------- -+ -is that #1 always pushes to "public" whereas #2 pushes to "public" -only if the current branch does not track a remote branch. This is -useful if you write an alias or script around 'git push'. + This option is equivalent to the <repository> argument. If both + are specified, the command-line argument takes precedence. -u:: --set-upstream:: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/Documentation/git.txt new/git-2.3.1/Documentation/git.txt --- old/git-2.3.0/Documentation/git.txt 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/Documentation/git.txt 2015-02-25 07:24:25.000000000 +0100 @@ -43,9 +43,10 @@ branch of the `git.git` repository. Documentation for older releases are available here: -* link:v2.3.0/git.html[documentation for release 2.3] +* link:v2.3.1/git.html[documentation for release 2.3.1] * release notes for + link:RelNotes/2.3.1.txt[2.3.1], link:RelNotes/2.3.0.txt[2.3]. * link:v2.2.2/git.html[documentation for release 2.2.2] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/Documentation/rev-list-options.txt new/git-2.3.1/Documentation/rev-list-options.txt --- old/git-2.3.0/Documentation/rev-list-options.txt 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/Documentation/rev-list-options.txt 2015-02-25 07:24:25.000000000 +0100 @@ -172,11 +172,6 @@ Pretend as if all objects mentioned by reflogs are listed on the command line as `<commit>`. ---indexed-objects:: - Pretend as if all trees and blobs used by the index are listed - on the command line. Note that you probably want to use - `--objects`, too. - --ignore-missing:: Upon seeing an invalid object name in the input, pretend as if the bad input was not given. @@ -644,6 +639,7 @@ These options are mostly targeted for packing of Git repositories. +ifdef::git-rev-list[] --objects:: Print the object IDs of any object referenced by the listed commits. `--objects foo ^bar` thus means ``send me @@ -662,9 +658,15 @@ commits at the cost of increased time. This is used instead of `--objects-edge` to build ``thin'' packs for shallow repositories. +--indexed-objects:: + Pretend as if all trees and blobs used by the index are listed + on the command line. Note that you probably want to use + `--objects`, too. + --unpacked:: Only useful with `--objects`; print the object IDs that are not in packs. +endif::git-rev-list[] --no-walk[=(sorted|unsorted)]:: Only show the given commits, but do not traverse their ancestors. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/GIT-VERSION-GEN new/git-2.3.1/GIT-VERSION-GEN --- old/git-2.3.0/GIT-VERSION-GEN 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/GIT-VERSION-GEN 2015-02-25 07:24:25.000000000 +0100 @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v2.3.0 +DEF_VER=v2.3.1 LF=' ' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/RelNotes new/git-2.3.1/RelNotes --- old/git-2.3.0/RelNotes 2015-03-05 18:15:46.000000000 +0100 +++ new/git-2.3.1/RelNotes 2015-03-05 18:15:46.000000000 +0100 @@ -1 +1 @@ -symbolic link to Documentation/RelNotes/2.3.0.txt +symbolic link to Documentation/RelNotes/2.3.1.txt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/builtin/apply.c new/git-2.3.1/builtin/apply.c --- old/git-2.3.0/builtin/apply.c 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/builtin/apply.c 2015-02-25 07:24:25.000000000 +0100 @@ -657,11 +657,6 @@ return line + len - end; } -static char *null_strdup(const char *s) -{ - return s ? xstrdup(s) : NULL; -} - static char *find_name_common(const char *line, const char *def, int p_value, const char *end, int terminate) { @@ -684,10 +679,10 @@ start = line; } if (!start) - return squash_slash(null_strdup(def)); + return squash_slash(xstrdup_or_null(def)); len = line - start; if (!len) - return squash_slash(null_strdup(def)); + return squash_slash(xstrdup_or_null(def)); /* * Generally we prefer the shorter name, especially @@ -909,7 +904,7 @@ patch->old_name = name; } else { patch->old_name = name; - patch->new_name = null_strdup(name); + patch->new_name = xstrdup_or_null(name); } } if (!name) @@ -998,7 +993,7 @@ { patch->is_delete = 1; free(patch->old_name); - patch->old_name = null_strdup(patch->def_name); + patch->old_name = xstrdup_or_null(patch->def_name); return gitdiff_oldmode(line, patch); } @@ -1006,7 +1001,7 @@ { patch->is_new = 1; free(patch->new_name); - patch->new_name = null_strdup(patch->def_name); + patch->new_name = xstrdup_or_null(patch->def_name); return gitdiff_newmode(line, patch); } @@ -2235,6 +2230,12 @@ ctx++; } + if (postlen + ? postlen < new - postimage->buf + : postimage->len < new - postimage->buf) + die("BUG: caller miscounted postlen: asked %d, orig = %d, used = %d", + (int)postlen, (int) postimage->len, (int)(new - postimage->buf)); + /* Fix the length of the whole thing */ postimage->len = new - postimage->buf; postimage->nr -= reduced; @@ -2390,10 +2391,27 @@ /* * The hunk does not apply byte-by-byte, but the hash says - * it might with whitespace fuzz. We haven't been asked to + * it might with whitespace fuzz. We weren't asked to * ignore whitespace, we were asked to correct whitespace * errors, so let's try matching after whitespace correction. * + * While checking the preimage against the target, whitespace + * errors in both fixed, we count how large the corresponding + * postimage needs to be. The postimage prepared by + * apply_one_fragment() has whitespace errors fixed on added + * lines already, but the common lines were propagated as-is, + * which may become longer when their whitespace errors are + * fixed. + */ + + /* First count added lines in postimage */ + postlen = 0; + for (i = 0; i < postimage->nr; i++) { + if (!(postimage->line[i].flag & LINE_COMMON)) + postlen += postimage->line[i].len; + } + + /* * The preimage may extend beyond the end of the file, * but in this loop we will only handle the part of the * preimage that falls within the file. @@ -2401,7 +2419,6 @@ strbuf_init(&fixed, preimage->len + 1); orig = preimage->buf; target = img->buf + try; - postlen = 0; for (i = 0; i < preimage_limit; i++) { size_t oldlen = preimage->line[i].len; size_t tgtlen = img->line[try_lno + i].len; @@ -2429,7 +2446,10 @@ match = (tgtfix.len == fixed.len - fixstart && !memcmp(tgtfix.buf, fixed.buf + fixstart, fixed.len - fixstart)); - postlen += tgtfix.len; + + /* Add the length if this is common with the postimage */ + if (preimage->line[i].flag & LINE_COMMON) + postlen += tgtfix.len; strbuf_release(&tgtfix); if (!match) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/builtin/blame.c new/git-2.3.1/builtin/blame.c --- old/git-2.3.0/builtin/blame.c 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/builtin/blame.c 2015-02-25 07:24:25.000000000 +0100 @@ -2390,7 +2390,7 @@ return commit; } -static const char *prepare_final(struct scoreboard *sb) +static char *prepare_final(struct scoreboard *sb) { int i; const char *final_commit_name = NULL; @@ -2415,10 +2415,10 @@ sb->final = (struct commit *) obj; final_commit_name = revs->pending.objects[i].name; } - return final_commit_name; + return xstrdup_or_null(final_commit_name); } -static const char *prepare_initial(struct scoreboard *sb) +static char *prepare_initial(struct scoreboard *sb) { int i; const char *final_commit_name = NULL; @@ -2445,7 +2445,7 @@ } if (!final_commit_name) die("No commit to dig down to?"); - return final_commit_name; + return xstrdup(final_commit_name); } static int blame_copy_callback(const struct option *option, const char *arg, int unset) @@ -2489,7 +2489,7 @@ struct origin *o; struct blame_entry *ent = NULL; long dashdash_pos, lno; - const char *final_commit_name = NULL; + char *final_commit_name = NULL; enum object_type type; static struct string_list range_list; @@ -2786,6 +2786,8 @@ assign_blame(&sb, opt); + free(final_commit_name); + if (incremental) return 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/builtin/commit.c new/git-2.3.1/builtin/commit.c --- old/git-2.3.0/builtin/commit.c 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/builtin/commit.c 2015-02-25 07:24:25.000000000 +0100 @@ -559,20 +559,14 @@ *buf = val; } -static char *envdup(const char *var) -{ - const char *val = getenv(var); - return val ? xstrdup(val) : NULL; -} - static void determine_author_info(struct strbuf *author_ident) { char *name, *email, *date; struct ident_split author; - name = envdup("GIT_AUTHOR_NAME"); - email = envdup("GIT_AUTHOR_EMAIL"); - date = envdup("GIT_AUTHOR_DATE"); + name = xstrdup_or_null(getenv("GIT_AUTHOR_NAME")); + email = xstrdup_or_null(getenv("GIT_AUTHOR_EMAIL")); + date = xstrdup_or_null(getenv("GIT_AUTHOR_DATE")); if (author_message) { struct ident_split ident; @@ -1056,7 +1050,7 @@ clear_mailmap(&mailmap); return strbuf_detach(&buf, NULL); } - die(_("No existing author found with '%s'"), name); + die(_("--author '%s' is not 'Name <email>' and matches no existing author"), name); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/builtin/log.c new/git-2.3.1/builtin/log.c --- old/git-2.3.0/builtin/log.c 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/builtin/log.c 2015-02-25 07:24:25.000000000 +0100 @@ -705,7 +705,7 @@ return 0; } if (!strcmp(var, "diff.color") || !strcmp(var, "color.diff") || - !strcmp(var, "color.ui")) { + !strcmp(var, "color.ui") || !strcmp(var, "diff.submodule")) { return 0; } if (!strcmp(var, "format.numbered")) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/config.c new/git-2.3.1/config.c --- old/git-2.3.0/config.c 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/config.c 2015-02-25 07:24:25.000000000 +0100 @@ -1340,7 +1340,7 @@ string_list_init(&e->value_list, 1); hashmap_add(&cs->config_hash, e); } - si = string_list_append_nodup(&e->value_list, value ? xstrdup(value) : NULL); + si = string_list_append_nodup(&e->value_list, xstrdup_or_null(value)); ALLOC_GROW(cs->list.items, cs->list.nr + 1, cs->list.alloc); l_item = &cs->list.items[cs->list.nr++]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/configure new/git-2.3.1/configure --- old/git-2.3.0/configure 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/configure 2015-02-25 07:24:25.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.3.0. +# Generated by GNU Autoconf 2.69 for git 2.3.1. # # Report bugs to <[email protected]>. # @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='git' PACKAGE_TARNAME='git' -PACKAGE_VERSION='2.3.0' -PACKAGE_STRING='git 2.3.0' +PACKAGE_VERSION='2.3.1' +PACKAGE_STRING='git 2.3.1' PACKAGE_BUGREPORT='[email protected]' 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.3.0 to adapt to many kinds of systems. +\`configure' configures git 2.3.1 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.3.0:";; + short | recursive ) echo "Configuration of git 2.3.1:";; 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.3.0 +git configure 2.3.1 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.3.0, which was +It was created by git $as_me 2.3.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -8044,7 +8044,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.3.0, which was +This file was extended by git $as_me 2.3.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -8101,7 +8101,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.3.0 +git config.status 2.3.1 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.3.0/git-add--interactive.perl new/git-2.3.1/git-add--interactive.perl --- old/git-2.3.0/git-add--interactive.perl 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/git-add--interactive.perl 2015-02-25 07:24:25.000000000 +0100 @@ -515,6 +515,9 @@ sub list_and_choose { my ($opts, @stuff) = @_; my (@chosen, @return); + if (!@stuff) { + return @return; + } my $i; my @prefixes = find_unique_prefixes(@stuff) unless $opts->{LIST_ONLY}; @@ -725,6 +728,8 @@ if (@add) { system(qw(git update-index --add --), @add); say_n_paths('added', @add); + } else { + print "No untracked files.\n"; } print "\n"; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/git-compat-util.h new/git-2.3.1/git-compat-util.h --- old/git-2.3.0/git-compat-util.h 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/git-compat-util.h 2015-02-25 07:24:25.000000000 +0100 @@ -678,6 +678,11 @@ #define REALLOC_ARRAY(x, alloc) (x) = xrealloc((x), (alloc) * sizeof(*(x))) +static inline char *xstrdup_or_null(const char *str) +{ + return str ? xstrdup(str) : NULL; +} + static inline size_t xsize_t(off_t len) { if (len > (size_t) len) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/git.spec new/git-2.3.1/git.spec --- old/git-2.3.0/git.spec 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/git.spec 2015-02-25 07:24:25.000000000 +0100 @@ -1,7 +1,7 @@ # Pass --without docs to rpmbuild if you don't want the documentation Name: git -Version: 2.3.0 +Version: 2.3.1 Release: 1%{?dist} Summary: Core git tools License: GPL diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/grep.c new/git-2.3.1/grep.c --- old/git-2.3.0/grep.c 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/grep.c 2015-02-25 07:24:25.000000000 +0100 @@ -1661,8 +1661,8 @@ const void *identifier) { gs->type = type; - gs->name = name ? xstrdup(name) : NULL; - gs->path = path ? xstrdup(path) : NULL; + gs->name = xstrdup_or_null(name); + gs->path = xstrdup_or_null(path); gs->buf = NULL; gs->size = 0; gs->driver = NULL; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/http.c new/git-2.3.1/http.c --- old/git-2.3.0/http.c 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/http.c 2015-02-25 07:24:25.000000000 +0100 @@ -62,6 +62,9 @@ static struct credential cert_auth = CREDENTIAL_INIT; static int ssl_cert_password_required; +#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY +static unsigned long http_auth_methods = CURLAUTH_ANY; +#endif static struct curl_slist *pragma_header; static struct curl_slist *no_pragma_header; @@ -580,6 +583,9 @@ curl_easy_setopt(slot->curl, CURLOPT_UPLOAD, 0); curl_easy_setopt(slot->curl, CURLOPT_HTTPGET, 1); curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 1); +#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY + curl_easy_setopt(slot->curl, CURLOPT_HTTPAUTH, http_auth_methods); +#endif if (http_auth.password) init_curl_http_auth(slot->curl); @@ -870,6 +876,9 @@ credential_reject(&http_auth); return HTTP_NOAUTH; } else { +#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY + http_auth_methods &= ~CURLAUTH_GSSNEGOTIATE; +#endif return HTTP_REAUTH; } } else { @@ -986,6 +995,7 @@ strbuf_addstr(charset, "ISO-8859-1"); } + /* http_request() targets */ #define HTTP_REQUEST_STRBUF 0 #define HTTP_REQUEST_FILE 1 @@ -1240,7 +1250,7 @@ int ret; if (has_pack_index(sha1)) { - new_pack = parse_pack_index(sha1, NULL); + new_pack = parse_pack_index(sha1, sha1_pack_index_name(sha1)); if (!new_pack) return -1; /* parse_pack_index() already issued error message */ goto add_pack; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/notes.c new/git-2.3.1/notes.c --- old/git-2.3.0/notes.c 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/notes.c 2015-02-25 07:24:25.000000000 +0100 @@ -1006,7 +1006,7 @@ t->root = (struct int_node *) xcalloc(1, sizeof(struct int_node)); t->first_non_note = NULL; t->prev_non_note = NULL; - t->ref = notes_ref ? xstrdup(notes_ref) : NULL; + t->ref = xstrdup_or_null(notes_ref); t->combine_notes = combine_notes; t->initialized = 1; t->dirty = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/refs.c new/git-2.3.1/refs.c --- old/git-2.3.0/refs.c 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/refs.c 2015-02-25 07:24:25.000000000 +0100 @@ -1618,8 +1618,7 @@ char *resolve_refdup(const char *ref, int resolve_flags, unsigned char *sha1, int *flags) { - const char *ret = resolve_ref_unsafe(ref, resolve_flags, sha1, flags); - return ret ? xstrdup(ret) : NULL; + return xstrdup_or_null(resolve_ref_unsafe(ref, resolve_flags, sha1, flags)); } /* The argument to filter_refs */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/remote-curl.c new/git-2.3.1/remote-curl.c --- old/git-2.3.0/remote-curl.c 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/remote-curl.c 2015-02-25 07:24:25.000000000 +0100 @@ -760,7 +760,7 @@ for (i = 0; i < nr_heads; i++) { struct ref *ref = to_fetch[i]; - if (!ref->name || !*ref->name) + if (!*ref->name) die("cannot fetch by sha1 over smart http"); packet_buf_write(&preamble, "%s %s\n", sha1_to_hex(ref->old_sha1), ref->name); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/remote.c new/git-2.3.1/remote.c --- old/git-2.3.0/remote.c 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/remote.c 2015-02-25 07:24:25.000000000 +0100 @@ -975,8 +975,8 @@ cpy = xmalloc(sizeof(struct ref) + len + 1); memcpy(cpy, ref, sizeof(struct ref) + len + 1); cpy->next = NULL; - cpy->symref = ref->symref ? xstrdup(ref->symref) : NULL; - cpy->remote_status = ref->remote_status ? xstrdup(ref->remote_status) : NULL; + cpy->symref = xstrdup_or_null(ref->symref); + cpy->remote_status = xstrdup_or_null(ref->remote_status); cpy->peer_ref = copy_ref(ref->peer_ref); return cpy; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/rerere.c new/git-2.3.1/rerere.c --- old/git-2.3.0/rerere.c 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/rerere.c 2015-02-25 07:24:25.000000000 +0100 @@ -477,27 +477,23 @@ static struct lock_file index_lock; -static int update_paths(struct string_list *update) +static void update_paths(struct string_list *update) { int i; - int fd = hold_locked_index(&index_lock, 0); - int status = 0; - if (fd < 0) - return -1; + hold_locked_index(&index_lock, 1); for (i = 0; i < update->nr; i++) { struct string_list_item *item = &update->items[i]; - if (add_file_to_cache(item->string, ADD_CACHE_IGNORE_ERRORS)) - status = -1; + if (add_file_to_cache(item->string, 0)) + exit(128); } - if (!status && active_cache_changed) { + if (active_cache_changed) { if (write_locked_index(&the_index, &index_lock, COMMIT_LOCK)) die("Unable to write new index file"); - } else if (fd >= 0) + } else rollback_lock_file(&index_lock); - return status; } static int do_plain_rerere(struct string_list *rr, int fd) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/shallow.c new/git-2.3.1/shallow.c --- old/git-2.3.0/shallow.c 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/shallow.c 2015-02-25 07:24:25.000000000 +0100 @@ -22,7 +22,7 @@ if (alternate_shallow_file && !override) return; free(alternate_shallow_file); - alternate_shallow_file = path ? xstrdup(path) : NULL; + alternate_shallow_file = xstrdup_or_null(path); } int register_shallow(const unsigned char *sha1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/t/t4138-apply-ws-expansion.sh new/git-2.3.1/t/t4138-apply-ws-expansion.sh --- old/git-2.3.0/t/t4138-apply-ws-expansion.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/git-2.3.1/t/t4138-apply-ws-expansion.sh 2015-02-25 07:24:25.000000000 +0100 @@ -0,0 +1,121 @@ +#!/bin/sh +# +# Copyright (C) 2015 Kyle J. McKay +# + +test_description='git apply test patches with whitespace expansion.' + +. ./test-lib.sh + +test_expect_success setup ' + # + ## create test-N, patchN.patch, expect-N files + # + + # test 1 + printf "\t%s\n" 1 2 3 4 5 6 >before && + printf "\t%s\n" 1 2 3 >after && + printf "%64s\n" a b c >>after && + printf "\t%s\n" 4 5 6 >>after && + git diff --no-index before after | + sed -e "s/before/test-1/" -e "s/after/test-1/" >patch1.patch && + printf "%64s\n" 1 2 3 4 5 6 >test-1 && + printf "%64s\n" 1 2 3 a b c 4 5 6 >expect-1 && + + # test 2 + printf "\t%s\n" a b c d e f >before && + printf "\t%s\n" a b c >after && + n=10 && + x=1 && + while test $x -lt $n + do + printf "%63s%d\n" "" $x >>after + x=$(( $x + 1 )) + done && + printf "\t%s\n" d e f >>after && + git diff --no-index before after | + sed -e "s/before/test-2/" -e "s/after/test-2/" >patch2.patch && + printf "%64s\n" a b c d e f >test-2 && + printf "%64s\n" a b c >expect-2 && + x=1 && + while test $x -lt $n + do + printf "%63s%d\n" "" $x >>expect-2 + x=$(( $x + 1 )) + done && + printf "%64s\n" d e f >>expect-2 && + + # test 3 + printf "\t%s\n" a b c d e f >before && + printf "\t%s\n" a b c >after && + n=100 && + x=0 && + while test $x -lt $n + do + printf "%63s%02d\n" "" $x >>after + x=$(( $x + 1 )) + done && + printf "\t%s\n" d e f >>after && + git diff --no-index before after | + sed -e "s/before/test-3/" -e "s/after/test-3/" >patch3.patch && + printf "%64s\n" a b c d e f >test-3 && + printf "%64s\n" a b c >expect-3 && + x=0 && + while test $x -lt $n + do + printf "%63s%02d\n" "" $x >>expect-3 + x=$(( $x + 1 )) + done && + printf "%64s\n" d e f >>expect-3 && + + # test 4 + >before && + x=0 && + while test $x -lt 50 + do + printf "\t%02d\n" $x >>before + x=$(( $x + 1 )) + done && + cat before >after && + printf "%64s\n" a b c >>after && + while test $x -lt 100 + do + printf "\t%02d\n" $x >>before + printf "\t%02d\n" $x >>after + x=$(( $x + 1 )) + done && + git diff --no-index before after | + sed -e "s/before/test-4/" -e "s/after/test-4/" >patch4.patch && + >test-4 && + x=0 && + while test $x -lt 50 + do + printf "%63s%02d\n" "" $x >>test-4 + x=$(( $x + 1 )) + done && + cat test-4 >expect-4 && + printf "%64s\n" a b c >>expect-4 && + while test $x -lt 100 + do + printf "%63s%02d\n" "" $x >>test-4 + printf "%63s%02d\n" "" $x >>expect-4 + x=$(( $x + 1 )) + done && + + git config core.whitespace tab-in-indent,tabwidth=63 && + git config apply.whitespace fix + +' + +# Note that `patch` can successfully apply all patches when run +# with the --ignore-whitespace option. + +for t in 1 2 3 4 +do + test_expect_success 'apply with ws expansion (t=$t)' ' + git apply patch$t.patch && + test_cmp test-$t expect-$t + ' +done + +test_done diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/t/t4255-am-submodule.sh new/git-2.3.1/t/t4255-am-submodule.sh --- old/git-2.3.0/t/t4255-am-submodule.sh 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/t/t4255-am-submodule.sh 2015-02-25 07:24:25.000000000 +0100 @@ -18,4 +18,76 @@ KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1 test_submodule_switch "am_3way" +test_expect_success 'setup diff.submodule' ' + test_commit one && + INITIAL=$(git rev-parse HEAD) && + + git init submodule && + ( + cd submodule && + test_commit two && + git rev-parse HEAD >../initial-submodule + ) && + git submodule add ./submodule && + git commit -m first && + + ( + cd submodule && + test_commit three && + git rev-parse HEAD >../first-submodule + ) && + git add submodule && + git commit -m second && + SECOND=$(git rev-parse HEAD) && + + ( + cd submodule && + git mv two.t four.t && + git commit -m "second submodule" && + git rev-parse HEAD >../second-submodule + ) && + test_commit four && + git add submodule && + git commit --amend --no-edit && + THIRD=$(git rev-parse HEAD) && + git submodule update --init +' + +run_test() { + START_COMMIT=$1 && + EXPECT=$2 && + # Abort any merges in progress: the previous + # test may have failed, and we should clean up. + test_might_fail git am --abort && + git reset --hard $START_COMMIT && + rm -f *.patch && + git format-patch -1 && + git reset --hard $START_COMMIT^ && + git submodule update && + git am *.patch && + git submodule update && + git -C submodule rev-parse HEAD >actual && + test_cmp $EXPECT actual +} + +test_expect_success 'diff.submodule unset' ' + test_unconfig diff.submodule && + run_test $SECOND first-submodule +' + +test_expect_success 'diff.submodule unset with extra file' ' + test_unconfig diff.submodule && + run_test $THIRD second-submodule +' + +test_expect_success 'diff.submodule=log' ' + test_config diff.submodule log && + run_test $SECOND first-submodule +' + +test_expect_success 'diff.submodule=log with extra file' ' + test_config diff.submodule log && + run_test $THIRD second-submodule +' + test_done diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/t/t5550-http-fetch-dumb.sh new/git-2.3.1/t/t5550-http-fetch-dumb.sh --- old/git-2.3.0/t/t5550-http-fetch-dumb.sh 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/t/t5550-http-fetch-dumb.sh 2015-02-25 07:24:25.000000000 +0100 @@ -165,6 +165,24 @@ ) ' +test_expect_success 'fetch can handle previously-fetched .idx files' ' + git checkout --orphan branch1 && + echo base >file && + git add file && + git commit -m base && + git --bare init "$HTTPD_DOCUMENT_ROOT_PATH"/repo_packed_branches.git && + git push "$HTTPD_DOCUMENT_ROOT_PATH"/repo_packed_branches.git branch1 && + git --git-dir="$HTTPD_DOCUMENT_ROOT_PATH"/repo_packed_branches.git repack -d && + git checkout -b branch2 branch1 && + echo b2 >>file && + git commit -a -m b2 && + git push "$HTTPD_DOCUMENT_ROOT_PATH"/repo_packed_branches.git branch2 && + git --git-dir="$HTTPD_DOCUMENT_ROOT_PATH"/repo_packed_branches.git repack -d && + git --bare init clone_packed_branches.git && + git --git-dir=clone_packed_branches.git fetch "$HTTPD_URL"/dumb/repo_packed_branches.git branch1:branch1 && + git --git-dir=clone_packed_branches.git fetch "$HTTPD_URL"/dumb/repo_packed_branches.git branch2:branch2 +' + test_expect_success 'did not use upload-pack service' ' grep '/git-upload-pack' <"$HTTPD_ROOT_PATH"/access.log >act : >exp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/version new/git-2.3.1/version --- old/git-2.3.0/version 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/version 2015-02-25 07:24:25.000000000 +0100 @@ -1 +1 @@ -2.3.0 +2.3.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/walker.c new/git-2.3.1/walker.c --- old/git-2.3.0/walker.c 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/walker.c 2015-02-25 07:24:25.000000000 +0100 @@ -232,7 +232,7 @@ REALLOC_ARRAY(*write_ref, targets_alloc); } (*target)[targets] = xstrdup(tg_one); - (*write_ref)[targets] = rf_one ? xstrdup(rf_one) : NULL; + (*write_ref)[targets] = xstrdup_or_null(rf_one); targets++; } strbuf_release(&buf); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-2.3.0/wt-status.c new/git-2.3.1/wt-status.c --- old/git-2.3.0/wt-status.c 2015-02-05 22:40:08.000000000 +0100 +++ new/git-2.3.1/wt-status.c 2015-02-25 07:24:25.000000000 +0100 @@ -1140,7 +1140,7 @@ if (strbuf_read_file(&sb, git_path("%s", path), 0) <= 0) goto got_nothing; - while (&sb.len && sb.buf[sb.len - 1] == '\n') + while (sb.len && sb.buf[sb.len - 1] == '\n') strbuf_setlen(&sb, sb.len - 1); if (!sb.len) goto got_nothing; -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
