Merge git://github.com/git-l10n/git-po
authorJunio C Hamano <gitster@pobox.com>
Mon, 5 Aug 2013 17:38:23 +0000 (10:38 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 5 Aug 2013 17:38:23 +0000 (10:38 -0700)
* git://github.com/git-l10n/git-po:
l10n: zh_CN.po: translate 99 messages (2133t0f0u)
l10n: vi.po (2133t)
l10n: git.pot: v1.8.4 round 1 (99 new, 46 removed)

56 files changed:
.mailmap
Documentation/config.txt
Documentation/git-cat-file.txt
Documentation/git-clean.txt
Documentation/git-config.txt
Documentation/git-tag.txt
Documentation/howto/new-command.txt
Documentation/technical/api-revision-walking.txt
Documentation/technical/protocol-capabilities.txt
GIT-VERSION-GEN
Makefile
advice.c
builtin/cat-file.c
builtin/clean.c
builtin/commit.c
builtin/fast-export.c
builtin/push.c
builtin/rm.c
cache.h
combine-diff.c
commit-slab.h
commit.c
commit.h
compat/cygwin.c [deleted file]
compat/cygwin.h [deleted file]
config.mak.uname
contrib/ciabot/ciabot.py
contrib/ciabot/ciabot.sh
contrib/completion/git-completion.bash
contrib/hg-to-git/hg-to-git.py
contrib/subtree/Makefile
contrib/subtree/git-subtree.sh
contrib/subtree/git-subtree.txt
contrib/subtree/t/t7900-subtree.sh
git-compat-util.h
git-mergetool--lib.sh
git-p4.py
git-rebase.sh
help.c
notes.h
path.c
read-cache.c
refs.c
sha1_name.c
t/gitweb-lib.sh
t/lib-t6000.sh
t/perf/perf-lib.sh
t/t1006-cat-file.sh
t/t3900-i18n-commit.sh
t/t3900/UTF-16.txt [new file with mode: 0644]
t/t7301-clean-interactive.sh
t/t7601-merge-pull-config.sh
t/t9020-remote-svn.sh
t/t9112-git-svn-md5less-file.sh
t/t9802-git-p4-filetype.sh
transport-helper.c
index 57070b50d1b2c385ed82c4402c428bc296ba01a0..dfa2e65348e992fc3f66a88f4438581d6fa7f116 100644 (file)
--- a/.mailmap
+++ b/.mailmap
@@ -26,6 +26,8 @@ Bryan Larsen <bryan@larsen.st> <bryanlarsen@yahoo.com>
 Cheng Renquan <crquan@gmail.com>
 Chris Shoemaker <c.shoemaker@cox.net>
 Chris Wright <chrisw@sous-sol.org> <chrisw@osdl.org>
+Cord Seele <cowose@gmail.com> <cowose@googlemail.com>
+Christian Stimming <stimming@tuhh.de> <chs@ckiste.goetheallee>
 Csaba Henk <csaba@gluster.com> <csaba@lowlife.hu>
 Dan Johnson <computerdruid@gmail.com>
 Dana L. How <danahow@gmail.com> <how@deathvalley.cswitch.com>
@@ -74,6 +76,7 @@ Johannes Schindelin <Johannes.Schindelin@gmx.de> <johannes.schindelin@gmx.de>
 Johannes Sixt <j6t@kdbg.org> <J.Sixt@eudaptics.com>
 Johannes Sixt <j6t@kdbg.org> <j.sixt@viscovery.net>
 Johannes Sixt <j6t@kdbg.org> <johannes.sixt@telecom.at>
+John 'Warthog9' Hawley <warthog9@kernel.org> <warthog9@eaglescrag.net>
 Jon Loeliger <jdl@jdl.com> <jdl@freescale.com>
 Jon Loeliger <jdl@jdl.com> <jdl@freescale.org>
 Jon Seymour <jon.seymour@gmail.com> <jon@blackcubes.dyndns.org>
@@ -127,6 +130,9 @@ Matthias Urlichs <matthias@urlichs.de> <smurf@kiste.(none)>
 Matthias Urlichs <matthias@urlichs.de> <smurf@smurf.noris.de>
 Michael Coleman <tutufan@gmail.com>
 Michael J Gruber <git@drmicha.warpmail.net> <michaeljgruber+gmane@fastmail.fm>
+Michael S. Tsirkin <mst@kernel.org> <mst@redhat.com>
+Michael S. Tsirkin <mst@kernel.org> <mst@mellanox.co.il>
+Michael S. Tsirkin <mst@kernel.org> <mst@dev.mellanox.co.il>
 Michael W. Olson <mwolson@gnu.org>
 Michael Witten <mfwitten@gmail.com> <mfwitten@MIT.EDU>
 Michael Witten <mfwitten@gmail.com> <mfwitten@mit.edu>
@@ -181,6 +187,7 @@ Simon Hausmann <hausmann@kde.org> <shausman@trolltech.com>
 Stefan Naewe <stefan.naewe@gmail.com> <stefan.naewe@atlas-elektronik.com>
 Stefan Naewe <stefan.naewe@gmail.com> <stefan.naewe@googlemail.com>
 Stefan Sperling <stsp@elego.de> <stsp@stsp.name>
+Štěpán Němec <stepnem@gmail.com> <stepan.nemec@gmail.com>
 Stephen Boyd <bebarino@gmail.com> <sboyd@codeaurora.org>
 Steven Drake <sdrake@xnet.co.nz> <sdrake@ihug.co.nz>
 Steven Grimm <koreth@midwinter.com> <sgrimm@sgrimm-mbp.local>
index e0b923f428094f1303084778bee7ab9e502709a4..ec57a15ac5da284f35ced4441e2315fec9b05e2d 100644 (file)
@@ -213,17 +213,6 @@ The default is true, except linkgit:git-clone[1] or linkgit:git-init[1]
 will probe and set core.fileMode false if appropriate when the
 repository is created.
 
-core.ignoreCygwinFSTricks::
-       This option is only used by Cygwin implementation of Git. If false,
-       the Cygwin stat() and lstat() functions are used. This may be useful
-       if your repository consists of a few separate directories joined in
-       one hierarchy using Cygwin mount. If true, Git uses native Win32 API
-       whenever it is possible and falls back to Cygwin functions only to
-       handle symbol links. The native mode is more than twice faster than
-       normal Cygwin l/stat() functions. True by default, unless core.filemode
-       is true, in which case ignoreCygwinFSTricks is ignored as Cygwin's
-       POSIX emulation is required to support core.filemode.
-
 core.ignorecase::
        If true, this option enables various workarounds to enable
        Git to work better on filesystems that are not case sensitive,
index 3ddec0b65ba82dbfdf10569e4c7ec2ac148e08b4..10fbc6a373758437f23ef80245b3bd9e164add1f 100644 (file)
@@ -88,10 +88,8 @@ BATCH OUTPUT
 If `--batch` or `--batch-check` is given, `cat-file` will read objects
 from stdin, one per line, and print information about them.
 
-Each line is split at the first whitespace boundary. All characters
-before that whitespace are considered as a whole object name, and are
-parsed as if given to linkgit:git-rev-parse[1]. Characters after that
-whitespace can be accessed using the `%(rest)` atom (see below).
+Each line is considered as a whole object name, and is parsed as if
+given to linkgit:git-rev-parse[1].
 
 You can specify the information shown for each object by using a custom
 `<format>`. The `<format>` is copied literally to stdout for each
@@ -112,10 +110,6 @@ newline. The available atoms are:
        The size, in bytes, that the object takes up on disk. See the
        note about on-disk sizes in the `CAVEATS` section below.
 
-`rest`::
-       The text (if any) found after the first run of whitespace on the
-       input line (i.e., the "rest" of the line).
-
 If no format is specified, the default format is `%(objectname)
 %(objecttype) %(objectsize)`.
 
index 75fb54339397c1bd8a38bd2bcc62eb6469645986..89979228b12080606f5becc268792c6eae8f128e 100644 (file)
@@ -111,7 +111,7 @@ select by numbers::
    '>>' like this, you can make more than one selection, concatenated
    with whitespace or comma.  Also you can say ranges.  E.g. "2-5 7,9"
    to choose 2,3,4,5,7,9 from the list.  If the second number in a
-   range is omitted, all remaining patches are taken.  E.g. "7-" to
+   range is omitted, all remaining items are selected.  E.g. "7-" to
    choose 7,8,9 from the list.  You can say '*' to choose everything.
    Also when you are satisfied with the filtered result, press ENTER
    (empty) back to the main menu.
index 34b089464627fc66c5a734adc7699fcceaff7c4f..2dbe486eb16d8edde01ece856fa1e0ad75053042 100644 (file)
@@ -96,29 +96,31 @@ OPTIONS
        names are not.
 
 --global::
-       For writing options: write to global ~/.gitconfig file rather than
-       the repository .git/config, write to $XDG_CONFIG_HOME/git/config file
-       if this file exists and the ~/.gitconfig file doesn't.
+       For writing options: write to global `~/.gitconfig` file
+       rather than the repository `.git/config`, write to
+       `$XDG_CONFIG_HOME/git/config` file if this file exists and the
+       `~/.gitconfig` file doesn't.
 +
-For reading options: read only from global ~/.gitconfig and from
-$XDG_CONFIG_HOME/git/config rather than from all available files.
+For reading options: read only from global `~/.gitconfig` and from
+`$XDG_CONFIG_HOME/git/config` rather than from all available files.
 +
 See also <<FILES>>.
 
 --system::
-       For writing options: write to system-wide $(prefix)/etc/gitconfig
-       rather than the repository .git/config.
+       For writing options: write to system-wide
+       `$(prefix)/etc/gitconfig` rather than the repository
+       `.git/config`.
 +
-For reading options: read only from system-wide $(prefix)/etc/gitconfig
+For reading options: read only from system-wide `$(prefix)/etc/gitconfig`
 rather than from all available files.
 +
 See also <<FILES>>.
 
 --local::
-       For writing options: write to the repository .git/config file.
+       For writing options: write to the repository `.git/config` file.
        This is the default behavior.
 +
-For reading options: read only from the repository .git/config rather than
+For reading options: read only from the repository `.git/config` rather than
 from all available files.
 +
 See also <<FILES>>.
@@ -218,9 +220,9 @@ $(prefix)/etc/gitconfig::
 
 $XDG_CONFIG_HOME/git/config::
        Second user-specific configuration file. If $XDG_CONFIG_HOME is not set
-       or empty, $HOME/.config/git/config will be used. Any single-valued
+       or empty, `$HOME/.config/git/config` will be used. Any single-valued
        variable set in this file will be overwritten by whatever is in
-       ~/.gitconfig.  It is a good idea not to create this file if
+       `~/.gitconfig`.  It is a good idea not to create this file if
        you sometimes use older versions of Git, as support for this
        file was added fairly recently.
 
index 22894cbee6794fd738cf45aefefff0679dcb940d..c418c44d40d1494d2f87d6ed45c229a56064f0b3 100644 (file)
@@ -42,6 +42,17 @@ committer identity for the current user is used to find the
 GnuPG key for signing.         The configuration variable `gpg.program`
 is used to specify custom GnuPG binary.
 
+Tag objects (created with `-a`, `s`, or `-u`) are called "annotated"
+tags; they contain a creation date, the tagger name and e-mail, a
+tagging message, and an optional GnuPG signature. Whereas a
+"lightweight" tag is simply a name for an object (usually a commit
+object).
+
+Annotated tags are meant for release while lightweight tags are meant
+for private or temporary object labels. For this reason, some git
+commands for naming objects (like `git describe`) will ignore
+lightweight tags by default.
+
 
 OPTIONS
 -------
index 2abc3a0a0e7bc60c40211ce630fdb098848f825e..d7de5a3e9ed236c87a62b577ee5978e02d855a2a 100644 (file)
@@ -94,7 +94,7 @@ your language, document it in the INSTALL file.
 6. There is a file command-list.txt in the distribution main directory
 that categorizes commands by type, so they can be listed in appropriate
 subsections in the documentation's summary command list.  Add an entry
-for yours.  To understand the categories, look at git-cmmands.txt
+for yours.  To understand the categories, look at git-commands.txt
 in the main directory.
 
 7. Give the maintainer one paragraph to include in the RelNotes file
index b7d0d9a8a7b45f4988c0ee8170fec25c415cc918..55b878ade81e2b3b265032e281f82ab86016d5ae 100644 (file)
@@ -59,7 +59,7 @@ function.
 `reset_revision_walk`::
 
        Reset the flags used by the revision walking api. You can use
-       this to do multiple sequencial revision walks.
+       this to do multiple sequential revision walks.
 
 Data structures
 ---------------
index b15517fa06bd782fb757e6b0836f9bceea8b7c05..fd8ffa5df38c8dd1a682ab77327654a4c2b80cd4 100644 (file)
@@ -18,11 +18,12 @@ was sent.  Server MUST NOT ignore capabilities that client requested
 and server advertised.  As a consequence of these rules, server MUST
 NOT advertise capabilities it does not understand.
 
-The 'report-status' and 'delete-refs' capabilities are sent and
+The 'report-status', 'delete-refs', and 'quiet' capabilities are sent and
 recognized by the receive-pack (push to server) process.
 
-The 'ofs-delta' capability is sent and recognized by both upload-pack
-and receive-pack protocols.
+The 'ofs-delta' and 'side-band-64k' capabilities are sent and recognized
+by both upload-pack and receive-pack protocols.  The 'agent' capability
+may optionally be sent in both protocols.
 
 All other capabilities are only recognized by the upload-pack (fetch
 from server) process.
@@ -123,6 +124,20 @@ Server can send, and client understand PACKv2 with delta referring to
 its base by position in pack rather than by an obj-id.  That is, they can
 send/read OBJ_OFS_DELTA (aka type 6) in a packfile.
 
+agent
+-----
+
+The server may optionally send a capability of the form `agent=X` to
+notify the client that the server is running version `X`. The client may
+optionally return its own agent string by responding with an `agent=Y`
+capability (but it MUST NOT do so if the server did not mention the
+agent capability). The `X` and `Y` strings may contain any printable
+ASCII characters except space (i.e., the byte range 32 < x < 127), and
+are typically of the form "package/version" (e.g., "git/1.8.3.1"). The
+agent strings are purely informative for statistics and debugging
+purposes, and MUST NOT be used to programatically assume the presence
+or absence of particular features.
+
 shallow
 -------
 
@@ -168,7 +183,7 @@ of whether or not there are tags available.
 report-status
 -------------
 
-The upload-pack process can receive a 'report-status' capability,
+The receive-pack process can receive a 'report-status' capability,
 which tells it that the client wants a report of what happened after
 a packfile upload and reference update.  If the pushing client requests
 this capability, after unpacking and updating references the server
@@ -185,3 +200,20 @@ it is capable of accepting a zero-id value as the target
 value of a reference update.  It is not sent back by the client, it
 simply informs the client that it can be sent zero-id values
 to delete references.
+
+quiet
+-----
+
+If the receive-pack server advertises the 'quiet' capability, it is
+capable of silencing human-readable progress output which otherwise may
+be shown when processing the received pack. A send-pack client should
+respond with the 'quiet' capability to suppress server-side progress
+reporting if the local progress reporting is also being suppressed
+(e.g., via `push -q`, or if stderr does not go to a tty).
+
+allow-tip-sha1-in-want
+----------------------
+
+If the upload-pack server advertises this capability, fetch-pack may
+send "want" lines with SHA-1s that exist at the server but are not
+advertised by upload-pack.
index 2c109111e3e2a3a76126f25ad3eadec275682c4d..ede98a8c160d06cfa3068decfa765ae896792ef9 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 GVF=GIT-VERSION-FILE
-DEF_VER=v1.8.4-rc0
+DEF_VER=v1.8.4-rc1
 
 LF='
 '
index ef442ebad097a47bb19ea75037e62c51d9bb5d8b..3588ca1b6a575e8bb732dcc04b7c59dcb7f15cf4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -654,7 +654,6 @@ LIB_H += color.h
 LIB_H += column.h
 LIB_H += commit.h
 LIB_H += compat/bswap.h
-LIB_H += compat/cygwin.h
 LIB_H += compat/mingw.h
 LIB_H += compat/obstack.h
 LIB_H += compat/poll/poll.h
index 2a52098a29dd1c2192edb6fff8ca6979383e77c6..3eca9f5ffdd6e3596584ed0aa79e2634683bd496 100644 (file)
--- a/advice.c
+++ b/advice.c
@@ -35,7 +35,7 @@ static struct {
        { "implicitidentity", &advice_implicit_identity },
        { "detachedhead", &advice_detached_head },
        { "setupstreamfailure", &advice_set_upstream_failure },
-       { "object_name_warning", &advice_object_name_warning },
+       { "objectnamewarning", &advice_object_name_warning },
        { "rmhints", &advice_rm_hints },
 
        /* make this an alias for backward compatibility */
index 163ce6c77cea19b8c209e52ea2694f98d6cb0d05..425346048bbba66874eb857985bed9937c44e1d6 100644 (file)
@@ -119,7 +119,6 @@ struct expand_data {
        enum object_type type;
        unsigned long size;
        unsigned long disk_size;
-       const char *rest;
 
        /*
         * If mark_query is true, we do not expand anything, but rather
@@ -164,9 +163,6 @@ static void expand_atom(struct strbuf *sb, const char *atom, int len,
                        data->info.disk_sizep = &data->disk_size;
                else
                        strbuf_addf(sb, "%lu", data->disk_size);
-       } else if (is_atom("rest", atom, len)) {
-               if (!data->mark_query && data->rest)
-                       strbuf_addstr(sb, data->rest);
        } else
                die("unknown format element: %.*s", len, atom);
 }
@@ -277,21 +273,7 @@ static int batch_objects(struct batch_options *opt)
        warn_on_object_refname_ambiguity = 0;
 
        while (strbuf_getline(&buf, stdin, '\n') != EOF) {
-               char *p;
-               int error;
-
-               /*
-                * Split at first whitespace, tying off the beginning of the
-                * string and saving the remainder (or NULL) in data.rest.
-                */
-               p = strpbrk(buf.buf, " \t");
-               if (p) {
-                       while (*p && strchr(" \t", *p))
-                               *p++ = '\0';
-               }
-               data.rest = p;
-
-               error = batch_one_object(buf.buf, opt, &data);
+               int error = batch_one_object(buf.buf, opt, &data);
                if (error)
                        return error;
        }
index dba8387747b0fa5129b9270ce5140ba847a7a139..3c85e152e140741855590f422c599407b6d6ae55 100644 (file)
@@ -365,6 +365,56 @@ static void print_highlight_menu_stuff(struct menu_stuff *stuff, int **chosen)
        string_list_clear(&menu_list, 0);
 }
 
+static int find_unique(const char *choice, struct menu_stuff *menu_stuff)
+{
+       struct menu_item *menu_item;
+       struct string_list_item *string_list_item;
+       int i, len, found = 0;
+
+       len = strlen(choice);
+       switch (menu_stuff->type) {
+       default:
+               die("Bad type of menu_stuff when parse choice");
+       case MENU_STUFF_TYPE_MENU_ITEM:
+
+               menu_item = (struct menu_item *)menu_stuff->stuff;
+               for (i = 0; i < menu_stuff->nr; i++, menu_item++) {
+                       if (len == 1 && *choice == menu_item->hotkey) {
+                               found = i + 1;
+                               break;
+                       }
+                       if (!strncasecmp(choice, menu_item->title, len)) {
+                               if (found) {
+                                       if (len == 1) {
+                                               /* continue for hotkey matching */
+                                               found = -1;
+                                       } else {
+                                               found = 0;
+                                               break;
+                                       }
+                               } else {
+                                       found = i + 1;
+                               }
+                       }
+               }
+               break;
+       case MENU_STUFF_TYPE_STRING_LIST:
+               string_list_item = ((struct string_list *)menu_stuff->stuff)->items;
+               for (i = 0; i < menu_stuff->nr; i++, string_list_item++) {
+                       if (!strncasecmp(choice, string_list_item->string, len)) {
+                               if (found) {
+                                       found = 0;
+                                       break;
+                               }
+                               found = i + 1;
+                       }
+               }
+               break;
+       }
+       return found;
+}
+
+
 /*
  * Parse user input, and return choice(s) for menu (menu_stuff).
  *
@@ -392,8 +442,6 @@ static int parse_choice(struct menu_stuff *menu_stuff,
                        int **chosen)
 {
        struct strbuf **choice_list, **ptr;
-       struct menu_item *menu_item;
-       struct string_list_item *string_list_item;
        int nr = 0;
        int i;
 
@@ -457,32 +505,8 @@ static int parse_choice(struct menu_stuff *menu_stuff,
                        bottom = 1;
                        top = menu_stuff->nr;
                } else {
-                       switch (menu_stuff->type) {
-                       default:
-                               die("Bad type of menu_stuff when parse choice");
-                       case MENU_STUFF_TYPE_MENU_ITEM:
-                               menu_item = (struct menu_item *)menu_stuff->stuff;
-                               for (i = 0; i < menu_stuff->nr; i++, menu_item++) {
-                                       if (((*ptr)->len == 1 &&
-                                            *(*ptr)->buf == menu_item->hotkey) ||
-                                           !strcasecmp((*ptr)->buf, menu_item->title)) {
-                                               bottom = i + 1;
-                                               top = bottom;
-                                               break;
-                                       }
-                               }
-                               break;
-                       case MENU_STUFF_TYPE_STRING_LIST:
-                               string_list_item = ((struct string_list *)menu_stuff->stuff)->items;
-                               for (i = 0; i < menu_stuff->nr; i++, string_list_item++) {
-                                       if (!strcasecmp((*ptr)->buf, string_list_item->string)) {
-                                               bottom = i + 1;
-                                               top = bottom;
-                                               break;
-                                       }
-                               }
-                               break;
-                       }
+                       bottom = find_unique((*ptr)->buf, menu_stuff);
+                       top = bottom;
                }
 
                if (top <= 0 || bottom <= 0 || top > menu_stuff->nr || bottom > top ||
index 003bd7dbec1acfda36f4d4bc5e9fb64a276ad049..10acc53f8012f53b6a15a3d006b622bda3409b17 100644 (file)
@@ -63,8 +63,18 @@ N_("The previous cherry-pick is now empty, possibly due to conflict resolution.\
 "If you wish to commit it anyway, use:\n"
 "\n"
 "    git commit --allow-empty\n"
+"\n");
+
+static const char empty_cherry_pick_advice_single[] =
+N_("Otherwise, please use 'git reset'\n");
+
+static const char empty_cherry_pick_advice_multi[] =
+N_("If you wish to skip this commit, use:\n"
 "\n"
-"Otherwise, please use 'git reset'\n");
+"    git reset\n"
+"\n"
+"Then \"git cherry-pick --continue\" will resume cherry-picking\n"
+"the remaining commits.\n");
 
 static const char *use_message_buffer;
 static const char commit_editmsg[] = "COMMIT_EDITMSG";
@@ -107,6 +117,7 @@ static enum {
 static const char *cleanup_arg;
 
 static enum commit_whence whence;
+static int sequencer_in_use;
 static int use_editor = 1, include_status = 1;
 static int show_ignored_in_status, have_option_m;
 static const char *only_include_assumed;
@@ -141,8 +152,11 @@ static void determine_whence(struct wt_status *s)
 {
        if (file_exists(git_path("MERGE_HEAD")))
                whence = FROM_MERGE;
-       else if (file_exists(git_path("CHERRY_PICK_HEAD")))
+       else if (file_exists(git_path("CHERRY_PICK_HEAD"))) {
                whence = FROM_CHERRY_PICK;
+               if (file_exists(git_path("sequencer")))
+                       sequencer_in_use = 1;
+       }
        else
                whence = FROM_COMMIT;
        if (s)
@@ -810,8 +824,13 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
                run_status(stdout, index_file, prefix, 0, s);
                if (amend)
                        fputs(_(empty_amend_advice), stderr);
-               else if (whence == FROM_CHERRY_PICK)
+               else if (whence == FROM_CHERRY_PICK) {
                        fputs(_(empty_cherry_pick_advice), stderr);
+                       if (!sequencer_in_use)
+                               fputs(_(empty_cherry_pick_advice_single), stderr);
+                       else
+                               fputs(_(empty_cherry_pick_advice_multi), stderr);
+               }
                return 0;
        }
 
index d1d68e9fc62889f647aff0005cc2ca2d3fef9d94..8e19058744756e9978eac6244156ed1c27f1e20e 100644 (file)
@@ -379,7 +379,7 @@ static void handle_tag(const char *name, struct tag *tag)
        int tagged_mark;
        struct commit *p;
 
-       /* Trees have no identifer in fast-export output, thus we have no way
+       /* Trees have no identifier in fast-export output, thus we have no way
         * to output tags of trees, tags of tags of trees, etc.  Simply omit
         * such tags.
         */
index 6d36c24268bea3cb658a1aa94f3a037f403d5895..04f0eaf179044dce1e87137978bcbecca18f3527 100644 (file)
@@ -92,7 +92,7 @@ static NORETURN int die_push_simple(struct branch *branch, struct remote *remote
        if (!short_upstream)
                short_upstream = branch->merge[0]->src;
        /*
-        * Don't show advice for people who explicitely set
+        * Don't show advice for people who explicitly set
         * push.default.
         */
        if (push_default == PUSH_DEFAULT_UNSPECIFIED)
index 18916e022a2189a477927f0f351f63dd3b6fe695..0df0b4d942c09769ff42539f6aaf83dcc31e20fb 100644 (file)
@@ -58,6 +58,21 @@ static void print_error_files(struct string_list *files_list,
        }
 }
 
+static void error_removing_concrete_submodules(struct string_list *files, int *errs)
+{
+       print_error_files(files,
+                         Q_("the following submodule (or one of its nested "
+                            "submodules)\n"
+                            "uses a .git directory:",
+                            "the following submodules (or one of its nested "
+                            "submodules)\n"
+                            "use a .git directory:", files->nr),
+                         _("\n(use 'rm -rf' if you really want to remove "
+                           "it including all of its history)"),
+                         errs);
+       string_list_clear(files, 0);
+}
+
 static int check_submodules_use_gitfiles(void)
 {
        int i;
@@ -86,16 +101,8 @@ static int check_submodules_use_gitfiles(void)
                if (!submodule_uses_gitfile(name))
                        string_list_append(&files, name);
        }
-       print_error_files(&files,
-                         Q_("the following submodule (or one of its nested "
-                            "submodules)\n uses a .git directory:",
-                            "the following submodules (or one of its nested "
-                            "submodules)\n use a .git directory:",
-                            files.nr),
-                         _("\n(use 'rm -rf' if you really want to remove "
-                           "it including all of its history)"),
-                         &errs);
-       string_list_clear(&files, 0);
+
+       error_removing_concrete_submodules(&files, &errs);
 
        return errs;
 }
@@ -237,17 +244,9 @@ static int check_local_mod(unsigned char *head, int index_only)
                            " or -f to force removal)"),
                          &errs);
        string_list_clear(&files_cached, 0);
-       print_error_files(&files_submodule,
-                         Q_("the following submodule (or one of its nested "
-                            "submodule)\nuses a .git directory:",
-                            "the following submodules (or one of its nested "
-                            "submodule)\nuse a .git directory:",
-                            files_submodule.nr),
-                         _("\n(use 'rm -rf' if you really "
-                           "want to remove it including all "
-                           "of its history)"),
-                         &errs);
-       string_list_clear(&files_submodule, 0);
+
+       error_removing_concrete_submodules(&files_submodule, &errs);
+
        print_error_files(&files_local,
                          Q_("the following file has local modifications:",
                             "the following files have local modifications:",
diff --git a/cache.h b/cache.h
index 3a69638bd919278468e579ca15efbd592eff1399..85b544f38d934fe68d1e155c86337f1400eea14d 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -491,7 +491,7 @@ extern void *read_blob_data_from_index(struct index_state *, const char *, unsig
 extern int ie_match_stat(const struct index_state *, const struct cache_entry *, struct stat *, unsigned int);
 extern int ie_modified(const struct index_state *, const struct cache_entry *, struct stat *, unsigned int);
 
-#define PATHSPEC_ONESTAR 1     /* the pathspec pattern sastisfies GFNM_ONESTAR */
+#define PATHSPEC_ONESTAR 1     /* the pathspec pattern satisfies GFNM_ONESTAR */
 
 struct pathspec {
        const char **raw; /* get_pathspec() result, not freed by free_pathspec() */
index 6dc06093d3c1eb6f3ab7a9cc79f0f192e16dc617..88525b37cf461ee922b81fd6848be5efc8e34542 100644 (file)
@@ -165,7 +165,7 @@ static struct lline *coalesce_lines(struct lline *base, int *lenbase,
 
        /*
         * Coalesce new lines into base by finding the LCS
-        * - Create the table to run dynamic programing
+        * - Create the table to run dynamic programming
         * - Compute the LCS
         * - Then reverse read the direction structure:
         *   - If we have MATCH, assign parent to base flag, and consume
index 7d481638af6878e3bdabfa145401c3b181758818..d4c8286470c1adef499ca30e9f57c7fe4b2be2da 100644 (file)
@@ -48,7 +48,7 @@ static void init_ ##slabname## _with_stride(struct slabname *s,               \
        if (!stride)                                                    \
                stride = 1;                                             \
        s->stride = stride;                                             \
-       elem_size = sizeof(struct slabname) * stride;                   \
+       elem_size = sizeof(elemtype) * stride;                          \
        s->slab_size = COMMIT_SLAB_SIZE / elem_size;                    \
        s->slab_count = 0;                                              \
        s->slab = NULL;                                                 \
@@ -72,11 +72,10 @@ static void clear_ ##slabname(struct slabname *s)                   \
 static elemtype *slabname## _at(struct slabname *s,                    \
                                const struct commit *c)                 \
 {                                                                      \
-       int nth_slab, nth_slot, ix;                                     \
+       int nth_slab, nth_slot;                                         \
                                                                        \
-       ix = c->index * s->stride;                                      \
-       nth_slab = ix / s->slab_size;                                   \
-       nth_slot = ix % s->slab_size;                                   \
+       nth_slab = c->index / s->slab_size;                             \
+       nth_slot = c->index % s->slab_size;                             \
                                                                        \
        if (s->slab_count <= nth_slab) {                                \
                int i;                                                  \
@@ -89,8 +88,8 @@ static elemtype *slabname## _at(struct slabname *s,                   \
        }                                                               \
        if (!s->slab[nth_slab])                                         \
                s->slab[nth_slab] = xcalloc(s->slab_size,               \
-                                           sizeof(**s->slab));         \
-       return &s->slab[nth_slab][nth_slot];                            \
+                                           sizeof(**s->slab) * s->stride);             \
+       return &s->slab[nth_slab][nth_slot * s->stride];                                \
 }                                                                      \
                                                                        \
 static int stat_ ##slabname## realloc
index e5862f6d7c813b4bcc5dd672383e56152ceb6f80..a575564a15c1c340b36d10c90da8fa343692264d 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -1416,7 +1416,7 @@ static int find_invalid_utf8(const char *buf, int len)
                if ((codepoint & 0x1ff800) == 0xd800)
                        return bad_offset;
                /* U+xxFFFE and U+xxFFFF are guaranteed non-characters. */
-               if ((codepoint & 0xffffe) == 0xfffe)
+               if ((codepoint & 0xfffe) == 0xfffe)
                        return bad_offset;
                /* So are anything in the range U+FDD0..U+FDEF. */
                if (codepoint >= 0xfdd0 && codepoint <= 0xfdef)
index 35cc4e266bd4afe0e00d2efb2781db2e95906936..d912a9d4ac3fe36b2e69d48b1725f01bdf289b26 100644 (file)
--- a/commit.h
+++ b/commit.h
@@ -102,8 +102,6 @@ struct pretty_print_context {
         * Fields below here are manipulated internally by pp_* functions and
         * should not be counted on by callers.
         */
-
-       /* Manipulated by the pp_* functions internally. */
        struct string_list in_body_headers;
 };
 
diff --git a/compat/cygwin.c b/compat/cygwin.c
deleted file mode 100644 (file)
index 91ce5d4..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-#define CYGWIN_C
-#define WIN32_LEAN_AND_MEAN
-#include <sys/stat.h>
-#include <sys/errno.h>
-#include "win32.h"
-#include "../git-compat-util.h"
-#include "../cache.h" /* to read configuration */
-
-/*
- * Return POSIX permission bits, regardless of core.ignorecygwinfstricks
- */
-int cygwin_get_st_mode_bits(const char *path, int *mode)
-{
-       struct stat st;
-       if (lstat(path, &st) < 0)
-               return -1;
-       *mode = st.st_mode;
-       return 0;
-}
-
-static inline void filetime_to_timespec(const FILETIME *ft, struct timespec *ts)
-{
-       long long winTime = ((long long)ft->dwHighDateTime << 32) +
-                       ft->dwLowDateTime;
-       winTime -= 116444736000000000LL; /* Windows to Unix Epoch conversion */
-       /* convert 100-nsecond interval to seconds and nanoseconds */
-       ts->tv_sec = (time_t)(winTime/10000000);
-       ts->tv_nsec = (long)(winTime - ts->tv_sec*10000000LL) * 100;
-}
-
-#define size_to_blocks(s) (((s)+511)/512)
-
-/* do_stat is a common implementation for cygwin_lstat and cygwin_stat.
- *
- * To simplify its logic, in the case of cygwin symlinks, this implementation
- * falls back to the cygwin version of stat/lstat, which is provided as the
- * last argument.
- */
-static int do_stat(const char *file_name, struct stat *buf, stat_fn_t cygstat)
-{
-       WIN32_FILE_ATTRIBUTE_DATA fdata;
-
-       if (file_name[0] == '/')
-               return cygstat (file_name, buf);
-
-       if (!(errno = get_file_attr(file_name, &fdata))) {
-               /*
-                * If the system attribute is set and it is not a directory then
-                * it could be a symbol link created in the nowinsymlinks mode.
-                * Normally, Cygwin works in the winsymlinks mode, so this situation
-                * is very unlikely. For the sake of simplicity of our code, let's
-                * Cygwin to handle it.
-                */
-               if ((fdata.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM) &&
-                   !(fdata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
-                       return cygstat(file_name, buf);
-
-               /* fill out the stat structure */
-               buf->st_dev = buf->st_rdev = 0; /* not used by Git */
-               buf->st_ino = 0;
-               buf->st_mode = file_attr_to_st_mode(fdata.dwFileAttributes);
-               buf->st_nlink = 1;
-               buf->st_uid = buf->st_gid = 0;
-#ifdef __CYGWIN_USE_BIG_TYPES__
-               buf->st_size = ((_off64_t)fdata.nFileSizeHigh << 32) +
-                       fdata.nFileSizeLow;
-#else
-               buf->st_size = (off_t)fdata.nFileSizeLow;
-#endif
-               buf->st_blocks = size_to_blocks(buf->st_size);
-               filetime_to_timespec(&fdata.ftLastAccessTime, &buf->st_atim);
-               filetime_to_timespec(&fdata.ftLastWriteTime, &buf->st_mtim);
-               filetime_to_timespec(&fdata.ftCreationTime, &buf->st_ctim);
-               return 0;
-       } else if (errno == ENOENT) {
-               /*
-                * In the winsymlinks mode (which is the default), Cygwin
-                * emulates symbol links using Windows shortcut files. These
-                * files are formed by adding .lnk extension. So, if we have
-                * not found the specified file name, it could be that it is
-                * a symbol link. Let's Cygwin to deal with that.
-                */
-               return cygstat(file_name, buf);
-       }
-       return -1;
-}
-
-/* We provide our own lstat/stat functions, since the provided Cygwin versions
- * of these functions are too slow. These stat functions are tailored for Git's
- * usage, and therefore they are not meant to be complete and correct emulation
- * of lstat/stat functionality.
- */
-static int cygwin_lstat(const char *path, struct stat *buf)
-{
-       return do_stat(path, buf, lstat);
-}
-
-static int cygwin_stat(const char *path, struct stat *buf)
-{
-       return do_stat(path, buf, stat);
-}
-
-
-/*
- * At start up, we are trying to determine whether Win32 API or cygwin stat
- * functions should be used. The choice is determined by core.ignorecygwinfstricks.
- * Reading this option is not always possible immediately as git_dir may
- * not be set yet. So until it is set, use cygwin lstat/stat functions.
- * However, if core.filemode is set, we must use the Cygwin posix
- * stat/lstat as the Windows stat functions do not determine posix filemode.
- *
- * Note that git_cygwin_config() does NOT call git_default_config() and this
- * is deliberate.  Many commands read from config to establish initial
- * values in variables and later tweak them from elsewhere (e.g. command line).
- * init_stat() is called lazily on demand, typically much late in the program,
- * and calling git_default_config() from here would break such variables.
- */
-static int native_stat = 1;
-static int core_filemode = 1; /* matches trust_executable_bit default */
-
-static int git_cygwin_config(const char *var, const char *value, void *cb)
-{
-       if (!strcmp(var, "core.ignorecygwinfstricks"))
-               native_stat = git_config_bool(var, value);
-       else if (!strcmp(var, "core.filemode"))
-               core_filemode = git_config_bool(var, value);
-       return 0;
-}
-
-static int init_stat(void)
-{
-       if (have_git_dir() && git_config(git_cygwin_config,NULL)) {
-               if (!core_filemode && native_stat) {
-                       cygwin_stat_fn = cygwin_stat;
-                       cygwin_lstat_fn = cygwin_lstat;
-               } else {
-                       cygwin_stat_fn = stat;
-                       cygwin_lstat_fn = lstat;
-               }
-               return 0;
-       }
-       return 1;
-}
-
-static int cygwin_stat_stub(const char *file_name, struct stat *buf)
-{
-       return (init_stat() ? stat : *cygwin_stat_fn)(file_name, buf);
-}
-
-static int cygwin_lstat_stub(const char *file_name, struct stat *buf)
-{
-       return (init_stat() ? lstat : *cygwin_lstat_fn)(file_name, buf);
-}
-
-stat_fn_t cygwin_stat_fn = cygwin_stat_stub;
-stat_fn_t cygwin_lstat_fn = cygwin_lstat_stub;
-
diff --git a/compat/cygwin.h b/compat/cygwin.h
deleted file mode 100644 (file)
index c04965a..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <sys/types.h>
-#include <sys/stat.h>
-
-typedef int (*stat_fn_t)(const char*, struct stat*);
-extern stat_fn_t cygwin_stat_fn;
-extern stat_fn_t cygwin_lstat_fn;
-int cygwin_get_st_mode_bits(const char *path, int *mode);
-
-#define get_st_mode_bits(p,m) cygwin_get_st_mode_bits((p),(m))
-#ifndef CYGWIN_C
-/* cygwin.c needs the original lstat() */
-#define stat(path, buf) (*cygwin_stat_fn)(path, buf)
-#define lstat(path, buf) (*cygwin_lstat_fn)(path, buf)
-#endif
index b45b91075966f450e221bb373ab79a311093284d..b27f51d4862c67f2dcc61c93f9e2db46f8e44bf6 100644 (file)
@@ -171,7 +171,6 @@ ifeq ($(uname_O),Cygwin)
        NO_FAST_WORKING_DIRECTORY = UnfortunatelyYes
        NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
        X = .exe
-       COMPAT_OBJS += compat/cygwin.o
        UNRELIABLE_FSTAT = UnfortunatelyYes
        SPARSE_FLAGS = -isystem /usr/include/w32api -Wno-one-bit-signed-bitfield
 endif
index 36b5665ff81af1d52be5e926b029452d3e838c35..befa0c39679aab55b5537b187ed0996914697f40 100755 (executable)
@@ -70,7 +70,7 @@
 
 # The template used to generate the XML messages to CIA.  You can make
 # visible changes to the IRC-bot notification lines by hacking this.
-# The default will produce a notfication line that looks like this:
+# The default will produce a notification line that looks like this:
 #
 # ${project}: ${author} ${repo}:${branch} * ${rev} ${files}: ${logmsg} ${url}
 #
index 3fbbc534ae668b979132f6df60c936314917d1f0..dfb71a1a15a8653152d8328e78695f58cf32c43d 100755 (executable)
@@ -39,7 +39,7 @@
 #       done
 #
 # The reason for the tac call is that git rev-list emits commits from
-# most recent to least - better to ship notifactions from oldest to newest.
+# most recent to least - better to ship notifications from oldest to newest.
 #
 # Configuration variables affecting this script:
 #
@@ -64,7 +64,7 @@
 # down. It is unknown whether this is still an issue in 2010, but
 # XML-RPC would be annoying to do from sh in any case. (XML-RPC does
 # have the advantage that it guarantees notification of multiple commits
-# shpped from an update in their actual order.)
+# shipped from an update in their actual order.)
 #
 
 # The project as known to CIA. You can set this with a -p option,
index cd509a5d63922e05d5c2f5239a8acdd7baab3047..5da920ecd9ec1b64760db863d266fdc9c47502de 100644 (file)
@@ -1958,7 +1958,6 @@ _git_config ()
                core.fileMode
                core.fsyncobjectfiles
                core.gitProxy
-               core.ignoreCygwinFSTricks
                core.ignoreStat
                core.ignorecase
                core.logAllRefUpdates
@@ -2581,7 +2580,7 @@ if [[ -n ${ZSH_VERSION-} ]]; then
                                --*=*|*.) ;;
                                *) c="$c " ;;
                                esac
-                               array+=("$c")
+                               array[$#array+1]="$c"
                        done
                        compset -P '*[=:]'
                        compadd -Q -S '' -p "${2-}" -a -- array && _ret=0
index 232625a7b72aef88ef9cc0285eb7208ce38a2138..60dec86d37efbffb557e611cde4bf2b2dbfbf478 100755 (executable)
@@ -225,7 +225,7 @@ def getgitenv(user, date):
     os.system('git ls-files -x .hg --deleted | git update-index --remove --stdin')
 
     # commit
-    os.system(getgitenv(user, date) + 'git commit --allow-empty -a -F %s' % filecomment)
+    os.system(getgitenv(user, date) + 'git commit --allow-empty --allow-empty-message -a -F %s' % filecomment)
     os.unlink(filecomment)
 
     # tag
index b50750565ff0499dcbdf2f2b9802f109a830d797..435b2dea293b01daaad83e6905148be2256c02df 100644 (file)
@@ -30,6 +30,7 @@ $(GIT_SUBTREE): $(GIT_SUBTREE_SH)
 doc: $(GIT_SUBTREE_DOC)
 
 install: $(GIT_SUBTREE)
+       $(INSTALL) -d -m 755 $(DESTDIR)$(libexecdir)
        $(INSTALL) -m 755 $(GIT_SUBTREE) $(DESTDIR)$(libexecdir)
 
 install-doc: install-man
index 51ae932e5edc54db32fca93e8f6f8aca1bea32f4..7d7af03274ee0759c9e915a6ea7b52ecce65cf55 100755 (executable)
@@ -311,7 +311,7 @@ copy_commit()
                        GIT_COMMITTER_NAME \
                        GIT_COMMITTER_EMAIL \
                        GIT_COMMITTER_DATE
-               (echo -n "$annotate"; cat ) |
+               (printf "%s" "$annotate"; cat ) |
                git commit-tree "$2" $3  # reads the rest of stdin
        ) || die "Can't copy commit $1"
 }
index 7ba853eeda96ec9a4b4a3b4ebb8c88dda055c67d..e0957eee55d7fb4a530717d1ced39bcabb2057b2 100644 (file)
@@ -270,7 +270,7 @@ git-extensions repository in ~/git-extensions/:
 name
 
 You can omit the --squash flag, but doing so will increase the number
-of commits that are incldued in your local repository.
+of commits that are included in your local repository.
 
 We now have a ~/git-extensions/git-subtree directory containing code
 from the master branch of git://github.com/apenwarr/git-subtree.git
index b0f8536fca58d910f85334727b89925651bfa8ae..66ce4b07c2dc2d2d56dc260883f86d8672d2ac69 100755 (executable)
@@ -182,9 +182,9 @@ test_expect_success 'merge new subproj history into subdir' '
 test_expect_success 'Check that prefix argument is required for split' '
         echo "You must provide the --prefix option." > expected &&
         test_must_fail git subtree split > actual 2>&1 &&
-        test_debug "echo -n expected: " &&
+       test_debug "printf '"'"'expected: '"'"'" &&
         test_debug "cat expected" &&
-        test_debug "echo -n actual: " &&
+       test_debug "printf '"'"'actual: '"'"'" &&
         test_debug "cat actual" &&
         test_cmp expected actual &&
         rm -f expected actual
@@ -193,9 +193,9 @@ test_expect_success 'Check that prefix argument is required for split' '
 test_expect_success 'Check that the <prefix> exists for a split' '
         echo "'"'"'non-existent-directory'"'"'" does not exist\; use "'"'"'git subtree add'"'"'" > expected &&
         test_must_fail git subtree split --prefix=non-existent-directory > actual 2>&1 &&
-        test_debug "echo -n expected: " &&
+       test_debug "printf '"'"'expected: '"'"'" &&
         test_debug "cat expected" &&
-        test_debug "echo -n actual: " &&
+       test_debug "printf '"'"'actual: '"'"'" &&
         test_debug "cat actual" &&
         test_cmp expected actual
 #        rm -f expected actual
index cc4ba4d18f15f72a7e7d2d12e2fa7b51f6a2a3e1..115cb1da42cc314f75a5b032d90798e5a2ce68c5 100644 (file)
 #include <poll.h>
 #endif
 
-extern int get_st_mode_bits(const char *path, int *mode);
-
 #if defined(__MINGW32__)
 /* pull in Windows compatibility stuff */
 #include "compat/mingw.h"
@@ -171,7 +169,6 @@ typedef unsigned long uintptr_t;
 #undef _XOPEN_SOURCE
 #include <grp.h>
 #define _XOPEN_SOURCE 600
-#include "compat/cygwin.h"
 #else
 #undef _ALL_SOURCE /* AIX 5.3L defines a struct list with _ALL_SOURCE. */
 #include <grp.h>
index 6a721064c288609fde50fc84e963519ceb00723e..feee6a4a0d3a970c94fe506070ddc497c4b40658 100644 (file)
@@ -144,7 +144,7 @@ setup_user_tool () {
 setup_tool () {
        tool="$1"
 
-       # Fallback definitions, to be overriden by tools.
+       # Fallback definitions, to be overridden by tools.
        can_merge () {
                return 0
        }
index 88fcf232e5739b14a60f8b2c2a45add4a48e764b..31e71ff8b248339749bbcd045acdf602a1a21463 100755 (executable)
--- a/git-p4.py
+++ b/git-p4.py
@@ -1786,7 +1786,7 @@ def run(self, args):
             missingGitTags = gitTags - p4Labels
             self.exportGitTags(missingGitTags)
 
-        # exit with error unless everything applied perfecly
+        # exit with error unless everything applied perfectly
         if len(commits) != len(applied):
                 sys.exit(1)
 
index 0039ecfb407960444c31d48767b65cf773a3243a..8d7659a22c253b9f9535aee38e3bf0ce380cef75 100755 (executable)
@@ -159,7 +159,7 @@ finish_rebase () {
                        die "$(eval_gettext "Cannot store \$stash_sha1")"
                        gettext 'Applying autostash resulted in conflicts.
 Your changes are safe in the stash.
-You can run "git stash pop" or "git stash drop" it at any time.
+You can run "git stash pop" or "git stash drop" at any time.
 '
                fi
        fi
diff --git a/help.c b/help.c
index 08c54ef1c1669edce960c52948b80340c36eb119..f068925bb7f26055fb699cda7173a0c06ac46a22 100644 (file)
--- a/help.c
+++ b/help.c
@@ -107,10 +107,7 @@ static int is_executable(const char *name)
            !S_ISREG(st.st_mode))
                return 0;
 
-#if defined(GIT_WINDOWS_NATIVE) || defined(__CYGWIN__)
-#if defined(__CYGWIN__)
-if ((st.st_mode & S_IXUSR) == 0)
-#endif
+#if defined(GIT_WINDOWS_NATIVE)
 {      /* cannot trust the executable bit, peek into the file instead */
        char buf[3] = { 0 };
        int n;
diff --git a/notes.h b/notes.h
index 3324c486a1a106053621ff215f5689cf1d92af74..2a3f92338076ef8e4b8238aaf570c3273b0f28f0 100644 (file)
--- a/notes.h
+++ b/notes.h
@@ -77,7 +77,7 @@ const char *default_notes_ref(void);
  * variable is used, and if that is missing, the default notes ref is used
  * ("refs/notes/commits").
  *
- * If you need to re-intialize a notes_tree structure (e.g. when switching from
+ * If you need to re-initialize a notes_tree structure (e.g. when switching from
  * one notes ref to another), you must first de-initialize the notes_tree
  * structure by calling free_notes(struct notes_tree *).
  *
diff --git a/path.c b/path.c
index 7f3324aeea8050c082f9bb52d769301cdede4805..3d244d3e03ae5c3d5afe452f903ba204849ad03b 100644 (file)
--- a/path.c
+++ b/path.c
@@ -5,13 +5,7 @@
 #include "strbuf.h"
 #include "string-list.h"
 
-#ifndef get_st_mode_bits
-/*
- * The replacement lstat(2) we use on Cygwin is incomplete and
- * may return wrong permission bits. Most of the time we do not care,
- * but the callsites of this wrapper do care.
- */
-int get_st_mode_bits(const char *path, int *mode)
+static int get_st_mode_bits(const char *path, int *mode)
 {
        struct stat st;
        if (lstat(path, &st) < 0)
@@ -19,7 +13,6 @@ int get_st_mode_bits(const char *path, int *mode)
        *mode = st.st_mode;
        return 0;
 }
-#endif
 
 static char bad_path[] = "/bad-path/";
 
index d4474eab7b6f9ffbfb4e7da23d284c936f488276..c3d5e3543fae75c81a7a0a00c48bb0076675a2f1 100644 (file)
@@ -489,7 +489,7 @@ int remove_index_entry_at(struct index_state *istate, int pos)
 }
 
 /*
- * Remove all cache ententries marked for removal, that is where
+ * Remove all cache entries marked for removal, that is where
  * CE_REMOVE is set in ce_flags.  This is much more effective than
  * calling remove_index_entry_at() for each entry to be removed.
  */
@@ -1760,7 +1760,7 @@ static int has_racy_timestamp(struct index_state *istate)
 }
 
 /*
- * Opportunisticly update the index but do not complain if we can't
+ * Opportunistically update the index but do not complain if we can't
  */
 void update_index_if_able(struct index_state *istate, struct lock_file *lockfile)
 {
diff --git a/refs.c b/refs.c
index a3f2302292190b147a1cee092a26d47ace7a1228..7b08a37153457d335ecf676a73252aa5bdbee4fb 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -634,7 +634,9 @@ struct ref_entry_cb {
 static int do_one_ref(struct ref_entry *entry, void *cb_data)
 {
        struct ref_entry_cb *data = cb_data;
+       struct ref_entry *old_current_ref;
        int retval;
+
        if (prefixcmp(entry->name, data->base))
                return 0;
 
@@ -642,10 +644,12 @@ static int do_one_ref(struct ref_entry *entry, void *cb_data)
              !ref_resolves_to_object(entry))
                return 0;
 
+       /* Store the old value, in case this is a recursive call: */
+       old_current_ref = current_ref;
        current_ref = entry;
        retval = data->fn(entry->name + data->trim, entry->u.value.sha1,
                          entry->flag, data->cb_data);
-       current_ref = NULL;
+       current_ref = old_current_ref;
        return retval;
 }
 
index 1d210e32012ab96f03590fa0be1bd64c1e2b7605..852dd951dc2d93660727de23ea9467503288e25b 100644 (file)
@@ -445,7 +445,7 @@ static int get_sha1_basic(const char *str, int len, unsigned char *sha1)
        "\n"
        "where \"$br\" is somehow empty and a 40-hex ref is created. Please\n"
        "examine these refs and maybe delete them. Turn this message off by\n"
-       "running \"git config advice.object_name_warning false\"");
+       "running \"git config advice.objectNameWarning false\"");
        unsigned char tmp_sha1[20];
        char *real_ref = NULL;
        int refs_found = 0;
index ae2dc4604f708d320d88d4f99ca9d575d88b6124..9e381e000f6cbece882dec43d2a3dbab3d18a983 100644 (file)
@@ -36,7 +36,7 @@ EOF
 
        # You can set the GITWEB_TEST_INSTALLED environment variable to
        # the gitwebdir (the directory where gitweb is installed / deployed to)
-       # of an existing gitweb instalation to test that installation,
+       # of an existing gitweb installation to test that installation,
        # or simply to pathname of installed gitweb script.
        if test -n "$GITWEB_TEST_INSTALLED" ; then
                if test -d $GITWEB_TEST_INSTALLED; then
index 4ffd90127edb360142e492f6562c3c15c002d286..3f2d873fec9ed9e98b787cd708cd9e8e816e7573 100644 (file)
@@ -34,7 +34,7 @@ save_tag () {
        mv sed.script.tmp sed.script
 }
 
-# Replace unhelpful sha1 hashses with their symbolic equivalents
+# Replace unhelpful sha1 hashes with their symbolic equivalents
 entag () {
        sed -f sed.script
 }
index c61d5351e1ff0b1b4431eb28553d0d882ebe7451..f4eecaa17110c2974cfdedab90db4604b6923443 100644 (file)
@@ -161,7 +161,7 @@ test_perf () {
                echo "$test_count" >>"$perf_results_dir"/$base.subtests
                echo "$1" >"$perf_results_dir"/$base.$test_count.descr
                if test -z "$verbose"; then
-                       echo -n "perf $test_count - $1:"
+                       printf "%s" "perf $test_count - $1:"
                else
                        echo "perf $test_count - $1:"
                fi
@@ -170,7 +170,7 @@ test_perf () {
                        if test_run_perf_ "$2"
                        then
                                if test -z "$verbose"; then
-                                       echo -n " $i"
+                                       printf " %s" "$i"
                                else
                                        echo "* timing run $i/$GIT_PERF_REPEAT_COUNT:"
                                fi
index d499d02a29f3ec5fb15d86835d24ccabd322df56..4e911fb43d8ea2c699b3a836547b618274db6e05 100755 (executable)
@@ -78,13 +78,6 @@ $content"
        echo $sha1 | git cat-file --batch-check="%(objecttype) %(objectname)" >actual &&
        test_cmp expect actual
     '
-
-    test_expect_success '--batch-check with %(rest)' '
-       echo "$type this is some extra content" >expect &&
-       echo "$sha1    this is some extra content" |
-               git cat-file --batch-check="%(objecttype) %(rest)" >actual &&
-       test_cmp expect actual
-    '
 }
 
 hello_content="Hello World"
index 38b00c37b0606a5442f2dce02647a019f0c80c9e..4bf1dbe9c9f3ffeb1151be07bf75dcd872167916 100755 (executable)
@@ -34,9 +34,9 @@ test_expect_success 'no encoding header for base case' '
        test z = "z$E"
 '
 
-test_expect_failure 'UTF-16 refused because of NULs' '
+test_expect_success 'UTF-16 refused because of NULs' '
        echo UTF-16 >F &&
-       git commit -a -F "$TEST_DIRECTORY"/t3900/UTF-16.txt
+       test_must_fail git commit -a -F "$TEST_DIRECTORY"/t3900/UTF-16.txt
 '
 
 test_expect_success 'UTF-8 invalid characters refused' '
diff --git a/t/t3900/UTF-16.txt b/t/t3900/UTF-16.txt
new file mode 100644 (file)
index 0000000..2257f05
Binary files /dev/null and b/t/t3900/UTF-16.txt differ
index 4e6055d06af2042e6bc6c1467d58680668c12881..3ae394e934d972d29286ecd25596eedd45bee902 100755 (executable)
@@ -17,7 +17,7 @@ test_expect_success 'setup' '
 
 '
 
-test_expect_success 'git clean -i (clean)' '
+test_expect_success 'git clean -i (c: clean hotkey)' '
 
        mkdir -p build docs &&
        touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
@@ -38,12 +38,33 @@ test_expect_success 'git clean -i (clean)' '
 
 '
 
+test_expect_success 'git clean -i (cl: clean prefix)' '
+
+       mkdir -p build docs &&
+       touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
+       docs/manual.txt obj.o build/lib.so &&
+       echo cl | git clean -i &&
+       test -f Makefile &&
+       test -f README &&
+       test -f src/part1.c &&
+       test -f src/part2.c &&
+       test ! -f a.out &&
+       test -f docs/manual.txt &&
+       test ! -f src/part3.c &&
+       test ! -f src/part3.h &&
+       test ! -f src/part4.c &&
+       test ! -f src/part4.h &&
+       test -f obj.o &&
+       test -f build/lib.so
+
+'
+
 test_expect_success 'git clean -i (quit)' '
 
        mkdir -p build docs &&
        touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
        docs/manual.txt obj.o build/lib.so &&
-       echo q | git clean -i &&
+       echo quit | git clean -i &&
        test -f Makefile &&
        test -f README &&
        test -f src/part1.c &&
@@ -256,6 +277,21 @@ test_expect_success 'git clean -id (select - number 3)' '
 
 '
 
+test_expect_success 'git clean -id (select - filenames)' '
+
+       mkdir -p build docs &&
+       touch a.out foo.txt bar.txt baz.txt &&
+       (echo s; echo a.out fo ba bar; echo; echo c) | \
+       git clean -id &&
+       test -f Makefile &&
+       test ! -f a.out &&
+       test ! -f foo.txt &&
+       test ! -f bar.txt &&
+       test -f baz.txt &&
+       rm baz.txt
+
+'
+
 test_expect_success 'git clean -id (select - range)' '
 
        mkdir -p build docs &&
index 25dac798894f6a3cb4b62c8b9ba944bfc1d82d9f..830a4c3e9dffc7963dda03139be6c4e66fddf10f 100755 (executable)
@@ -109,7 +109,7 @@ test_expect_success 'setup conflicted merge' '
 '
 
 # First do the merge with resolve and recursive then verify that
-# recusive is chosen.
+# recursive is chosen.
 
 test_expect_success 'merge picks up the best result' '
        git config --unset-all pull.twohead &&
index d9f6b73ab001c4105cf336e213978807d8acf864..4d81ba1c2c43bfe14cb329967ccf2c97b90a4848 100755 (executable)
@@ -24,7 +24,7 @@ init_git () {
        rm -fr .git &&
        git init &&
        #git remote add svnsim testsvn::sim:///$TEST_DIRECTORY/t9020/example.svnrdump
-       # let's reuse an exisiting dump file!?
+       # let's reuse an existing dump file!?
        git remote add svnsim testsvn::sim://$TEST_DIRECTORY/t9154/svn.dump
        git remote add svnfile testsvn::file://$TEST_DIRECTORY/t9154/svn.dump
 }
index a61d6716d294a460c195ca36d33a9bed17aa5e33..9861c719f8c5e3fbe5b626e5fdf1ebf83156086c 100755 (executable)
@@ -7,7 +7,7 @@ test_description='test that git handles an svn repository with missing md5sums'
 # Loading a node from a svn dumpfile without a Text-Content-Length
 # field causes svn to neglect to store or report an md5sum.  (it will
 # calculate one if you had put Text-Content-Length: 0).  This showed
-# up in a repository creted with cvs2svn.
+# up in a repository created with cvs2svn.
 
 cat > dumpfile.svn <<EOF
 SVN-fs-dump-format-version: 1
index b0d1d94bf417a7c3cdd4f1b07334416aacbee18d..a82744bab072114675dea66fa94f21f661aa8dbd 100755 (executable)
@@ -28,7 +28,7 @@ test_expect_success 'p4 client newlines, unix' '
                test_cmp f-unix-orig f-unix &&
 
                # make sure stored in repo as unix newlines
-               # use sed to eat python-appened newline
+               # use sed to eat python-appended newline
                p4 -G print //depot/f-unix | marshal_dump data 2 |\
                    sed \$d >f-unix-p4-print &&
                test_cmp f-unix-orig f-unix-p4-print &&
index 45a35df66e09984c6db9fb86a35ece552a1cbcb1..63cabc37e37dd338d3d9ee0764f099840d937600 100644 (file)
@@ -1132,7 +1132,7 @@ static void *udt_copy_task_routine(void *udt)
 #ifndef NO_PTHREADS
 
 /*
- * Join thread, with apporiate errors on failure. Name is name for the
+ * Join thread, with appropriate errors on failure. Name is name for the
  * thread (for error messages). Returns 0 on success, 1 on failure.
  */
 static int tloop_join(pthread_t thread, const char *name)
@@ -1198,7 +1198,7 @@ static void udt_kill_transfer(struct unidirectional_transfer *t)
 }
 
 /*
- * Join process, with apporiate errors on failure. Name is name for the
+ * Join process, with appropriate errors on failure. Name is name for the
  * process (for error messages). Returns 0 on success, 1 on failure.
  */
 static int tloop_join(pid_t pid, const char *name)