]> asedeno.scripts.mit.edu Git - git.git/commitdiff
Merge branch 'jc/clean-fix'
authorJunio C Hamano <gitster@pobox.com>
Fri, 7 Dec 2007 07:43:35 +0000 (23:43 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 7 Dec 2007 07:43:35 +0000 (23:43 -0800)
* jc/clean-fix:
  t7300: add test for clean with wildcard pathspec
  git-clean: Honor pathspec.

Documentation/SubmittingPatches
Documentation/git-status.txt
Makefile
builtin-for-each-ref.c
config.mak.in
configure.ac
contrib/hg-to-git/hg-to-git.py
ident.c
t/t6300-for-each-ref.sh
transport.c

index 83bf54c7ac153b7010dcecc34d28c05dc68c10b6..de08d094e3e3683913bac49f643bb6b49fbec04d 100644 (file)
@@ -10,7 +10,7 @@ Checklist (and a short version for the impatient):
        - the first line of the commit message should be a short
          description and should skip the full stop
        - if you want your work included in git.git, add a
-         "Signed-off-by: Your Name <your@email.com>" line to the
+         "Signed-off-by: Your Name <you@example.com>" line to the
          commit message (or just use the option "-s" when
          committing) to confirm that you agree to the Developer's
          Certificate of Origin
index 8fd0fc62368611bee25b4bbc3becef853937ff2c..b0cb6bc8b74158f3c9012b6f2d0f10f8f9e5bae9 100644 (file)
@@ -40,6 +40,10 @@ OUTPUT
 The output from this command is designed to be used as a commit
 template comments, and all the output lines are prefixed with '#'.
 
+The paths mentioned in the output, unlike many other git commands, are
+made relative to the current directory, if you are working in a
+subdirectory (this is on purpose, to help cutting and pasting).
+
 
 CONFIGURATION
 -------------
index 999391e10b9949ea9c4cb0e71d98bf6d72ee47af..4dda3405bb6d456e8f4910e834affc6a82827f77 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -406,7 +406,9 @@ endif
 ifeq ($(uname_S),Darwin)
        NEEDS_SSL_WITH_CRYPTO = YesPlease
        NEEDS_LIBICONV = YesPlease
-       OLD_ICONV = UnfortunatelyYes
+       ifneq ($(shell expr "$(uname_R)" : '9\.'),2)
+               OLD_ICONV = UnfortunatelyYes
+       endif
        NO_STRLCPY = YesPlease
        NO_MEMMEM = YesPlease
 endif
index daf3a081650b6b39fe18f0fab61fa8b3f6c8be0f..f36a43c26459bd386618e551e2e93743cd8030aa 100644 (file)
@@ -13,8 +13,8 @@
 #define QUOTE_NONE 0
 #define QUOTE_SHELL 1
 #define QUOTE_PERL 2
-#define QUOTE_PYTHON 3
-#define QUOTE_TCL 4
+#define QUOTE_PYTHON 4
+#define QUOTE_TCL 8
 
 typedef enum { FIELD_STR, FIELD_ULONG, FIELD_TIME } cmp_type;
 
@@ -861,7 +861,7 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix)
                usage_with_options(for_each_ref_usage, opts);
        }
        if (HAS_MULTI_BITS(quote_style)) {
-               error("more than one quoting style ?");
+               error("more than one quoting style?");
                usage_with_options(for_each_ref_usage, opts);
        }
        if (verify_format(format))
index 11d256e9cf5b51154a3bf0084f9e3bcea5702352..7d5df9bf3c5dc898a68b538bae55f3d44dbc01ff 100644 (file)
@@ -41,4 +41,5 @@ NO_STRTOUMAX=@NO_STRTOUMAX@
 NO_SETENV=@NO_SETENV@
 NO_MKDTEMP=@NO_MKDTEMP@
 NO_ICONV=@NO_ICONV@
+OLD_ICONV=@OLD_ICONV@
 NO_DEFLATE_BOUND=@NO_DEFLATE_BOUND@
index 5f8a15b9f9580bea6f350e8af468f81cf2535c9e..dd4b4eb9822f131f0efc746013a803c4adba02d2 100644 (file)
@@ -212,6 +212,28 @@ test -n "$NEEDS_SOCKET" && LIBS="$LIBS -lsocket"
 
 
 ## Checks for header files.
+AC_MSG_NOTICE([CHECKS for header files])
+#
+# Define OLD_ICONV if your library has an old iconv(), where the second
+# (input buffer pointer) parameter is declared with type (const char **).
+AC_DEFUN([OLDICONVTEST_SRC], [[
+#include <iconv.h>
+
+extern size_t iconv(iconv_t cd,
+                   char **inbuf, size_t *inbytesleft,
+                   char **outbuf, size_t *outbytesleft);
+
+int main(void)
+{
+       return 0;
+}
+]])
+AC_MSG_CHECKING([for old iconv()])
+AC_COMPILE_IFELSE(OLDICONVTEST_SRC,
+       [AC_MSG_RESULT([no])],
+       [AC_MSG_RESULT([yes])
+       OLD_ICONV=UnfortunatelyYes])
+AC_SUBST(OLD_ICONV)
 
 
 ## Checks for typedefs, structures, and compiler characteristics.
index 7a1c3e497f00fd886a0602551bfa933931a995be..9befb92c410794a3e81cc571b82f9f35e0def091 100755 (executable)
@@ -211,7 +211,7 @@ for cset in range(int(tip) + 1):
     os.system('git-ls-files -x .hg --deleted | git-update-index --remove --stdin')
 
     # commit
-    os.system(getgitenv(user, date) + 'git-commit -a -F %s' % filecomment)
+    os.system(getgitenv(user, date) + 'git commit --allow-empty -a -F %s' % filecomment)
     os.unlink(filecomment)
 
     # tag
diff --git a/ident.c b/ident.c
index 07b4998f71670f17d4972f8e7940d18091f56921..7631698f27a8e1685614c233037eb067eef65168 100644 (file)
--- a/ident.c
+++ b/ident.c
@@ -175,7 +175,7 @@ static const char *env_hint =
 "\n"
 "Run\n"
 "\n"
-"  git config --global user.email \"you@email.com\"\n"
+"  git config --global user.email \"you@example.com\"\n"
 "  git config --global user.name \"Your Name\"\n"
 "\n"
 "to set your account\'s default identity.\n"
index c722635050fed8011c04177dc5a8220cae12a843..8a23aaf21b1977fab66aa2989cac56635251ecb6 100755 (executable)
@@ -169,5 +169,44 @@ test_expect_success 'Verify descending sort' '
        git diff expected actual
 '
 
+cat >expected <<\EOF
+'refs/heads/master'
+'refs/tags/testtag'
+EOF
+
+test_expect_success 'Quoting style: shell' '
+       git for-each-ref --shell --format="%(refname)" >actual &&
+       git diff expected actual
+'
+
+test_expect_success 'Quoting style: perl' '
+       git for-each-ref --perl --format="%(refname)" >actual &&
+       git diff expected actual
+'
+
+test_expect_success 'Quoting style: python' '
+       git for-each-ref --python --format="%(refname)" >actual &&
+       git diff expected actual
+'
+
+cat >expected <<\EOF
+"refs/heads/master"
+"refs/tags/testtag"
+EOF
+
+test_expect_success 'Quoting style: tcl' '
+       git for-each-ref --tcl --format="%(refname)" >actual &&
+       git diff expected actual
+'
+
+for i in "--perl --shell" "-s --python" "--python --tcl" "--tcl --perl"; do
+       test_expect_success "more than one quoting style: $i" "
+               git for-each-ref $i 2>&1 | (read line &&
+               case \$line in
+               \"error: more than one quoting style\"*) : happy;;
+               *) false
+               esac)
+       "
+done
 
 test_done
index 3eb93b4875ed0e4884088565a0faa45cc3d287e3..58e66f6c11798dac416941ce5ad3dbae91c31a06 100644 (file)
@@ -659,7 +659,7 @@ static int fetch_refs_via_pack(struct transport *transport,
        free(heads);
        free_refs(refs);
        free(dest);
-       return 0;
+       return (refs ? 0 : -1);
 }
 
 static int git_transport_push(struct transport *transport, int refspec_nr, const char **refspec, int flags)