Merge branch 'ja/i18n-cleanup'
authorJunio C Hamano <gitster@pobox.com>
Thu, 4 May 2017 07:26:44 +0000 (16:26 +0900)
committerJunio C Hamano <gitster@pobox.com>
Thu, 4 May 2017 07:26:44 +0000 (16:26 +0900)
* ja/i18n-cleanup:
i18n: read-cache: typofix
i18n: remove i18n from tag reflog message

.travis.yml
Documentation/RelNotes/2.13.0.txt
builtin/submodule--helper.c
ci/run-windows-build.sh
contrib/completion/git-completion.bash
prio-queue.c
sequencer.c
t/perf/aggregate.perl
t/perf/p0000-perf-lib-sanity.sh
t/t3429-rebase-edit-todo.sh [new file with mode: 0755]
t/t7400-submodule-basic.sh
index 297b0bca979d818faec64791ca5167dbd7b50e86..1b32c98f2cd71dc3cc559fd7efc709a5bd65ac1f 100644 (file)
@@ -61,6 +61,7 @@ matrix:
         - >
           docker run
           --interactive
+          --env DEVELOPER
           --env DEFAULT_TEST_TARGET
           --env GIT_PROVE_OPTS
           --env GIT_TEST_OPTS
index f1560f140616b4086c8da2573b60edede1b9f670..b76a45de627d13282c33ed21554261fa774f006c 100644 (file)
@@ -195,6 +195,12 @@ UI, Workflows & Features
    after it's created. This helps prevent a race between "git worktree
    add; git worktree lock" and "git worktree prune".
 
+ * Completion for "git checkout <branch>" that auto-creates the branch
+   out of a remote tracking branch can now be disabled, as this
+   completion often gets in the way when completing to checkout an
+   existing local branch that happens to share the same prefix with
+   bunch of remote tracking branches.
+
 
 Performance, Internal Implementation, Development Support etc.
 
@@ -325,6 +331,8 @@ Performance, Internal Implementation, Development Support etc.
  * The internals of the refs API around the cached refs has been
    streamlined.
 
+ * Output from perf tests have been updated to align their titles.
+
 Also contains various documentation updates and code clean-ups.
 
 
@@ -596,3 +604,5 @@ notes for details).
    (merge f17d642d3b ab/push-cas-doc-n-test later to maint).
    (merge 61e282425a ss/gitmodules-ignore-doc later to maint).
    (merge 8d3047cd5b ss/submodule-shallow-doc later to maint).
+   (merge 1f9e18b772 jk/prio-queue-avoid-swap-with-self later to maint).
+   (merge 627fde1025 jk/submodule-init-segv-fix later to maint).
index 36e4231821c0acbb6fe21948c752d4ee7c96405d..566a5b6a6f8937742e83577918a94f0dcb20c66c 100644 (file)
@@ -376,12 +376,12 @@ static void init_submodule(const char *path, const char *prefix, int quiet)
        strbuf_reset(&sb);
        strbuf_addf(&sb, "submodule.%s.url", sub->name);
        if (git_config_get_string(sb.buf, &url)) {
-               url = xstrdup(sub->url);
-
-               if (!url)
+               if (!sub->url)
                        die(_("No url found for submodule path '%s' in .gitmodules"),
                                displaypath);
 
+               url = xstrdup(sub->url);
+
                /* Possibly a url relative to parent */
                if (starts_with_dot_dot_slash(url) ||
                    starts_with_dot_slash(url)) {
index 4e3a50b60ee5e1b1dd5ccd9d135b7065f2af04db..e0434407996b75d1f88b55062b7f0a23db098bed 100755 (executable)
@@ -55,7 +55,7 @@ while true
 do
        LAST_STATUS=$STATUS
        STATUS=$(gfwci "action=status&buildId=$BUILD_ID")
-       test "$STATUS" = "$LAST_STATUS" || printf "\nStatus: $STATUS "
+       test "$STATUS" = "$LAST_STATUS" || printf "\nStatus: %s " "$STATUS"
        printf "."
 
        case "$STATUS" in
index b6170190759eed9f5af336985c0ee70f3fcb42df..af658995d55025418c94061842f8d84809b27ef0 100644 (file)
 # completion style.  For example '!f() { : git commit ; ... }; f' will
 # tell the completion to use commit completion.  This also works with aliases
 # of form "!sh -c '...'".  For example, "!sh -c ': git commit ; ... '".
+#
+# You can set the following environment variables to influence the behavior of
+# the completion routines:
+#
+#   GIT_COMPLETION_CHECKOUT_NO_GUESS
+#
+#     When set to "1", do not include "DWIM" suggestions in git-checkout
+#     completion (e.g., completing "foo" when "origin/foo" exists).
 
 case "$COMP_WORDBREAKS" in
 *:*) : great ;;
@@ -1249,7 +1257,8 @@ _git_checkout ()
                # check if --track, --no-track, or --no-guess was specified
                # if so, disable DWIM mode
                local flags="--track --no-track --no-guess" track_opt="--track"
-               if [ -n "$(__git_find_on_cmdline "$flags")" ]; then
+               if [ "$GIT_COMPLETION_CHECKOUT_NO_GUESS" = "1" ] ||
+                  [ -n "$(__git_find_on_cmdline "$flags")" ]; then
                        track_opt=''
                fi
                __git_complete_refs $track_opt
index 17252d231b31f2b8d82d7160d7b95709e14779ff..fc3860fdcb9fc50d4d883e1a8638cca474cfb8d0 100644 (file)
@@ -21,7 +21,7 @@ void prio_queue_reverse(struct prio_queue *queue)
 
        if (queue->compare != NULL)
                die("BUG: prio_queue_reverse() on non-LIFO queue");
-       for (i = 0; i <= (j = (queue->nr - 1) - i); i++)
+       for (i = 0; i < (j = (queue->nr - 1) - i); i++)
                swap(queue, i, j);
 }
 
index 130cc868e511e646badde9ebc0894602e27ea37b..10c3b4ff81547891172319cee0e291c5160050e1 100644 (file)
@@ -1200,6 +1200,7 @@ struct todo_list {
        struct todo_item *items;
        int nr, alloc, current;
        int done_nr, total_nr;
+       struct stat_data stat;
 };
 
 #define TODO_LIST_INIT { STRBUF_INIT }
@@ -1330,6 +1331,7 @@ static int count_commands(struct todo_list *todo_list)
 static int read_populate_todo(struct todo_list *todo_list,
                        struct replay_opts *opts)
 {
+       struct stat st;
        const char *todo_file = get_todo_path(opts);
        int fd, res;
 
@@ -1343,6 +1345,11 @@ static int read_populate_todo(struct todo_list *todo_list,
        }
        close(fd);
 
+       res = stat(todo_file, &st);
+       if (res)
+               return error(_("could not stat '%s'"), todo_file);
+       fill_stat_data(&todo_list->stat, &st);
+
        res = parse_insn_buffer(todo_list->buf.buf, todo_list);
        if (res) {
                if (is_rebase_i(opts))
@@ -2028,10 +2035,25 @@ static int pick_commits(struct todo_list *todo_list, struct replay_opts *opts)
                } else if (item->command == TODO_EXEC) {
                        char *end_of_arg = (char *)(item->arg + item->arg_len);
                        int saved = *end_of_arg;
+                       struct stat st;
 
                        *end_of_arg = '\0';
                        res = do_exec(item->arg);
                        *end_of_arg = saved;
+
+                       /* Reread the todo file if it has changed. */
+                       if (res)
+                               ; /* fall through */
+                       else if (stat(get_todo_path(opts), &st))
+                               res = error_errno(_("could not stat '%s'"),
+                                                 get_todo_path(opts));
+                       else if (match_stat_data(&todo_list->stat, &st)) {
+                               todo_list_release(todo_list);
+                               if (read_populate_todo(todo_list, opts))
+                                       res = -1; /* message was printed */
+                               /* `current` will be incremented below */
+                               todo_list->current = -1;
+                       }
                } else if (!is_noop(item->command))
                        return error(_("unknown command %d"), item->command);
 
index 924b19dab4122a36112bd908a6252e754ecc531a..1dbc85b21407dcfc83d9dc6a56e8e0f21c748c0c 100755 (executable)
@@ -88,6 +88,7 @@ sub format_times {
 sub read_descr {
        my $name = shift;
        open my $fh, "<", $name or return "<error reading description>";
+       binmode $fh, ":utf8" or die "PANIC on binmode: $!";
        my $line = <$fh>;
        close $fh or die "cannot close $name";
        chomp $line;
@@ -147,6 +148,8 @@ sub have_slash {
 my $totalwidth = 3*@dirs+$descrlen;
 $totalwidth += $_ for (@colwidth);
 
+binmode STDOUT, ":utf8" or die "PANIC on binmode: $!";
+
 printf "%-${descrlen}s", "Test";
 for my $i (0..$#dirs) {
        my $d = $dirs[$i];
index cf8e1efce7cd29679c3ffdb2fa7d03489c38c1c9..002c21e52a6763ee14ac243b2b3a1af242fc2834 100755 (executable)
@@ -33,6 +33,8 @@ test_perf 'export a weird var' '
        test_export bar
 '
 
+test_perf 'éḿíẗ ńöń-ÁŚĆÍÍ ćḧáŕáćẗéŕś' 'true'
+
 test_expect_success 'test_export works with weird vars' '
        echo "$bar" &&
        test "$bar" = "weird # variable"
diff --git a/t/t3429-rebase-edit-todo.sh b/t/t3429-rebase-edit-todo.sh
new file mode 100755 (executable)
index 0000000..b9292df
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+test_description='rebase should reread the todo file if an exec modifies it'
+
+. ./test-lib.sh
+
+test_expect_success 'rebase exec modifies rebase-todo' '
+       test_commit initial &&
+       todo=.git/rebase-merge/git-rebase-todo &&
+       git rebase HEAD -x "echo exec touch F >>$todo" &&
+       test -e F
+'
+
+test_done
index c2706fe4723778b68b9673fd85267ea475f791f2..1b8f1dbd3a3d8a59a74888155d36d0d49e94cb64 100755 (executable)
@@ -38,6 +38,14 @@ test_expect_success 'submodule update aborts on missing .gitmodules file' '
        test_i18ngrep "Submodule path .sub. not initialized" actual
 '
 
+test_expect_success 'submodule update aborts on missing gitmodules url' '
+       test_when_finished "git update-index --remove sub" &&
+       git update-index --add --cacheinfo 160000,$(git rev-parse HEAD),sub &&
+       test_when_finished "rm -f .gitmodules" &&
+       git config -f .gitmodules submodule.s.path sub &&
+       test_must_fail git submodule init
+'
+
 test_expect_success 'configuration parsing' '
        test_when_finished "rm -f .gitmodules" &&
        cat >.gitmodules <<-\EOF &&