[[PATCH v2]] git-send-email: Added the ability to query the number of smtp password questions
From: Silvio F silvio.fri...@gmail.com With this patch git-send-mail ask a configurable number of questions to input the smtp password. Without this patch we have only one trial. Signed-off-by: Silvio F silvio.fri...@gmail.com --- Documentation/git-send-email.txt | 4 git-send-email.perl | 32 +--- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt index f0e57a5..ac993d6 100644 --- a/Documentation/git-send-email.txt +++ b/Documentation/git-send-email.txt @@ -364,6 +364,10 @@ sendemail.confirm:: one of 'always', 'never', 'cc', 'compose', or 'auto'. See '--confirm' in the previous section for the meaning of these values. +sendmail.askpasswordcount:: + Number of times the smtp password can be entered before sending mail is + aborted. Default is 1. + EXAMPLE --- Use gmail as the smtp server diff --git a/git-send-email.perl b/git-send-email.perl index 3782c3b..aeb2e6d 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -203,6 +203,7 @@ my ($validate, $confirm); my (@suppress_cc); my ($auto_8bit_encoding); my ($compose_encoding); +my ($askpasswordcount) = 1; my ($debug_net_smtp) = 0; # Net::SMTP, see send_message() @@ -237,6 +238,7 @@ my %config_settings = ( from = \$sender, assume8bitencoding = \$auto_8bit_encoding, composeencoding = \$compose_encoding, +askpasswordcount = \$askpasswordcount ); my %config_path_settings = ( @@ -360,6 +362,10 @@ sub read_config { } } + if ($askpasswordcount 1) { + $askpasswordcount = 1; + } + if (!defined $smtp_encryption) { my $enc = Git::config(@repo, $prefix.smtpencryption); if (defined $enc) { @@ -1069,17 +1075,21 @@ sub smtp_auth_maybe { # TODO: Authentication may fail not because credentials were # invalid but due to other reasons, in which we should not # reject credentials. - $auth = Git::credential({ - 'protocol' = 'smtp', - 'host' = smtp_host_string(), - 'username' = $smtp_authuser, - # if there's no password, git credential fill will - # give us one, otherwise it'll just pass this one. - 'password' = $smtp_authpass - }, sub { - my $cred = shift; - return !!$smtp-auth($cred-{'username'}, $cred-{'password'}); - }); + for my $i (1 .. $askpasswordcount) { + $auth = Git::credential({ + 'protocol' = 'smtp', + 'host' = smtp_host_string(), + 'username' = $smtp_authuser, + # if there's no password, git credential fill will + # give us one, otherwise it'll just pass this one. + 'password' = $smtp_authpass + }, sub { + my $cred = shift; + return !!$smtp-auth($cred-{'username'}, $cred-{'password'}); + }); + + last if ($auth); + } return $auth; } -- 1.8.4.2 -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[RFC/PATCH 1/4] repo-config: remove deprecated alias for git config
The release notes for Git 1.5.4 say that git repo-config will be removed in the next feature release. Since Git 2.0 is nearly here, remove it. Signed-off-by: John Keeping j...@keeping.me.uk --- .gitignore | 1 - Documentation/git-repo-config.txt | 23 --- Makefile | 1 - builtin.h | 1 - builtin/config.c | 6 -- command-list.txt | 1 - contrib/completion/git-completion.bash | 1 - contrib/examples/git-whatchanged.sh| 4 ++-- git.c | 1 - 9 files changed, 2 insertions(+), 37 deletions(-) delete mode 100644 Documentation/git-repo-config.txt diff --git a/.gitignore b/.gitignore index 66199ed..3bc1b08 100644 --- a/.gitignore +++ b/.gitignore @@ -131,7 +131,6 @@ /git-remote-testsvn /git-repack /git-replace -/git-repo-config /git-request-pull /git-rerere /git-reset diff --git a/Documentation/git-repo-config.txt b/Documentation/git-repo-config.txt deleted file mode 100644 index 9ec115b..000 --- a/Documentation/git-repo-config.txt +++ /dev/null @@ -1,23 +0,0 @@ -git-repo-config(1) -== - -NAME - -git-repo-config - Get and set repository or global options - - -SYNOPSIS - -[verse] -'git repo-config' ... - - -DESCRIPTION - -This is a synonym for linkgit:git-config[1]. Please refer to the -documentation of that command. - -GIT -Part of the linkgit:git[1] suite diff --git a/Makefile b/Makefile index af847f8..4fc2378 100644 --- a/Makefile +++ b/Makefile @@ -591,7 +591,6 @@ BUILT_INS += git-get-tar-commit-id$X BUILT_INS += git-init$X BUILT_INS += git-merge-subtree$X BUILT_INS += git-peek-remote$X -BUILT_INS += git-repo-config$X BUILT_INS += git-show$X BUILT_INS += git-stage$X BUILT_INS += git-status$X diff --git a/builtin.h b/builtin.h index b56cf07..d4afbfe 100644 --- a/builtin.h +++ b/builtin.h @@ -103,7 +103,6 @@ extern int cmd_remote(int argc, const char **argv, const char *prefix); extern int cmd_remote_ext(int argc, const char **argv, const char *prefix); extern int cmd_remote_fd(int argc, const char **argv, const char *prefix); extern int cmd_repack(int argc, const char **argv, const char *prefix); -extern int cmd_repo_config(int argc, const char **argv, const char *prefix); extern int cmd_rerere(int argc, const char **argv, const char *prefix); extern int cmd_reset(int argc, const char **argv, const char *prefix); extern int cmd_rev_list(int argc, const char **argv, const char *prefix); diff --git a/builtin/config.c b/builtin/config.c index 20e89fe..92ebf23 100644 --- a/builtin/config.c +++ b/builtin/config.c @@ -671,9 +671,3 @@ int cmd_config(int argc, const char **argv, const char *prefix) return 0; } - -int cmd_repo_config(int argc, const char **argv, const char *prefix) -{ - fprintf(stderr, WARNING: git repo-config is deprecated in favor of git config.\n); - return cmd_config(argc, argv, prefix); -} diff --git a/command-list.txt b/command-list.txt index 08b04e2..f2bf684 100644 --- a/command-list.txt +++ b/command-list.txt @@ -102,7 +102,6 @@ git-relink ancillarymanipulators git-remote ancillarymanipulators git-repack ancillarymanipulators git-replace ancillarymanipulators -git-repo-config ancillarymanipulators deprecated git-request-pullforeignscminterface git-rerere ancillaryinterrogators git-reset mainporcelain common diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index dba3c15..c6063c9 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -694,7 +694,6 @@ __git_list_porcelain_commands () read-tree): plumbing;; receive-pack) : plumbing;; remote-*) : transport;; - repo-config) : deprecated;; rerere) : plumbing;; rev-list) : plumbing;; rev-parse): plumbing;; diff --git a/contrib/examples/git-whatchanged.sh b/contrib/examples/git-whatchanged.sh index 1fb9feb..2edbdc6 100755 --- a/contrib/examples/git-whatchanged.sh +++ b/contrib/examples/git-whatchanged.sh @@ -9,12 +9,12 @@ case $0 in *whatchanged) count= test -z $diff_tree_flags - diff_tree_flags=$(git-repo-config --get whatchanged.difftree) + diff_tree_flags=$(git config --get whatchanged.difftree) diff_tree_default_flags='-c -M --abbrev' ;; *show) count=-n1 test -z $diff_tree_flags - diff_tree_flags=$(git-repo-config --get show.difftree) + diff_tree_flags=$(git config --get
[RFC/PATCH 3/4] lost-found: remove deprecated command
git lost-found has been deprecated since commit fc8b5f0 (Deprecate git-lost-found, 2007-11-08), included in version 1.5.4. Signed-off-by: John Keeping j...@keeping.me.uk --- .gitignore | 1 - Documentation/git-lost-found.txt | 74 -- Makefile | 1 - command-list.txt | 1 - contrib/completion/git-completion.bash | 1 - git-lost-found.sh | 33 --- 6 files changed, 111 deletions(-) delete mode 100644 Documentation/git-lost-found.txt delete mode 100755 git-lost-found.sh diff --git a/.gitignore b/.gitignore index 88b313a..c141b2a 100644 --- a/.gitignore +++ b/.gitignore @@ -75,7 +75,6 @@ /git-init-db /git-instaweb /git-log -/git-lost-found /git-ls-files /git-ls-remote /git-ls-tree diff --git a/Documentation/git-lost-found.txt b/Documentation/git-lost-found.txt deleted file mode 100644 index d549328..000 --- a/Documentation/git-lost-found.txt +++ /dev/null @@ -1,74 +0,0 @@ -git-lost-found(1) -= - -NAME - -git-lost-found - Recover lost refs that luckily have not yet been pruned - -SYNOPSIS - -[verse] -'git lost-found' - -DESCRIPTION - -*NOTE*: this command is deprecated. Use linkgit:git-fsck[1] with -the option '--lost-found' instead. - -Finds dangling commits and tags from the object database, and -creates refs to them in the .git/lost-found/ directory. Commits and -tags that dereference to commits are stored in .git/lost-found/commit, -and other objects are stored in .git/lost-found/other. - - -OUTPUT --- -Prints to standard output the object names and one-line descriptions -of any commits or tags found. - -EXAMPLE - -Suppose you run 'git tag -f' and mistype the tag to overwrite. -The ref to your tag is overwritten, but until you run 'git -prune', the tag itself is still there. - - -$ git lost-found -[1ef2b196d909eed523d4f3c9bf54b78cdd6843c6] GIT 0.99.9c -... - - -Also you can use gitk to browse how any tags found relate to each -other. - - -$ gitk $(cd .git/lost-found/commit echo ??*) - - -After making sure you know which the object is the tag you are looking -for, you can reconnect it to your regular `refs` hierarchy by using -the `update-ref` command. - - -$ git cat-file -t 1ef2b196 -tag -$ git cat-file tag 1ef2b196 -object fa41bbce8e38c67a218415de6cfa510c7e50032a -type commit -tag v0.99.9c -tagger Junio C Hamano jun...@cox.net 1131059594 -0800 - -GIT 0.99.9c - -This contains the following changes from the master branch, since -... -$ git update-ref refs/tags/not-lost-anymore 1ef2b196 -$ git rev-parse not-lost-anymore -1ef2b196d909eed523d4f3c9bf54b78cdd6843c6 - - -GIT -Part of the linkgit:git[1] suite diff --git a/Makefile b/Makefile index 4fc2378..7ffd705 100644 --- a/Makefile +++ b/Makefile @@ -452,7 +452,6 @@ SCRIPT_SH += git-am.sh SCRIPT_SH += git-bisect.sh SCRIPT_SH += git-difftool--helper.sh SCRIPT_SH += git-filter-branch.sh -SCRIPT_SH += git-lost-found.sh SCRIPT_SH += git-merge-octopus.sh SCRIPT_SH += git-merge-one-file.sh SCRIPT_SH += git-merge-resolve.sh diff --git a/command-list.txt b/command-list.txt index f8fc5b8..7bf2420 100644 --- a/command-list.txt +++ b/command-list.txt @@ -64,7 +64,6 @@ git-initmainporcelain common git-instawebancillaryinterrogators gitkmainporcelain git-log mainporcelain common -git-lost-found ancillarymanipulators deprecated git-ls-filesplumbinginterrogators git-ls-remote plumbinginterrogators git-ls-tree plumbinginterrogators diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 1081ad1..c071614 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -673,7 +673,6 @@ __git_list_porcelain_commands () index-pack) : plumbing;; init-db) : deprecated;; local-fetch) : plumbing;; - lost-found) : infrequent;; ls-files) : plumbing;; ls-remote): plumbing;; ls-tree) : plumbing;; diff --git a/git-lost-found.sh b/git-lost-found.sh deleted file mode 100755 index 0b3e8c7..000 --- a/git-lost-found.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -USAGE='' -SUBDIRECTORY_OK='Yes' -OPTIONS_SPEC= -. git-sh-setup - -echo WARNING: '$0' is deprecated in favor of 'git fsck --lost-found' 2 - -if [ $# != 0 ] -then -usage -fi - -laf=$GIT_DIR/lost-found -rm -fr $laf mkdir -p $laf/commit $laf/other || exit - -git fsck --full --no-reflogs | -while read dangling type sha1 -do - case $dangling in -
[RFC/PATCH 0/4] Remove deprecated commands
git repo-config, git tar-tree, git lost-found and git peek-remote have all been deprecated since at least Git 1.5.4. With Git 2.0 approaching, I think that would be a good point to remove then completely, which is what this series does. John Keeping (4): repo-config: remove deprecated alias for git config tar-tree: remove deprecated command lost-found: remove deprecated command peek-remote: remove deprecated alias of ls-remote .gitignore | 4 -- Documentation/git-lost-found.txt | 74 -- Documentation/git-peek-remote.txt | 43 -- Documentation/git-repo-config.txt | 23 -- Documentation/git-tar-tree.txt | 82 -- Makefile | 3 -- builtin.h | 1 - builtin/config.c | 6 --- builtin/tar-tree.c | 62 - command-list.txt | 4 -- contrib/completion/git-completion.bash | 4 -- contrib/examples/git-whatchanged.sh| 4 +- git-lost-found.sh | 33 -- git.c | 3 -- t/t4116-apply-reverse.sh | 4 +- t/t5000-tar-tree.sh| 16 ++- t/t5001-archive-attr.sh| 10 - 17 files changed, 7 insertions(+), 369 deletions(-) delete mode 100644 Documentation/git-lost-found.txt delete mode 100644 Documentation/git-peek-remote.txt delete mode 100644 Documentation/git-repo-config.txt delete mode 100644 Documentation/git-tar-tree.txt delete mode 100755 git-lost-found.sh -- 1.8.5.rc0.170.g772b8ec -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[RFC/PATCH 4/4] peek-remote: remove deprecated alias of ls-remote
This has been deprecated since commit 87194d2 (Deprecate peek-remote, 2007-11-24), included in version 1.5.4. Signed-off-by: John Keeping j...@keeping.me.uk --- .gitignore | 1 - Documentation/git-peek-remote.txt | 43 -- Makefile | 1 - command-list.txt | 1 - contrib/completion/git-completion.bash | 1 - git.c | 1 - 6 files changed, 48 deletions(-) delete mode 100644 Documentation/git-peek-remote.txt diff --git a/.gitignore b/.gitignore index c141b2a..c2ad802 100644 --- a/.gitignore +++ b/.gitignore @@ -104,7 +104,6 @@ /git-pack-refs /git-parse-remote /git-patch-id -/git-peek-remote /git-prune /git-prune-packed /git-pull diff --git a/Documentation/git-peek-remote.txt b/Documentation/git-peek-remote.txt deleted file mode 100644 index 87ea3fb..000 --- a/Documentation/git-peek-remote.txt +++ /dev/null @@ -1,43 +0,0 @@ -git-peek-remote(1) -== - -NAME - -git-peek-remote - List the references in a remote repository - - -SYNOPSIS - -[verse] -'git peek-remote' [--upload-pack=git-upload-pack] [host:]directory - -DESCRIPTION -This command is deprecated; use 'git ls-remote' instead. - -OPTIONS ---upload-pack=git-upload-pack:: - Use this to specify the path to 'git-upload-pack' on the - remote side, if it is not found on your $PATH. Some - installations of sshd ignores the user's environment - setup scripts for login shells (e.g. .bash_profile) and - your privately installed git may not be found on the system - default $PATH. Another workaround suggested is to set - up your $PATH in .bashrc, but this flag is for people - who do not want to pay the overhead for non-interactive - shells, but prefer having a lean .bashrc file (they set most of - the things up in .bash_profile). - -host:: - A remote host that houses the repository. When this - part is specified, 'git-upload-pack' is invoked via - ssh. - -directory:: - The repository to sync from. - - -GIT -Part of the linkgit:git[1] suite diff --git a/Makefile b/Makefile index 7ffd705..504931f 100644 --- a/Makefile +++ b/Makefile @@ -589,7 +589,6 @@ BUILT_INS += git-fsck-objects$X BUILT_INS += git-get-tar-commit-id$X BUILT_INS += git-init$X BUILT_INS += git-merge-subtree$X -BUILT_INS += git-peek-remote$X BUILT_INS += git-show$X BUILT_INS += git-stage$X BUILT_INS += git-status$X diff --git a/command-list.txt b/command-list.txt index 7bf2420..cf36c3d 100644 --- a/command-list.txt +++ b/command-list.txt @@ -87,7 +87,6 @@ git-pack-redundant plumbinginterrogators git-pack-refs ancillarymanipulators git-parse-remotesynchelpers git-patch-idpurehelpers -git-peek-remote purehelpersdeprecated git-prune ancillarymanipulators git-prune-packedplumbingmanipulators git-pullmainporcelain common diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index c071614..874611d 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -686,7 +686,6 @@ __git_list_porcelain_commands () pack-refs): plumbing;; parse-remote) : plumbing;; patch-id) : plumbing;; - peek-remote) : plumbing;; prune): plumbing;; prune-packed) : plumbing;; quiltimport) : import;; diff --git a/git.c b/git.c index 5c9858f..727e380 100644 --- a/git.c +++ b/git.c @@ -408,7 +408,6 @@ static void handle_internal_command(int argc, const char **argv) { pack-redundant, cmd_pack_redundant, RUN_SETUP }, { pack-refs, cmd_pack_refs, RUN_SETUP }, { patch-id, cmd_patch_id }, - { peek-remote, cmd_ls_remote, RUN_SETUP_GENTLY }, { pickaxe, cmd_blame, RUN_SETUP }, { prune, cmd_prune, RUN_SETUP }, { prune-packed, cmd_prune_packed, RUN_SETUP }, -- 1.8.5.rc0.170.g772b8ec -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[RFC/PATCH 2/4] tar-tree: remove deprecated command
git tar-tree has been a thin wrapper around git archive since commit fd88d9c (Remove upload-tar and make git-tar-tree a thin wrapper to git-archive, 2006-09-24), which also made it print a message indicating that git-tar-tree is deprecated. Signed-off-by: John Keeping j...@keeping.me.uk --- .gitignore | 1 - Documentation/git-tar-tree.txt | 82 -- builtin/tar-tree.c | 62 - command-list.txt | 1 - contrib/completion/git-completion.bash | 1 - git.c | 1 - t/t4116-apply-reverse.sh | 4 +- t/t5000-tar-tree.sh| 16 ++- t/t5001-archive-attr.sh| 10 - 9 files changed, 5 insertions(+), 173 deletions(-) delete mode 100644 Documentation/git-tar-tree.txt diff --git a/.gitignore b/.gitignore index 3bc1b08..88b313a 100644 --- a/.gitignore +++ b/.gitignore @@ -158,7 +158,6 @@ /git-svn /git-symbolic-ref /git-tag -/git-tar-tree /git-unpack-file /git-unpack-objects /git-update-index diff --git a/Documentation/git-tar-tree.txt b/Documentation/git-tar-tree.txt deleted file mode 100644 index f7362dc..000 --- a/Documentation/git-tar-tree.txt +++ /dev/null @@ -1,82 +0,0 @@ -git-tar-tree(1) -=== - -NAME - -git-tar-tree - Create a tar archive of the files in the named tree object - - -SYNOPSIS - -[verse] -'git tar-tree' [--remote=repo] tree-ish [ base ] - -DESCRIPTION -THIS COMMAND IS DEPRECATED. Use 'git archive' with `--format=tar` -option instead (and move the base argument to `--prefix=base/`). - -Creates a tar archive containing the tree structure for the named tree. -When base is specified it is added as a leading path to the files in the -generated tar archive. - -'git tar-tree' behaves differently when given a tree ID versus when given -a commit ID or tag ID. In the first case the current time is used as -modification time of each file in the archive. In the latter case the -commit time as recorded in the referenced commit object is used instead. -Additionally the commit ID is stored in a global extended pax header. -It can be extracted using 'git get-tar-commit-id'. - -OPTIONS - -tree-ish:: - The tree or commit to produce tar archive for. If it is - the object name of a commit object. - -base:: - Leading path to the files in the resulting tar archive. - ---remote=repo:: - Instead of making a tar archive from local repository, - retrieve a tar archive from a remote repository. - -CONFIGURATION -- - -tar.umask:: - This variable can be used to restrict the permission bits of - tar archive entries. The default is 0002, which turns off the - world write bit. The special value user indicates that the - archiving user's umask will be used instead. See umask(2) for - details. - -EXAMPLES - -`git tar-tree HEAD junk | (cd /var/tmp/ tar xf -)`:: - - Create a tar archive that contains the contents of the - latest commit on the current branch, and extracts it in - `/var/tmp/junk` directory. - -`git tar-tree v1.4.0 git-1.4.0 | gzip git-1.4.0.tar.gz`:: - - Create a tarball for v1.4.0 release. - -`git tar-tree v1.4.0^{tree} git-1.4.0 | gzip git-1.4.0.tar.gz`:: - - Create a tarball for v1.4.0 release, but without a - global extended pax header. - -`git tar-tree --remote=example.com:git.git v1.4.0 git-1.4.0.tar`:: - - Get a tarball v1.4.0 from example.com. - -`git tar-tree HEAD:Documentation/ git-docs git-1.4.0-docs.tar`:: - - Put everything in the current head's Documentation/ directory - into 'git-1.4.0-docs.tar', with the prefix 'git-docs/'. - -GIT -Part of the linkgit:git[1] suite diff --git a/builtin/tar-tree.c b/builtin/tar-tree.c index ba3ffe6..aa72596 100644 --- a/builtin/tar-tree.c +++ b/builtin/tar-tree.c @@ -7,71 +7,9 @@ #include builtin.h #include quote.h -static const char tar_tree_usage[] = -git tar-tree [--remote=repo] tree-ish [basedir]\n -*** Note that this command is now deprecated; use \git archive\ instead.; - static const char builtin_get_tar_commit_id_usage[] = git get-tar-commit-id tarfile; -int cmd_tar_tree(int argc, const char **argv, const char *prefix) -{ - /* -* git tar-tree is now a wrapper around git archive --format=tar -* -* $0 --remote=repo arg... == -* git archive --format=tar --remote=repo arg... -* $0 tree-ish == -* git archive --format=tar tree-ish -* $0 tree-ish basedir == -* git archive --format-tar --prefix=basedir tree-ish -*/ - const char **nargv = xcalloc(sizeof(*nargv), argc + 3); - struct strbuf sb = STRBUF_INIT; - char *basedir_arg; - int nargc = 0; - - nargv[nargc++] = archive; - nargv[nargc++] = --format=tar; - - if
[PATCH v3] l10n: de.po: translate 68 new messages
Translate 68 new messages came from git.pot update in 727b957 (l10n: git.pot: v1.8.5 round 1 (68 new, 9 removed)). Signed-off-by: Ralf Thielow ralf.thie...@gmail.com --- po/de.po | 191 --- 1 file changed, 86 insertions(+), 105 deletions(-) diff --git a/po/de.po b/po/de.po index 492390c..c5f9b61 100644 --- a/po/de.po +++ b/po/de.po @@ -902,51 +902,49 @@ msgid -NUM msgstr -NUM #: pathspec.c:118 -#, fuzzy msgid global 'glob' and 'noglob' pathspec settings are incompatible -msgstr Die Optionen --bare und --origin %s sind inkompatibel. +msgstr Globale Einstellungen zur Pfadspezifikation 'glob' und 'noglob' sind inkompatibel. #: pathspec.c:128 -#, fuzzy msgid global 'literal' pathspec setting is incompatible with all other global pathspec settings -msgstr --patch ist inkompatibel mit allen anderen Optionen +msgstr Globale Einstellung zur Pfadspezifikation 'literal' ist inkompatibel\n +mit allen anderen Optionen. #: pathspec.c:158 msgid invalid parameter for pathspec magic 'prefix' -msgstr +msgstr ungültiger Parameter für Pfadspezifikationsangabe 'prefix' #: pathspec.c:164 -#, fuzzy, c-format +#, c-format msgid Invalid pathspec magic '%.*s' in '%s' -msgstr ungültige Pfadspezifikation +msgstr ungültige Pfadspezifikationsangabe '%.*s' in '%s' #: pathspec.c:168 #, c-format msgid Missing ')' at the end of pathspec magic in '%s' -msgstr +msgstr Fehlendes ')' am Ende der Pfadspezifikationsangabe in '%s' #: pathspec.c:186 #, c-format msgid Unimplemented pathspec magic '%c' in '%s' -msgstr +msgstr nicht unterstützte Pfadspezifikationsangabe '%c' in '%s' #: pathspec.c:211 -#, fuzzy, c-format +#, c-format msgid %s: 'literal' and 'glob' are incompatible -msgstr Die Optionen --all und --tags sind inkompatibel. +msgstr %s: 'literal' und 'glob' sind inkompatibel #: pathspec.c:222 -#, fuzzy, c-format +#, c-format msgid %s: '%s' is outside repository -msgstr -Die Option --index kann nicht außerhalb eines Repositories verwendet werden. +msgstr %s: '%s' liegt außerhalb des Repositories #: pathspec.c:278 -#, fuzzy, c-format +#, c-format msgid Pathspec '%s' is in submodule '%.*s' -msgstr Pfad '%s' befindet sich in Submodul '%.*s' +msgstr Pfadspezifikation '%s' befindet sich in Submodul '%.*s' #. #. * We may want to substitute this command with a command @@ -956,27 +954,26 @@ msgstr Pfad '%s' befindet sich in Submodul '%.*s' #: pathspec.c:340 #, c-format msgid %s: pathspec magic not supported by this command: %s -msgstr +msgstr %s: Pfadspezifikationsangabe wird von diesem Kommando nicht unterstützt: %s #: pathspec.c:415 -#, fuzzy, c-format +#, c-format msgid pathspec '%s' is beyond a symbolic link -msgstr '%s' ist hinter einem symbolischen Verweis +msgstr Pfadspezifikation '%s' ist hinter einem symbolischen Verweis #: remote.c:1833 -#, fuzzy, c-format +#, c-format msgid Your branch is based on '%s', but the upstream is gone.\n -msgstr Ihr Branch ist vor '%s' um %d Commit.\n +msgstr Ihr Branch basiert auf '%s', aber Upstream-Branch wurde entfernt.\n #: remote.c:1837 -#, fuzzy msgid (use \git branch --unset-upstream\ to fixup)\n -msgstr git branch --set-upstream-to %s\n +msgstr (benutzen Sie \git branch --unset-upstream\ zum Beheben)\n #: remote.c:1840 -#, fuzzy, c-format +#, c-format msgid Your branch is up-to-date with '%s'.\n -msgstr Ihr Branch ist vor '%s' um %d Commit.\n +msgstr Ihr Branch ist auf dem selben Stand wie '%s'.\n #: remote.c:1844 #, c-format @@ -1329,54 +1326,49 @@ msgstr Upstream-Branch '%s' ist nicht als Remote-Tracking-Branch gespeichert #: submodule.c:64 submodule.c:98 msgid Cannot change unmerged .gitmodules, resolve merge conflicts first -msgstr +msgstr Kann nicht zusammengeführte .gitmodules-Datei nicht ändern, lösen\n +Sie zuerst die Konflikte auf #: submodule.c:68 submodule.c:102 #, c-format msgid Could not find section in .gitmodules where path=%s -msgstr +msgstr Konnte keine Sektion in .gitmodules mit Pfad \%s\ finden #. Maybe the user already did that, don't error out here #: submodule.c:76 -#, fuzzy, c-format +#, c-format msgid Could not update .gitmodules entry %s -msgstr Konnte git-Verweis %s nicht erstellen +msgstr Konnte Eintrag '%s' in .gitmodules nicht aktualisieren #. Maybe the user already did that, don't error out here #: submodule.c:109 -#, fuzzy, c-format +#, c-format msgid Could not remove .gitmodules entry for %s -msgstr Konnte Sektion '%s' nicht aus Konfiguration entfernen +msgstr Konnte Eintrag '%s' nicht aus .gitmodules entfernen #: submodule.c:127 -#, fuzzy msgid could not find .gitmodules in index -msgstr Konnte die Staging-Area nicht lesen +msgstr Konnte .gitmodules nicht in der Staging-Area finden #: submodule.c:133 -#, fuzzy msgid reading updated .gitmodules failed -msgstr Hinzufügen von Dateien fehlgeschlagen +msgstr Lesen der aktualisierten .gitmodules-Datei fehlgeschlagen #: submodule.c:135 -#, fuzzy
Re: Request: timeout option for remote operations, esp. git fetch
H. Peter Anvin h...@zytor.com wrote: When a remote server is unavailable or very slow, some git commands can stall out indefinitely. It would be a very good thing if remote commands -- but especially git fetch -- could be given a timeout. We've had SO_KEEPALIVE on git and ssh transports since e47a8583 (2011-12-06) SO_KEEPALIVE for http was added recently (a15d069a) and will be in git 1.8.5 Do you want a shorter timeout for slow (but still alive) servers? -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4 12/10] git-remote-testgit: support the new 'force' option
On 2013-10-29 04:41, Felipe Contreras wrote: Richard Hansen wrote: Signed-off-by: Richard Hansen rhan...@bbn.com --- git-remote-testgit.sh | 18 ++ 1 file changed, 18 insertions(+) diff --git a/git-remote-testgit.sh b/git-remote-testgit.sh index 6d2f282..80546c1 100755 --- a/git-remote-testgit.sh +++ b/git-remote-testgit.sh @@ -6,6 +6,7 @@ url=$2 dir=$GIT_DIR/testgit/$alias prefix=refs/testgit/$alias +forcearg= default_refspec=refs/heads/*:${prefix}/heads/* @@ -39,6 +40,7 @@ do fi test -n $GIT_REMOTE_TESTGIT_SIGNED_TAGS echo signed-tags test -n $GIT_REMOTE_TESTGIT_NO_PRIVATE_UPDATE echo no-private-update +echo 'option' echo ;; list) @@ -93,6 +95,7 @@ do before=$(git for-each-ref --format=' %(refname) %(objectname) ') git fast-import \ +${forcearg} \ ${testgitmarks:+--import-marks=$testgitmarks} \ ${testgitmarks:+--export-marks=$testgitmarks} \ --quiet @@ -115,6 +118,21 @@ do echo ;; +option\ *) +read cmd opt val EOF +${line} +EOF We can do -EOF to align this properly. Good point. I personally avoid tabs whenever possible, and - only works with tabs, so I'm in the habit of doing EOF. Also, I don't see why all the variables are ${foo} instead of $foo. I'm in the habit of doing ${foo} because I like the consistency -- sometimes you need them to disambiguate, and sometimes you need special expansions like ${foo##bar} or ${foo:-bar}. In this case it's actually less consistent to do ${foo} because the rest of the file doesn't use {} when not needed, so I agree with your change. +case ${opt} in +force) I think the convention is to align these: case $opt in force) The existing case statement in this file indents the patterns the same amount as the case statement, so this should be aligned to match. In general I rarely see the case patterns indented at the same level as the case statement, possibly because Emacs shell-mode indents the patterns more than the case statement (by default). The POSIX spec contains a mix of styles: * the normative text documenting the format of a 'case' construct indents the patterns more than the 'case' statement * two of the four non-normative examples indent the patterns more than the 'case' statements; the other two do not +case ${val} in +true) forcearg=--force; echo 'ok';; +false) forcearg=; echo 'ok';; +*) printf %s\\n error '${val}'\ + is not a valid value for option ${opt};; I think this is packing a lot of stuff and it's not that readable. Moreover, this is not for production purposes, it's for testing purposes and a guideline, I think this suffices. option\ *) read cmd opt val -EOF $line EOF case $opt in force) test $val = true force=true || force= echo ok ;; *) echo unsupported ;; esac ;; Works for me. But this is definetly good to have, will merge. Thanks, Richard -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Bug? diff.submodule=log adds text to commit -v message
Hi, I'm using git 1.8.4.2, and I've set the diff.submodule = log option globally. If I change the revision that a submodule is set to, then run git commit -av, The submodule shortlog is appended to the log message without any #s before it, so the log messages get included in my own log message. This seems like a bug and not a feature, as diffs aren't normally included in the commit message with -v. Cheers, Ari -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
git rm / format-patch / am fails on my file: patch does not apply
I originally posted about this to the git-users list (https://groups.google.com/forum/#!topic/git-users/G5D0bldEbTo). If this would normally be expected to work: git add file git commit git rm file git commit git format-patch HEAD~1 git reset --hard HEAD~1 git am 0001*patch then I'm having a problem with at least one (maybe more) file I have in a repository that seems like a bug. Even if I copy it to a new repository, it will still fail, so it seems something about how git handles the file, which file reports as: ASCII text, with very long lines, with CRLF, CR, LF line terminators I've confirmed with the following test case on three machines, so it seems reproducible: mkdir temp_test_case cd temp_test_case git init # my file. Sorry--couldn't find a saner link! wget -O jquery-ui-1.8.custom.min.js http://sourceforge.net/p/agency/code/ci/9358ea4dbe8e1540ec0b8bebfc7770f1bf8be0ec/tree/jquery-ui-1.8.custom.min.js?format=raw git add jquery-ui-1.8.custom.min.js git commit -m 'Adding jquery-ui' git rm jquery-ui-1.8.custom.min.js git commit -m 'Removing jquery-ui' git format-patch HEAD~1 git reset --hard HEAD~1 git am 0001* The last command reports the following: Applying: Removing jquery-ui error: patch failed: jquery-ui-1.8.custom.min.js:1 error: jquery-ui-1.8.custom.min.js: patch does not apply Patch failed at 0001 Removing jquery-ui The copy of the patch that failed is found in: /home/user/newtest2/temp_test_case/.git/rebase-apply/patch When you have resolved this problem, run git am --resolved. If you prefer to skip this patch, run git am --skip instead. To restore the original branch and stop patching, run git am --abort. Let me know if I can provide more information, or am missing something obvious! Thanks. Ken -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4 12/10] git-remote-testgit: support the new 'force' option
On Sun, Nov 10, 2013 at 4:46 PM, Richard Hansen rhan...@bbn.com wrote: On 2013-10-29 04:41, Felipe Contreras wrote: Richard Hansen wrote: Signed-off-by: Richard Hansen rhan...@bbn.com --- git-remote-testgit.sh | 18 ++ 1 file changed, 18 insertions(+) diff --git a/git-remote-testgit.sh b/git-remote-testgit.sh index 6d2f282..80546c1 100755 --- a/git-remote-testgit.sh +++ b/git-remote-testgit.sh @@ -6,6 +6,7 @@ url=$2 dir=$GIT_DIR/testgit/$alias prefix=refs/testgit/$alias +forcearg= default_refspec=refs/heads/*:${prefix}/heads/* @@ -39,6 +40,7 @@ do fi test -n $GIT_REMOTE_TESTGIT_SIGNED_TAGS echo signed-tags test -n $GIT_REMOTE_TESTGIT_NO_PRIVATE_UPDATE echo no-private-update +echo 'option' echo ;; list) @@ -93,6 +95,7 @@ do before=$(git for-each-ref --format=' %(refname) %(objectname) ') git fast-import \ +${forcearg} \ ${testgitmarks:+--import-marks=$testgitmarks} \ ${testgitmarks:+--export-marks=$testgitmarks} \ --quiet @@ -115,6 +118,21 @@ do echo ;; +option\ *) +read cmd opt val EOF +${line} +EOF We can do -EOF to align this properly. Good point. I personally avoid tabs whenever possible, and - only works with tabs, so I'm in the habit of doing EOF. That looks very weird to me, plus -EOF is often used already in git tests. Also, I don't see why all the variables are ${foo} instead of $foo. I'm in the habit of doing ${foo} because I like the consistency -- Sure, but with the price of less readibility. If consistency was the priority, we would be doing the follwoing in C: if (foo) { # single line } Since the if might contain multiple lines, but we don't do that, because readibility is more important than consistency. So sometimes it's with braces, sometimes without. +case ${opt} in +force) I think the convention is to align these: case $opt in force) The existing case statement in this file indents the patterns the same amount as the case statement, so this should be aligned to match. In general I rarely see the case patterns indented at the same level as the case statement, possibly because Emacs shell-mode indents the patterns more than the case statement (by default). The POSIX spec contains a mix of styles: * the normative text documenting the format of a 'case' construct indents the patterns more than the 'case' statement * two of the four non-normative examples indent the patterns more than the 'case' statements; the other two do not The style in C has the cases at the same level, so I think it makes sense to do the same in shell, but I'm not sure if that's followed already. +case ${val} in +true) forcearg=--force; echo 'ok';; +false) forcearg=; echo 'ok';; +*) printf %s\\n error '${val}'\ + is not a valid value for option ${opt};; I think this is packing a lot of stuff and it's not that readable. Moreover, this is not for production purposes, it's for testing purposes and a guideline, I think this suffices. option\ *) read cmd opt val -EOF $line EOF case $opt in force) test $val = true force=true || force= echo ok ;; echo unsupported ;; esac ;; Works for me. Good, the final code style can be decided later on, and perhaps update Documentation/CodingGuidelines, but it's good the rest is more or less settled. Cheers. -- Felipe Contreras -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/7] test-bzr.sh, test-hg.sh: prepare for change to push.default=simple
Change 'git push' to 'git push -u remote branch' in one of the test-bzr.sh tests to ensure that the test continues to pass when the default value of push.default changes to simple. Also, explicitly set push.default to simple to silence warnings when using --verbose. Signed-off-by: Richard Hansen rhan...@bbn.com --- contrib/remote-helpers/test-bzr.sh | 5 - contrib/remote-helpers/test-hg.sh | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/contrib/remote-helpers/test-bzr.sh b/contrib/remote-helpers/test-bzr.sh index 094062c..ea597b0 100755 --- a/contrib/remote-helpers/test-bzr.sh +++ b/contrib/remote-helpers/test-bzr.sh @@ -28,6 +28,9 @@ check () { bzr whoami A U Thor aut...@example.com +# silence warnings +git config --global push.default simple + test_expect_success 'cloning' ' ( bzr init bzrrepo @@ -379,7 +382,7 @@ test_expect_success 'export utf-8 authors' ' git add content git commit -m one git remote add bzr bzr::../bzrrepo - git push bzr + git push -u bzr master ) ( diff --git a/contrib/remote-helpers/test-hg.sh b/contrib/remote-helpers/test-hg.sh index dbe0eec..53f2bba 100755 --- a/contrib/remote-helpers/test-hg.sh +++ b/contrib/remote-helpers/test-hg.sh @@ -102,6 +102,9 @@ setup () { GIT_AUTHOR_DATE=2007-01-01 00:00:00 +0230 GIT_COMMITTER_DATE=$GIT_AUTHOR_DATE export GIT_COMMITTER_DATE GIT_AUTHOR_DATE + + # silence warnings + git config --global push.default simple } setup -- 1.8.5.rc1.207.gc17dd22 -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/7] test-hg.sh: eliminate 'local' bashism
Unlike bash, POSIX shell does not specify a 'local' command for declaring function-local variable scope. Except for IFS, the variable names are not used anywhere else in the script so simply remove the 'local'. For IFS, move the assignment to the 'read' command to prevent it from affecting code outside the function. Signed-off-by: Richard Hansen rhan...@bbn.com --- contrib/remote-helpers/test-hg.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/remote-helpers/test-hg.sh b/contrib/remote-helpers/test-hg.sh index 53f2bba..558a656 100755 --- a/contrib/remote-helpers/test-hg.sh +++ b/contrib/remote-helpers/test-hg.sh @@ -54,14 +54,14 @@ check_bookmark () { } check_push () { - local expected_ret=$1 ret=0 ref_ret=0 IFS=':' + expected_ret=$1 ret=0 ref_ret=0 shift git push origin $@ 2error ret=$? cat error - while read branch kind + while IFS=':' read branch kind do case $kind in 'new') -- 1.8.5.rc1.207.gc17dd22 -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/7] remote-hg, remote-bzr fixes
A handful of fixes for the git-remote-hg and git-remote-bzr remote helpers and their unit tests. Richard Hansen (7): remote-hg: don't decode UTF-8 paths into Unicode objects test-bzr.sh, test-hg.sh: allow running from any dir test-bzr.sh, test-hg.sh: prepare for change to push.default=simple test-hg.sh: eliminate 'local' bashism test-hg.sh: avoid obsolete 'test' syntax test-hg.sh: help user correlate verbose output with email test remote-bzr, remote-hg: fix email address regular expression contrib/remote-helpers/git-remote-bzr | 7 +++ contrib/remote-helpers/git-remote-hg | 9 - contrib/remote-helpers/test-bzr.sh| 6 +- contrib/remote-helpers/test-hg.sh | 31 ++- 4 files changed, 30 insertions(+), 23 deletions(-) -- 1.8.5.rc1.207.gc17dd22 -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/7] test-bzr.sh, test-hg.sh: allow running from any dir
cd to the t/ subdirectory so that the user doesn't already have to be in the test directory to run these test scripts. Signed-off-by: Richard Hansen rhan...@bbn.com --- contrib/remote-helpers/test-bzr.sh | 1 + contrib/remote-helpers/test-hg.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/contrib/remote-helpers/test-bzr.sh b/contrib/remote-helpers/test-bzr.sh index 5c50251..094062c 100755 --- a/contrib/remote-helpers/test-bzr.sh +++ b/contrib/remote-helpers/test-bzr.sh @@ -5,6 +5,7 @@ test_description='Test remote-bzr' +cd ${0%/*}/../../t || exit 1 . ./test-lib.sh if ! test_have_prereq PYTHON diff --git a/contrib/remote-helpers/test-hg.sh b/contrib/remote-helpers/test-hg.sh index 72f745d..dbe0eec 100755 --- a/contrib/remote-helpers/test-hg.sh +++ b/contrib/remote-helpers/test-hg.sh @@ -8,6 +8,7 @@ test_description='Test remote-hg' +cd ${0%/*}/../../t || exit 1 . ./test-lib.sh if ! test_have_prereq PYTHON -- 1.8.5.rc1.207.gc17dd22 -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/7] remote-hg: don't decode UTF-8 paths into Unicode objects
The internal mercurial API expects ordinary 8-bit string objects, not Unicode string objects. With this change, the test-hg.sh unit tests pass again. Signed-off-by: Richard Hansen rhan...@bbn.com --- contrib/remote-helpers/git-remote-hg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index 3222afd..c6026b9 100755 --- a/contrib/remote-helpers/git-remote-hg +++ b/contrib/remote-helpers/git-remote-hg @@ -747,7 +747,7 @@ def parse_commit(parser): f = { 'deleted' : True } else: die('Unknown file command: %s' % line) -path = c_style_unescape(path).decode('utf-8') +path = c_style_unescape(path) files[path] = f # only export the commits if we are on an internal proxy repo -- 1.8.5.rc1.207.gc17dd22 -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 5/7] test-hg.sh: avoid obsolete 'test' syntax
The POSIX spec says that the '-a', '-o', and parentheses operands to the 'test' utility are obsolete extensions due to the potential for ambiguity. Replace '-o' with '|| test' to avoid unspecified behavior. Signed-off-by: Richard Hansen rhan...@bbn.com --- contrib/remote-helpers/test-hg.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/remote-helpers/test-hg.sh b/contrib/remote-helpers/test-hg.sh index 558a656..84c67ff 100755 --- a/contrib/remote-helpers/test-hg.sh +++ b/contrib/remote-helpers/test-hg.sh @@ -83,7 +83,7 @@ check_push () { test $ref_ret -ne 0 echo match for '$branch' failed break done - if test $expected_ret -ne $ret -o $ref_ret -ne 0 + if test $expected_ret -ne $ret || test $ref_ret -ne 0 then return 1 fi -- 1.8.5.rc1.207.gc17dd22 -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 6/7] test-hg.sh: help user correlate verbose output with email test
It's hard to tell which author conversion test failed when the email addresses look similar. Signed-off-by: Richard Hansen rhan...@bbn.com --- contrib/remote-helpers/test-hg.sh | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/contrib/remote-helpers/test-hg.sh b/contrib/remote-helpers/test-hg.sh index 84c67ff..5eda265 100755 --- a/contrib/remote-helpers/test-hg.sh +++ b/contrib/remote-helpers/test-hg.sh @@ -209,16 +209,16 @@ test_expect_success 'authors' ' ../expected author_test alpha H G Wells we...@example.com - author_test beta test test unknown - author_test beta test t...@example.com (comment) test t...@example.com - author_test gamma t...@example.com Unknown t...@example.com - author_test delta namet...@example.com name t...@example.com - author_test epsilon name t...@example.com name t...@example.com - author_test zeta test test unknown - author_test eta test t...@example.com test t...@example.com - author_test theta test t...@example.com test t...@example.com - author_test iota test test at example dot com test unknown - author_test kappa t...@example.com Unknown t...@example.com + author_test beta beta beta unknown + author_test beta beta t...@example.com (comment) beta t...@example.com + author_test gamma ga...@example.com Unknown ga...@example.com + author_test delta deltat...@example.com delta t...@example.com + author_test epsilon epsilon t...@example.com epsilon t...@example.com + author_test zeta zeta zeta unknown + author_test eta eta t...@example.com eta t...@example.com + author_test theta theta t...@example.com theta t...@example.com + author_test iota iota test at example dot com iota unknown + author_test kappa ka...@example.com Unknown ka...@example.com ) git clone hg::hgrepo gitrepo -- 1.8.5.rc1.207.gc17dd22 -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 7/7] remote-bzr, remote-hg: fix email address regular expression
Before, strings like foo@example.com would be converted to foo. b...@example.com when they should be unknown foo@example.com. Signed-off-by: Richard Hansen rhan...@bbn.com --- contrib/remote-helpers/git-remote-bzr | 7 +++ contrib/remote-helpers/git-remote-hg | 7 +++ contrib/remote-helpers/test-hg.sh | 3 ++- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr index 054161a..7e34532 100755 --- a/contrib/remote-helpers/git-remote-bzr +++ b/contrib/remote-helpers/git-remote-bzr @@ -44,8 +44,8 @@ import StringIO import atexit, shutil, hashlib, urlparse, subprocess NAME_RE = re.compile('^([^]+)') -AUTHOR_RE = re.compile('^([^]+?)? ?([^]*)$') -EMAIL_RE = re.compile('^([^]+[^ \\\t])?\\b(?:[ \\t]*?)\\b([^ \\t]+@[^ \\t]+)') +AUTHOR_RE = re.compile('^([^]+?)? ?[]([^]*)(?:$|)') +EMAIL_RE = re.compile(r'([^ \t]+@[^ \t]+)') RAW_AUTHOR_RE = re.compile('^(\w+) (.+)? (.*) (\d+) ([+-]\d+)') def die(msg, *args): @@ -193,8 +193,7 @@ def fixup_user(user): else: m = EMAIL_RE.match(user) if m: -name = m.group(1) -mail = m.group(2) +mail = m.group(1) else: m = NAME_RE.match(user) if m: diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index c6026b9..30402d5 100755 --- a/contrib/remote-helpers/git-remote-hg +++ b/contrib/remote-helpers/git-remote-hg @@ -51,8 +51,8 @@ import time as ptime # NAME_RE = re.compile('^([^]+)') -AUTHOR_RE = re.compile('^([^]+?)? ?([^]*)$') -EMAIL_RE = re.compile('^([^]+[^ \\\t])?\\b(?:[ \\t]*?)\\b([^ \\t]+@[^ \\t]+)') +AUTHOR_RE = re.compile('^([^]+?)? ?[]([^]*)(?:$|)') +EMAIL_RE = re.compile(r'([^ \t]+@[^ \t]+)') AUTHOR_HG_RE = re.compile('^(.*?) ?(.*?)(?:(.+)?)?$') RAW_AUTHOR_RE = re.compile('^(\w+) (?:(.+)? )?(.*) (\d+) ([+-]\d+)') @@ -316,8 +316,7 @@ def fixup_user_git(user): else: m = EMAIL_RE.match(user) if m: -name = m.group(1) -mail = m.group(2) +mail = m.group(1) else: m = NAME_RE.match(user) if m: diff --git a/contrib/remote-helpers/test-hg.sh b/contrib/remote-helpers/test-hg.sh index 5eda265..9f5066b 100755 --- a/contrib/remote-helpers/test-hg.sh +++ b/contrib/remote-helpers/test-hg.sh @@ -218,7 +218,8 @@ test_expect_success 'authors' ' author_test eta eta t...@example.com eta t...@example.com author_test theta theta t...@example.com theta t...@example.com author_test iota iota test at example dot com iota unknown - author_test kappa ka...@example.com Unknown ka...@example.com + author_test kappa ka...@example.com Unknown ka...@example.com + author_test lambda lambda.lam...@example.com Unknown lambda.lam...@example.com ) git clone hg::hgrepo gitrepo -- 1.8.5.rc1.207.gc17dd22 -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] fixup! transport-helper: add 'force' to 'export' helpers
defend against force=foo in the user's environment Signed-off-by: Richard Hansen rhan...@bbn.com --- git-remote-testgit.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git-remote-testgit.sh b/git-remote-testgit.sh index 6d2f282..1cfdea2 100755 --- a/git-remote-testgit.sh +++ b/git-remote-testgit.sh @@ -15,6 +15,8 @@ test -z $refspec prefix=refs export GIT_DIR=$url/.git +force= + mkdir -p $dir if test -z $GIT_REMOTE_TESTGIT_NO_MARKS -- 1.8.5.rc1.207.gc17dd22 -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v5 12/10] remote-bzr: support the new 'force' option
Signed-off-by: Richard Hansen rhan...@bbn.com --- contrib/remote-helpers/git-remote-bzr | 34 +- contrib/remote-helpers/test-bzr.sh| 22 +- 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr index 7e34532..ba693d1 100755 --- a/contrib/remote-helpers/git-remote-bzr +++ b/contrib/remote-helpers/git-remote-bzr @@ -42,6 +42,7 @@ import json import re import StringIO import atexit, shutil, hashlib, urlparse, subprocess +import types NAME_RE = re.compile('^([^]+)') AUTHOR_RE = re.compile('^([^]+?)? ?[]([^]*)(?:$|)') @@ -684,7 +685,8 @@ def do_export(parser): peer = bzrlib.branch.Branch.open(peers[name], possible_transports=transports) try: -peer.bzrdir.push_branch(branch, revision_id=revid) +peer.bzrdir.push_branch(branch, revision_id=revid, +overwrite=force) except bzrlib.errors.DivergedBranches: print error %s non-fast forward % ref continue @@ -718,8 +720,34 @@ def do_capabilities(parser): print *import-marks %s % path print *export-marks %s % path +print option print +class InvalidOptionValue(Exception): +pass + +def do_option(parser): +(opt, val) = parser[1:3] +handler = globals().get('do_option_' + opt) +if handler and type(handler) == types.FunctionType: +try: +handler(val) +except InvalidOptionValue: +print error '%s' is not a valid value for option '%s' % (val, opt) +else: +print unsupported + +def do_bool_option(val): +if val == 'true': ret = True +elif val == 'false': ret = False +else: raise InvalidOptionValue() +print ok +return ret + +def do_option_force(val): +global force +force = do_bool_option(val) + def ref_is_valid(name): return not True in [c in name for c in '~^: \\'] @@ -882,6 +910,7 @@ def main(args): global is_tmp global branches, peers global transports +global force alias = args[1] url = args[2] @@ -895,6 +924,7 @@ def main(args): branches = {} peers = {} transports = [] +force = False if alias[5:] == url: is_tmp = True @@ -930,6 +960,8 @@ def main(args): do_import(parser) elif parser.check('export'): do_export(parser) +elif parser.check('option'): +do_option(parser) else: die('unhandled command: %s' % line) sys.stdout.flush() diff --git a/contrib/remote-helpers/test-bzr.sh b/contrib/remote-helpers/test-bzr.sh index ea597b0..7d7778f 100755 --- a/contrib/remote-helpers/test-bzr.sh +++ b/contrib/remote-helpers/test-bzr.sh @@ -69,13 +69,33 @@ test_expect_success 'pushing' ' test_cmp expected actual ' +test_expect_success 'forced pushing' ' + ( + cd gitrepo + echo three-new content + git commit -a --amend -m three-new + git push -f + ) + + ( + cd bzrrepo + # the forced update overwrites the bzr branch but not the bzr + # working directory (it tries to merge instead) + bzr revert + ) + + echo three-new expected + cat bzrrepo/content actual + test_cmp expected actual +' + test_expect_success 'roundtrip' ' ( cd gitrepo git pull git log --format=%s -1 origin/master actual ) - echo three expected + echo three-new expected test_cmp expected actual (cd gitrepo git push git pull) -- 1.8.5.rc1.207.gc17dd22 -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html