Git v2.3.0-rc2
A release candidate Git v2.3.0-rc2 is now available for testing at the usual places.
Hopefully this can become the final v2.3.0 next week, almost as-is. There are no regression noticed and/or fixed since -rc1, and the changes are mostly l10n and minor documentation updates.
The tarballs are found at:
https://www.kernel.org/pub/software/scm/git/testing/
The following public repositories all have a copy of the 'v2.3.0-rc2' tag and the 'master' branch that the tag points at:
url = https://kernel.googlesource.com/pub/scm/git/git
url = git://repo.or.cz/alt-git.git
url = https://code.google.com/p/git-core/
url = git://git.sourceforge.jp/gitroot/git-core/git.git
url = git://git-core.git.sourceforge.net/gitroot/git-core/git-core
url = https://github.com/gitster/git
Git v2.3 Release Notes (draft)
==============================
Updates since v2.2
------------------
Ports
* Recent gcc toolchain on Cygwin started throwing compilation warning, which has been squelched.
* A few updates to build on platforms that lack tv_nsec, clock_gettime, CLOCK_MONOTONIC and HMAC_CTX_cleanup (e.g. older RHEL) have been added.
UI, Workflows & Features
* It was cumbersome to use "GIT_SSH" mechanism when the user wanted to pass an extra set of arguments to the underlying ssh. A new environment variable GIT_SSH_COMMAND can be used for this.
* A request to store an empty note via "git notes" meant to remove note from the object but with --allow-empty we will store a (surprise!) note that is empty.
* "git interpret-trailers" learned to properly handle the "Conflicts:" block at the end.
* "git am" learned "--message-id" option to copy the message ID of the incoming e-mail to the log message of resulting commit.
* "git clone --reference=<over there>" learned the "--dissociate" option to go with it; it borrows objects from the reference object store while cloning only to reduce network traffic and then dissociates the resulting clone from the reference by performing local copies of borrowed objects.
* "git send-email" learned "--transfer-encoding" option to force a non-fault Content-Transfer-Encoding header (e.g. base64).
* "git send-email" normally identifies itself via X-Mailer: header in the message it sends out. A new command line flag --no-xmailer allows the user to squelch the header.
* "git push" into a repository with a working tree normally refuses to modify the branch that is checked out. The command learned to optionally do an equivalent of "git reset --hard" only when there is no change to the working tree and the index instead, which would be useful to "deploy" by pushing into a repository.
* "git new-workdir" (in contrib/) can be used to populate an empty and existing directory now.
* Credential helpers are asked in turn until one of them give positive response, which is cumbersome to turn off when you need to run Git in an automated setting. The credential helper interface learned to allow a helper to say "stop, don't ask other helpers." Also GIT_TERMINAL_PROMPT environment can be set to false to disable our built-in prompt mechanism for passwords.
* "git branch -d" (delete) and "git branch -m" (move) learned to honor "-f" (force) flag; unlike many other subcommands, the way to force these have been with separate "-D/-M" options, which was inconsistent.
* "diff-highlight" filter (in contrib/) allows its color output to be customized via configuration variables.
* "git imap-send" learned to take "-v" (verbose) and "-q" (quiet) command line options.
* "git remote add $name $URL" is now allowed when "url.$URL.insteadOf" is already defined.
* "git imap-send" now can be built to use cURL library to talk to IMAP servers (if the library is recent enough, of course). This allows you to use authenticate method other than CRAM-MD5, among other things.
* "git imap-send" now allows GIT_CURL_VERBOSE environment variable to control the verbosity when talking via the cURL library.
* The prompt script (in contrib/) learned to optionally hide prompt when in an ignored directory by setting GIT_PS1_HIDE_IF_PWD_IGNORED shell variable.
Performance, Internal Implementation, Development Support etc.
* Earlier we made "rev-list --object-edge" more aggressively list the objects at the edge commits, in order to reduce number of objects fetched into a shallow repository, but the change affected cases other than "fetching into a shallow repository" and made it unusably slow (e.g. fetching into a normal repository should not have to suffer the overhead from extra processing). Limit it to a more specific case by introducing --objects-edge-aggressive, a new option to rev-list.
* Squelched useless compiler warnings on Mac OS X regarding the crypto API.
* The procedure to generate unicode table has been simplified.
* Some filesystems assign filemodes in a strange way, fooling then automatic "filemode trustability" check done during a new repository creation. The initialization codepath has been hardened against this issue.
* The codepath in "git remote update --prune" to drop many refs has been optimized.
* The API into get_merge_bases*() family of functions was easy to misuse, which has been corrected to make it harder to do so.
* Long overdue departure from the assumption that S_IFMT is shared by everybody made in 2005, which was necessary to port to z/OS.
* "git push" and "git fetch" did not communicate an overlong refname correctly. Now it uses 64kB sideband to accommodate longer ones.
* Recent GPG changes the keyring format and drops support for RFC1991 formatted signatures, breaking our existing tests.
* "git-prompt" (in contrib/) used a variable from the global scope, possibly contaminating end-user's namespace.
Also contains various documentation updates and code clean-ups.
Fixes since v2.2
----------------
Unless otherwise noted, all the fixes since v2.2 in the maintenance track are contained in this release (see the maintenance releases' notes for details).
* "git http-push" over WebDAV (aka dumb http-push) was broken in v2.2.2 when parsing a symbolic ref, resulting in a bogus request that gets rejected by recent versions of cURL library. (merge f6786c8 jk/http-push-symref-fix later to maint).
* The logic in "git bisect bad HEAD" etc. to avoid forcing the test of the common ancestor of bad and good commits was broken. (merge 07913d5 cc/bisect-rev-parsing later to maint).
* "git checkout-index --temp=$target $path" did not work correctly for paths outside the current subdirectory in the project. (merge 74c4de5 es/checkout-index-temp later to maint).
* The report from "git checkout" on a branch that builds on another local branch by setting its branch.*.merge to branch name (not a full refname) incorrectly said that the upstream is gone. (merge 05e7368 jc/checkout-local-track-report later to maint).
* With The git-prompt support (in contrib/), using the exit status of the last command in the prompt, e.g. PS1='$(__git_ps1) $? ', did not work well, because the helper function stomped on the exit status.
(merge 6babe76 tf/prompt-preserve-exit-status later to maint).
* Recent update to "git commit" broke amending an existing commit with bogus author/committer lines without a valid e-mail address. (merge c83a509 jk/commit-date-approxidate later to maint).
* The lockfile API used to get confused which file to clean up when the process moved the $cwd after creating a lockfile. (merge fa137f6 nd/lockfile-absolute later to maint).
* Traditionally we tried to avoid interpreting date strings given by the user as future dates, e.g. GIT_COMMITTER_DATE=2014-12-10 when used early November 2014 was taken as "October 12, 2014" because it is likely that a date in the future, December 10, is a mistake. This heuristics has been loosened to allow people to express future dates (most notably, --until=<date> may want to be far in the future) and we no longer tiebreak by future-ness of the date when
(1) ISO-like format is used, and
(2) the string can make sense interpreted as both y-m-d and y-d-m.
Git may still have to use the heuristics to tiebreak between dd/mm/yy and mm/dd/yy, though.
(merge d372395 jk/approxidate-avoid-y-d-m-over-future-dates later to maint).
* Git did not correctly read an overlong refname from a packed refs file.
(merge ea41783 jk/read-packed-refs-without-path-max later to maint).
* "git apply" was described in the documentation to take --ignore-date option, which it does not.
(merge 0cef4e7 rw/apply-does-not-take-ignore-date later to maint).
* "git add -i" did not notice when the interactive command input stream went away and kept asking the same question. (merge a8bec7a jk/add-i-read-error later to maint).
* "git send-email" did not handle RFC 2047 encoded headers quite right.
(merge ab47e2a rd/send-email-2047-fix later to maint).
* New tag object format validation added in 2.2 showed garbage after a tagname it reported in its error message.
(merge a1e920a js/fsck-tag-validation later to maint).
* The code that reads the reflog from the newer to the older entries did not handle an entry that crosses a boundary of block it uses to read them correctly.
(merge 69216bf jk/for-each-reflog-ent-reverse later to maint).
* "git diff -B -M" after making a new copy B out of an existing file A and then editing A extensively ought to report that B was created by copying A and A was modified, which is what "git diff -C" reports, but it instead said A was renamed to B and A was edited heavily in place. This was not just incoherent but also failed to apply with "git apply". The report has been corrected to match what "git diff -C" produces for this case.
(merge 6936b58 jc/diff-b-m later to maint).
* In files we pre-populate for the user to edit with commented hints, a line of hint that is indented with a tab used to show as '#' (or any comment char), ' ' (space), and then the hint text that began with the tab, which some editors flag as an indentation error (tab following space). We now omit the space after the comment char in such a case.
(merge d55aeb7 jc/strbuf-add-lines-avoid-sp-ht-sequence later to maint).
* "git ls-tree" does not support path selection based on negative pathspecs, but did not error out when negative pathspecs are given. (merge f1f6224 nd/ls-tree-pathspec later to maint).
* The function sometimes returned a non-freeable memory and some other times returned a piece of memory that must be freed, leading to inevitable leaks.
(merge 59362e5 jc/exec-cmd-system-path-leak-fix later to maint).
* The code to abbreviate an object name to its short unique prefix has been optimized when no abbreviation was requested. (merge 61e704e mh/find-uniq-abbrev later to maint).
* "git add --ignore-errors ..." did not ignore an error to give a file that did not exist.
(merge 1d31e5a mg/add-ignore-errors later to maint).
* "git checkout $treeish $path", when $path in the index and the working tree already matched what is in $treeish at the $path, still overwrote the $path unnecessarily.
(merge c5326bd jk/checkout-from-tree later to maint).
* "git config --get-color" did not parse its command line arguments carefully.
(merge cb35722 jk/colors-fix later to maint).
* open() emulated on Windows platforms did not give EISDIR upon an attempt to open a directory for writing.
(merge ba6fad0 js/windows-open-eisdir-error later to maint).
* A few code paths used abs() when they should have used labs() on long integers.
(merge 83915ba rs/maint-config-use-labs later to maint). (merge 31a8aa1 rs/receive-pack-use-labs later to maint).
* "gitweb" used to depend on a behaviour recent CGI.pm deprecated. (merge 13dbf46 jk/gitweb-with-newer-cgi-multi-param later to maint).
* "git init" (hence "git clone") initialized the per-repository configuration file .git/config with x-bit by mistake. (merge 1f32ecf mh/config-flip-xbit-back-after-checking later to maint).
* Recent update in Git 2.2 started creating objects/info/packs and info/refs files with permission bits tighter than user's umask. (merge d91175b jk/prune-packed-server-info later to maint).
* Git 2.0 was supposed to make the "simple" mode for the default of "git push", but it didn't.
(merge 00a6fa0 jk/push-simple later to maint).
* "Everyday" document had a broken link. (merge 366c8d4 po/everyday-doc later to maint).
* A few test fixes.
(merge 880ef58 jk/no-perl-tests later to maint).
* The build procedure did not bother fixing perl and python scripts when NO_PERL and NO_PYTHON build-time configuration changed.
(merge ca2051d jk/rebuild-perl-scripts-with-no-perl-seting-change later to maint).
* The usage string of "git log" command was marked incorrectly for l10n.
(merge e66dc0c km/log-usage-string-i18n later to maint).
* "git for-each-ref" mishandled --format="%(upstream:track)" when a branch is marked to have forked from a non-existing branch. (merge b6160d9 rc/for-each-ref-tracking later to maint).
----------------------------------------------------------------
Changes since v2.3.0-rc1 are as follows:
Alex Henrie (1):
l10n: ca.po: update translation
Alexander Kuleshov (1):
cat-file: use "type" and "size" from outer scope
Benedikt Heine (1):
l10n: de.po: fix typo
Jean-Noel Avila (2):
l10n: fr.po v2.3.0 round 1
l10n: fr.po v2.3.0 round 2Jiang Xin (5):
l10n: git.pot: v2.3.0 round 1 (13 new, 11 removed)
l10n: zh_CN: translations for git v2.3.0-rc0
l10n: git.pot: v2.3.0 round 2 (3 updated)
l10n: zh_CN: various fixes on command arguments
l10n: correct indentation of show-branch usageJoan Perals (1):
l10n: ca.po: various fixes
Johannes Sixt (1):
t1050-large: generate large files without dd
Junio C Hamano (1):
Git 2.3.0-rc2
Kacper Kornet (1):
Fix unclosed here document in t3301.sh
Michael J Gruber (2):
l10n: de.po: translate "leave behind" correctly
l10n: de.po: correct singular form
Peter Krefting (2):
l10n: sv.po: Update Swedish translation (2298t0f0u)
l10n: sv.po: Update Swedish translation (2298t0f0u)Ralf Thielow (4):
l10n: de.po: translate "track" as "versionieren"
l10n: de.po: fix typo
l10n: de.po: translate 13 new messages
l10n: de.po: translate 3 messages
Sven van Haastregt (1):
Documentation: fix version numbering
Trần Ngọc Quân (2):
l10n: vi.po(2298t): Updated and change Plural-Forms
l10n: vi.po(2298t): Updated 3 new strings
Broken makefile check for curl version on el4 [Re: [ANNOUNCE] Git v2.3.0-rc2]
Quoted 3 lines · Junio C Hamano
A release candidate Git v2.3.0-rc2 is now available for testing at the usual places.
Building is broken on RHEL4 which is a regression from 2.2.2.
The makefile check for curl >= 7.34.0 fails and enables USE_CURL_FOR_IMAP_SEND even though curl is 7.12.1.
# curl-config --vernum
70C01
# { echo 072200; curl-config --vernum 2>/dev/null ; } | sort -r | sed -ne 2p
072200
#I checked the curl release tarballs and this problem seems to exist for curl 7.11.0 (0x70B00) through 7.12.2 (0x70C02). In both 7.10.7 (0x070a07) and 7.12.3 (0x070c03) the version is correctly set using 6 hex digits as documented. I tried to verify this using the official curl repo on github but it does not seem to record this discrepancy and shows the correct 6 digit version numbers for the affected releases.
As a workaround I'm piping curl-config --vernum through sed -e '/^70[B-C]/ s/^7/07/'.
-tgc
PATCH 1/1 Makefile: Handle broken curl version number in version check
curl 7.11.0 through 7.12.2 when built from their official release archives will present a 5 digit version number instead of the documented 6 digits which breaks the version check in the Makefile. Correct these broken version numbers on the fly when extracting them to ensure the comparison works correctly.
---
This was discoved while building on RHEL4 which has curl 7.12.1. The makefile check for curl >= 7.34.0 failed and enabled USE_CURL_FOR_IMAP_SEND.
# curl-config --vernum
70C01
# { echo 072200; curl-config --vernum 2>/dev/null ; } | sort -r | sed -ne 2p
072200
#I checked the curl release tarballs and this problem seems to exist for curl 7.11.0 (0x70B00) through 7.12.2 (0x70C02). In both 7.10.7 (0x070a07) and 7.12.3 (0x070c03) the version is correctly set using 6 hex digits as documented.
I tried to verify this using the official curl repo on github but it does not seem to record this discrepancy and shows the correct 6 digit version numbers for the affected releases.
Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile +2 -2
@@ -1035,13 +1035,13 @@ else REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES) PROGRAM_OBJS += http-fetch.o PROGRAMS += $(REMOTE_CURL_NAMES) - curl_check := $(shell (echo 070908; curl-config --vernum) 2>/dev/null | sort -r | sed -ne 2p) + curl_check := $(shell (echo 070908; curl-config --vernum | sed -e '/^70[B-C]/ s/^7/07/') 2>/dev/null | sort -r | sed -ne 2p) ifeq "$(curl_check)" "070908" ifndef NO_EXPAT PROGRAM_OBJS += http-push.o endif endif - curl_check := $(shell (echo 072200; curl-config --vernum) 2>/dev/null | sort -r | sed -ne 2p) + curl_check := $(shell (echo 072200; curl-config --vernum | sed -e '/^70[B-C]/ s/^7/07/') 2>/dev/null | sort -r | sed -ne 2p) ifeq "$(curl_check)" "072200" USE_CURL_FOR_IMAP_SEND = YesPlease endif
Signature · 1 line
2.2.2
Re: [PATCH] Makefile: Handle broken curl version number in version check
Makefile else · line 1038
Quoted 10 lines · Tom G. Christensen
Makefile +1
-1@@ -1035,13 +1035,13 @@ else REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES) PROGRAM_OBJS += http-fetch.o PROGRAMS += $(REMOTE_CURL_NAMES) - curl_check := $(shell (echo 070908; curl-config --vernum) 2>/dev/null | sort -r | sed -ne 2p) + curl_check := $(shell (echo 070908; curl-config --vernum | sed -e '/^70[B-C]/ s/^7/07/') 2>/dev/null | sort -r | sed -ne 2p)
How about 's/^.....$/0&/' ?
Andreas.
Signature · 3 lines
Andreas Schwab, [email protected] GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Re: [PATCH] Makefile: Handle broken curl version number in version check
Quoted 15 lines · Andreas Schwab
Makefile else · line 1038
Quoted 10 lines · Tom G. Christensen
Makefile +1
-1@@ -1035,13 +1035,13 @@ else REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES) PROGRAM_OBJS += http-fetch.o PROGRAMS += $(REMOTE_CURL_NAMES) - curl_check := $(shell (echo 070908; curl-config --vernum) 2>/dev/null | sort -r | sed -ne 2p) + curl_check := $(shell (echo 070908; curl-config --vernum | sed -e '/^70[B-C]/ s/^7/07/') 2>/dev/null | sort -r | sed -ne 2p)How about 's/^.....$/0&/' ?
I have no preference so whatever is the most likely to be accepted and does the job is fine with me.
-tgc
Re: [PATCH] Makefile: Handle broken curl version number in version check
In reply to Andreas SchwabQuoted 16 lines · Andreas Schwab
Makefile else · line 1040
Quoted 12 lines · Tom G. Christensen
Makefile +1
-1@@ -1035,13 +1035,13 @@ else REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES) PROGRAM_OBJS += http-fetch.o PROGRAMS += $(REMOTE_CURL_NAMES) - curl_check := $(shell (echo 070908; curl-config --vernum) 2>/dev/ null | sort -r | sed -ne 2p) + curl_check := $(shell (echo 070908; curl-config --vernum | sed -e '/^70[B-C]/ s/^7/07/') 2>/dev/null | sort -r | sed -ne 2p)How about 's/^.....$/0&/' ?
Much nicer. But that '$' will have to be escaped from make so it will need to be 's/^.....$$/0&/'
Re: [PATCH] Makefile: Handle broken curl version number in version check
In reply to Tom G. ChristensenQuoted 10 lines · Tom G. Christensen
Makefile +1
-1@@ -1035,13 +1035,13 @@ else REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES) PROGRAM_OBJS += http-fetch.o PROGRAMS += $(REMOTE_CURL_NAMES) - curl_check := $(shell (echo 070908; curl-config --vernum) 2>/dev/null | sort -r | sed -ne 2p) + curl_check := $(shell (echo 070908; curl-config --vernum | sed -e '/^70[B-C]/ s/^7/07/') 2>/dev/null | sort -r | sed -ne 2p)
Makefile else · line 1047
Quoted 10 lines
Makefile +1
-1ifeq "$(curl_check)" "070908" ifndef NO_EXPAT PROGRAM_OBJS += http-push.o endif endif - curl_check := $(shell (echo 072200; curl-config --vernum) 2>/dev/null | sort -r | sed -ne 2p) + curl_check := $(shell (echo 072200; curl-config --vernum | sed -e '/^70[B-C]/ s/^7/07/') 2>/dev/null | sort -r | sed -ne 2p) ifeq "$(curl_check)" "072200" USE_CURL_FOR_IMAP_SEND = YesPlease endif
Thanks, will apply but with sed part tweaked to '/^70[BC]/s/^/0/' instead.
The existing tests that copied and pasted are bad enough. Can we consolidate them into some helper or a shorter idiom that lets us more easily ask "Do we have cURL version X or higher?"
All gnupg tests broken on el4 [Re: [ANNOUNCE] Git v2.3.0-rc2]
In reply to Junio C HamanoQuoted 3 lines · Junio C Hamano
A release candidate Git v2.3.0-rc2 is now available for testing at the usual places.
All signed commit tests fail on RHEL4 which is a regression from 2.2.2.
From t4202.42:
++ git tag -s -m signed_tag_msg signed_tag
gpg: key CDDE430D: secret key without public key - skipped
gpg: skipped `C O Mitter <[email protected]>': secret key not available
gpg: signing failed: secret key not available
error: gpg failed to sign the data
error: unable to sign the tag
error: last command exited with $?=128
There are indeed no public keys available after commit 1e3eef which seems to be contrary to the commit log:
----
Instead import public and secret keys for one key pair from a text
file that holds ASCII-armored export of them.
----
I extracted the pubkeys as ascii armored text from the old binary keyrings and added them to the new keyring.gpg and then the tests pass.
This is apparently only a problem for older gnupg versions (RHEL4 has gnupg 1.2.6) since it did not fail on RHEL5 (gnupg 1.4.5).
-tgc
Re: All gnupg tests broken on el4 [Re: [ANNOUNCE] Git v2.3.0-rc2]
Quoted 19 lines · Tom G. Christensen
All signed commit tests fail on RHEL4 which is a regression from 2.2.2.
From t4202.42:
++ git tag -s -m
signed_tag_msgsigned_tag
gpg: key CDDE430D: secret key without public key - skipped
gpg: skipped `C O Mitter <[email protected]>': secret key not available
gpg: signing failed: secret key not available
error: gpg failed to sign the data
error: unable to sign the tag
error: last command exited with $?=128There are indeed no public keys available after commit 1e3eef which seems to be contrary to the commit log:
----
Instead import public and secret keys for one key pair from a text file that holds ASCII-armored export of them.
----
Quoted 5 lines
I extracted the pubkeys as ascii armored text from the old binary keyrings and added them to the new keyring.gpg and then the tests pass.
This is apparently only a problem for older gnupg versions (RHEL4 has gnupg 1.2.6) since it did not fail on RHEL5 (gnupg 1.4.5).
Weird. The pubkeys are there in keyring.gpg; I wonder why the older version of gpg has trouble extracting them (and how one was _supposed_ to export secret keys at that time).
So if I understand you correctly, the tests should pass with the patch below?
It feels a bit hacky, and I wish I knew more about why the current file doesn't work (i.e., if we did "gpg --export-secret-keys" with v1.2.6, would it produce different output that can be read by both versions?). Another option is to just declare that version old and broken, and skip the tests (either by checking its version, or just checking after we import the keys that we can actually _use_ them).
-- >8 --
Subject: [PATCH] t/lib-gpg: include separate public keys in keyring.gpg
Since 1e3eefb (tests: replace binary GPG keyrings with ASCII-armored keys, 2014-12-12), we import our test GPG keys from a single file. Each keypair in the import stream contains both the secret and public keys. However, older versions of gpg reportedly fail to import the public half of the key. We can solve this by including duplicates of the public keys separately. The duplicates are ignored by modern gpg, and this makes older versions work.
Reported by Tom G. Christensen <[email protected]> on gpg 1.2.6 (from RHEL4).
--- t/lib-gpg.sh | 2 ++ t/lib-gpg/keyring.gpg | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+)
t/lib-gpg.sh +2 -0
@@ -23,6 +23,8 @@ else # To write armored exported key to keyring: # gpg --homedir /tmp/gpghome --export-secret-keys \ # --armor 0xDEADBEEF >> lib-gpg/keyring.gpg + # gpg --homedir /tmp/gpghome --export \ + # --armor 0xDEADBEEF >> lib-gpg/keyring.gpg # To export ownertrust: # gpg --homedir /tmp/gpghome --export-ownertrust \ # > lib-gpg/ownertrust
t/lib-gpg/keyring.gpg +54 -0
57 lines not on this page · raw message
Signature · 1 line
2.3.0.rc1.287.g761fd19
Re: All gnupg tests broken on el4 [Re: [ANNOUNCE] Git v2.3.0-rc2]
Quoted 6 lines · Jeff King
It feels a bit hacky, and I wish I knew more about why the current file doesn't work (i.e., if we did "gpg --export-secret-keys" with v1.2.6, would it produce different output that can be read by both versions?). Another option is to just declare that version old and broken, and skip the tests (either by checking its version, or just checking after we import the keys that we can actually _use_ them).
That would look like this:
-- >8 --
Subject: [PATCH] t/lib-gpg: sanity-check that we can actually sign
Some older versions of gpg (reportedly v1.2.6 from RHEL4) cannot import the keyrings found in our test suite, and thus cannot even make a signature. We can detect this case by doing a test-sign before declaring the GPG prerequisite fulfilled.
--- t/lib-gpg.sh | 2 ++ 1 file changed, 2 insertions(+)
t/lib-gpg.sh +2 -0
@@ -34,6 +34,8 @@ else "$TEST_DIRECTORY"/lib-gpg/keyring.gpg && gpg --homedir "${GNUPGHOME}" 2>/dev/null --import-ownertrust \ "$TEST_DIRECTORY"/lib-gpg/ownertrust && + gpg --homedir "${GNUPGHOME}" </dev/null >/dev/null 2>&1 \ + --sign -u [email protected] && test_set_prereq GPG ;; esac
Signature · 1 line
2.3.0.rc1.287.g761fd19
Re: All gnupg tests broken on el4 [Re: [ANNOUNCE] Git v2.3.0-rc2]
In reply to Jeff KingQuoted 4 lines · Jeff King
Weird. The pubkeys are there in keyring.gpg; I wonder why the older version of gpg has trouble extracting them (and how one was _supposed_ to export secret keys at that time).
Importing the unmodified keyring.gpg with 1.2.6 yields this:
$ gpg --homedir "$GNUPGHOME" --import /tmp/keyring.gpg gpg: keyring `/home/tgc/gpghome/secring.gpg' created gpg: keyring `/home/tgc/gpghome/pubring.gpg' created gpg: key CDDE430D: secret key imported gpg: key B7227189: secret key imported gpg: Total number processed: 2 gpg: secret keys read: 2 gpg: secret keys imported: 2 $ gpg --homedir "$GNUPGHOME" --list-keys $ gpg --homedir "$GNUPGHOME" --list-secret-keys /home/tgc/gpghome/secring.gpg ----------------------------- sec 1024D/CDDE430D 2007-06-07 C O Mitter <[email protected]> ssb 2048g/7703B0E5 2007-06-07
sec 2048R/B7227189 2013-03-22 Eris Discordia <[email protected]> ssb 2048R/29472784 2013-03-22
$
Quoted 3 lines
So if I understand you correctly, the tests should pass with the patch below?
Yes, adding the pubkeys as a separate entity makes gpg 1.2.6 understand things fine.
gnupg 1.2.6 with the patched keyring:
$ gpg --homedir "$GNUPGHOME" --import /tmp/keyring.gpg gpg: keyring `/home/tgc/gpghome/secring.gpg' created gpg: keyring `/home/tgc/gpghome/pubring.gpg' created gpg: key CDDE430D: secret key imported gpg: key B7227189: secret key imported gpg: /home/tgc/gpghome/trustdb.gpg: trustdb created gpg: key CDDE430D: public key "C O Mitter <[email protected]>" imported gpg: key B7227189: public key "Eris Discordia <[email protected]>" imported gpg: Total number processed: 4 gpg: imported: 2 (RSA: 1) gpg: secret keys read: 2 gpg: secret keys imported: 2 $ gpg --homedir "$GNUPGHOME" --list-keys /home/tgc/gpghome/pubring.gpg ----------------------------- pub 1024D/CDDE430D 2007-06-07 C O Mitter <[email protected]> sub 2048g/7703B0E5 2007-06-07
pub 2048R/B7227189 2013-03-22 Eris Discordia <[email protected]> sub 2048R/29472784 2013-03-22
$
The patch should work as posted, though I have only tested the new keyring by hand as shown above.
Quoted 3 lines
It feels a bit hacky, and I wish I knew more about why the current file doesn't work (i.e., if we did "gpg --export-secret-keys" with v1.2.6, would it produce different output that can be read by both versions?).
I grabbed the binary keyrings from 1e3eefb^ and pointed gpg 1.2.6 at them.
$ gpg --homedir "$GNUPGHOME" --armor --export-secret-keys CDDE430D > CDDE430D.secret.key $ gpg --homedir "$PWD/gpghome3" --import CDDE430D.secret.key gpg: keyring `/home/tgc/gpghome3/secring.gpg' created gpg: keyring `/home/tgc/gpghome3/pubring.gpg' created gpg: key CDDE430D: secret key imported gpg: Total number processed: 1 gpg: secret keys read: 1 gpg: secret keys imported: 1 $ gpg --homedir "$PWD/gpghome3" --list-keys $
No public key imported however the pubkey *was* exported to CDDE430D.secret.key
Importing that same keyfile using gnupg 1.4.5 on an RHEL5 host:
$ gpg --homedir "$PWD/gpghome" --import /tmp/CDDE430D.secret.key gpg: keyring `/home/tgc/gpghome/secring.gpg' created gpg: keyring `/home/tgc/gpghome/pubring.gpg' created gpg: key CDDE430D: secret key imported gpg: /home/tgc/gpghome/trustdb.gpg: trustdb created gpg: key CDDE430D: public key "C O Mitter <[email protected]>" imported gpg: Total number processed: 1 gpg: imported: 1 gpg: secret keys read: 1 gpg: secret keys imported: 1 $ gpg --homedir "/home/tgc/gpghome" --list-keys /home/tgc/gpghome/pubring.gpg ----------------------------- pub 1024D/CDDE430D 2007-06-07 uid C O Mitter <[email protected]> sub 2048g/7703B0E5 2007-06-07 $
So gnupg 1.2.6 can export fine but cannot correctly import the same.
Quoted 4 lines
Another option is to just declare that version old and broken, and skip the tests (either by checking its version, or just checking after we import the keys that we can actually _use_ them).
That would seem a bit heavy-handed as it is otherwise working fine with the old gnupg.
<snip patch>
-tgc
Signature · 4 lines
Tom G. Christensen - Systemmedarbejder - IT-drift Statsbiblioteket - Victor Albecks Vej 1 - 8000 Aarhus C Tlf: (+45) 8946 2027 - Fax: (+45) 8946 2029 CVR/SE: 10100682 - EAN: 5798000791084
Re: All gnupg tests broken on el4 [Re: [ANNOUNCE] Git v2.3.0-rc2]
Quoted 8 lines · Tom G. Christensen
Quoted 4 lines · Jeff King
Another option is to just declare that version old and broken, and skip the tests (either by checking its version, or just checking after we import the keys that we can actually _use_ them).
That would seem a bit heavy-handed as it is otherwise working fine with the old gnupg.
Thanks, both, for tracking this one down.
I am tempted to say that we should do both. This "export public key, even though new importers do not need" fix to make things usable with 1.2.6, and the other one to catch and skip breakages when future versions of GPG breaks us in whichever way we do not anticipate now.
Testsuite regression with perl 5.8.0 [Re: [ANNOUNCE] Git v2.3.0-rc2]
In reply to Junio C HamanoQuoted 3 lines · Junio C Hamano
A release candidate Git v2.3.0-rc2 is now available for testing at the usual places.
Commit 2cf770 added testing of the --[no-]xmailer option to git send-email in t9001-send-email.sh
Unfortunately it used the modern Getopt::long style of --no-<option> to negate the option which is not supported with Getopt::Long 2.32 as shipped with perl 5.8.0 on RHEL3 causing the tests to fail.
Changing the --no-xmailer option to the old --noxmailer style allows the tests to pass.
-tgc
PATCH 1/1 t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'
The '--no-xmailer' option is a Getopt::Long boolean option. The '--no-' prefix (as in --no-xmailer) for boolean options is not supported in Getopt::Long version 2.32 which was released with Perl 5.8.0. This version only supports '--no' as in '--noxmailer'. More recent versions of Getopt::Long, such as version 2.34, support either prefix. So use the older form in the tests.
See also:
d2559f734bba7fe5257720356a92f3b7a5b0d37c907a0b1e04ea31cb368e9422df93d8ebb018791484eeb687de7a6c7c42af3fb51b176e0f412a979e3fee1fe87144360a1913eab86af9ad136c810076
--- t/t9001-send-email.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
t/t9001-send-email.sh +3 -3
@@ -1580,20 +1580,20 @@ do_xmailer_test () { test_expect_success $PREREQ '--[no-]xmailer without any configuration' ' do_xmailer_test 1 "--xmailer" && - do_xmailer_test 0 "--no-xmailer" + do_xmailer_test 0 "--noxmailer" ' test_expect_success $PREREQ '--[no-]xmailer with sendemail.xmailer=true' ' test_config sendemail.xmailer true && do_xmailer_test 1 "" && - do_xmailer_test 0 "--no-xmailer" && + do_xmailer_test 0 "--noxmailer" && do_xmailer_test 1 "--xmailer" ' test_expect_success $PREREQ '--[no-]xmailer with sendemail.xmailer=false' ' test_config sendemail.xmailer false && do_xmailer_test 0 "" && - do_xmailer_test 0 "--no-xmailer" && + do_xmailer_test 0 "--noxmailer" && do_xmailer_test 1 "--xmailer" '
Signature · 1 line
2.2.1
Re: [PATCH] t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'
Quoted 27 lines · Tom G. Christensen
The '--no-xmailer' option is a
Getopt::Longboolean option. The '--no-' prefix (as in --no-xmailer) for boolean options is not supported inGetopt::Longversion 2.32 which was released with Perl 5.8.0. This version only supports '--no' as in '--noxmailer'. More recent versions ofGetopt::Long, such as version 2.34, support either prefix. So use the older form in the tests.See also:
d2559f734bba7fe5257720356a92f3b7a5b0d37c907a0b1e04ea31cb368e9422df93d8ebb018791484eeb687de7a6c7c42af3fb51b176e0f412a979e3fee1fe87144360a1913eab86af9ad136c810076Signed-off-by Tom G. Christensen <[email protected]>---
t/t9001-send-email.sh| 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)t/t9001-send-email.sh +0
-0@@ -1580,20 +1580,20 @@ do_xmailer_test () {
test_expect_success$PREREQ '--[no-]xmailer without any configuration' 'do_xmailer_test 1 "--xmailer" &&
t/t9001-send-email.sh do_xmailer_test () { · line 1583
Quoted 2 lines
t/t9001-send-email.sh +1
-1- do_xmailer_test 0 "--no-xmailer" + do_xmailer_test 0 "--noxmailer"
I don't think this is an adequate fix. The documented option is --no-xmailer. If your version of Getopt::Long is not capable of that, then the program doesn't work as documented, and the test is correctly failing. --noxmailer is not documented at all, so it's not something we should be testing.
We should probably require a certain version of Getopt::Long or explicitly handle this in the parsing code itself. I think the former is a better choice, since no security-supported OS still ships with such a positively ancient version.
Signature · 3 lines
brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
Re: [PATCH] t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'
Quoted 28 lines · brian m. carlson
Quoted 27 lines · Tom G. Christensen
The '--no-xmailer' option is a
Getopt::Longboolean option. The '--no-' prefix (as in --no-xmailer) for boolean options is not supported inGetopt::Longversion 2.32 which was released with Perl 5.8.0.
This version only supports '--no' as in '--noxmailer'. More recent versions ofGetopt::Long, such as version 2.34, support either prefix. So
use the older form in the tests.See also:
d2559f734bba7fe5257720356a92f3b7a5b0d37c907a0b1e04ea31cb368e9422df93d8ebb018791484eeb687de7a6c7c42af3fb51b176e0f412a979e3fee1fe87144360a1913eab86af9ad136c810076Signed-off-by Tom G. Christensen <[email protected]>---
t/t9001-send-email.sh| 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)t/t9001-send-email.sh +0
-0@@ -1580,20 +1580,20 @@ do_xmailer_test () {
Quoted 11 lines
t/t9001-send-email.sh
Quoted 5 lines
test_expect_success$PREREQ '--[no-]xmailer without any configuration' 'do_xmailer_test 1 "--xmailer" &&t/t9001-send-email.sh +1
-1- do_xmailer_test 0 "--no-xmailer" + do_xmailer_test 0 "--noxmailer"I don't think this is an adequate fix. The documented option is -- no-xmailer. If your version of
Getopt::Longis not capable of that, then the program doesn't work as documented, and the test is correctly failing. --noxmailer is not documented at all, so it's not something we should be testing.
It is not alone. From the git-send-email help these are all boolean options:
Quoted 14 lines
git send-email
Composing:
--[no-]xmailer --[no-]annotateAutomating:
--[no-]cc-cover --[no-]to-cover --[no-]signed-off-by-cc --[no-]suppress-from --[no-]chain-reply-to --[no-]thread
Quoted 3 lines
Administering:
--[no-]validate --[no-]format-patch
Anything done to fix --no-xmailer should be applied for all the other --no-... options as well.
Quoted 4 lines
We should probably require a certain version of
Getopt::Longor explicitly handle this in the parsing code itself. I think the former is a better choice, since no security-supported OS still ships with such a positively ancient version.
I don't really like that second option because all the .perl files have:
Quoted 1 line
use 5.008;
So either that needs to change or the code should properly deal with the version of Getopt::Long that comes with 5.8.0.
Since it's really not very difficult or invasive to add support for the no- variants, here's a patch to do so:
-- 8< --
Subject: [PATCH] git-send-email.perl: support no- prefix with older GetOptions
Only Perl version 5.8.0 or later is required, but that comes with an older Getopt::Long (2.32) that does not support the 'no-' prefix. Support for that was added in Getopt::Long version 2.33.
Since the help only mentions the 'no-' prefix and not the 'no' prefix, add explicit support for the 'no-' prefix when running with older GetOptions versions.
--- git-send-email.perl | 10 ++++++++++ 1 file changed, 10 insertions(+)
git-send-email.perl +10 -0
@@ -299,6 +299,7 @@ my $rc = GetOptions("h" => \$help, "bcc=s" => \@bcclist, "no-bcc" => \$no_bcc, "chain-reply-to!" => \$chain_reply_to, + "no-chain-reply-to" => sub {$chain_reply_to = 0}, "smtp-server=s" => \$smtp_server, "smtp-server-option=s" => \@smtp_server_options, "smtp-server-port=s" => \$smtp_server_port,
@@ -311,25 +312,34 @@ my $rc = GetOptions("h" => \$help, "smtp-domain:s" => \$smtp_domain, "identity=s" => \$identity, "annotate!" => \$annotate, + "no-annotate" => sub {$annotate = 0}, "compose" => \$compose, "quiet" => \$quiet, "cc-cmd=s" => \$cc_cmd, "suppress-from!" => \$suppress_from, + "no-suppress-from" => sub {$suppress_from = 0}, "suppress-cc=s" => \@suppress_cc, "signed-off-cc|signed-off-by-cc!" => \$signed_off_by_cc, + "no-signed-off-cc|no-signed-off-by-cc" => sub {$signed_off_by_cc = 0}, "cc-cover|cc-cover!" => \$cover_cc, + "no-cc-cover" => sub {$cover_cc = 0}, "to-cover|to-cover!" => \$cover_to, + "no-to-cover" => sub {$cover_to = 0}, "confirm=s" => \$confirm, "dry-run" => \$dry_run, "envelope-sender=s" => \$envelope_sender, "thread!" => \$thread, + "no-thread" => sub {$thread = 0}, "validate!" => \$validate, + "no-validate" => sub {$validate = 0}, "transfer-encoding=s" => \$target_xfer_encoding, "format-patch!" => \$format_patch, + "no-format-patch" => sub {$format_patch = 0}, "8bit-encoding=s" => \$auto_8bit_encoding, "compose-encoding=s" => \$compose_encoding, "force" => \$force, "xmailer!" => \$use_xmailer, + "no-xmailer" => sub {$use_xmailer = 0}, ); usage() if $help;
--
Re: [PATCH] t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'
Quoted 7 lines · Kyle J. McKay
Quoted 1 line
use 5.008;
So either that needs to change or the code should properly deal with the version of
Getopt::Longthat comes with 5.8.0.Since it's really not very difficult or invasive to add support for the no- variants, here's a patch to do so:
Doesn't that approach add "what does --no-no-chain-rely-to even mean?" confusion to the resulting system? If that is not the case, then I am all for it, but otherwise, let's not.
People can easily spell --noxmailer if they want to stay at an older Getopt::Long, and over time these ancient ones will be upgraded away.
Quoted 65 lines
-- 8< --
Subject: [PATCH] git-send-email.perl: support no- prefix with older GetOptionsOnly Perl version 5.8.0 or later is required, but that comes with an older
Getopt::Long(2.32) that does not support the 'no-' prefix. Support for that was added inGetopt::Longversion 2.33.Since the help only mentions the 'no-' prefix and not the 'no' prefix, add explicit support for the 'no-' prefix when running with older GetOptions versions.
Reported-by Tom G. Christensen <[email protected]>Signed-off-by Kyle J. McKay <[email protected]>--- git-send-email.perl | 10 ++++++++++ 1 file changed, 10 insertions(+)git-send-email.perl +10
-1@@ -299,6 +299,7 @@ my $rc = GetOptions("h" => \$help, "bcc=s" => \@bcclist, "no-bcc" => \$no_bcc, "chain-reply-to!" => \$chain_reply_to, + "no-chain-reply-to" => sub {$chain_reply_to = 0}, "smtp-server=s" => \$smtp_server, "smtp-server-option=s" => \@smtp_server_options, "smtp-server-port=s" => \$smtp_server_port,@@ -311,25 +312,34 @@ my $rc = GetOptions("h" => \$help, "smtp-domain:s" => \$smtp_domain, "identity=s" => \$identity, "annotate!" => \$annotate, + "no-annotate" => sub {$annotate = 0}, "compose" => \$compose, "quiet" => \$quiet, "cc-cmd=s" => \$cc_cmd, "suppress-from!" => \$suppress_from, + "no-suppress-from" => sub {$suppress_from = 0}, "suppress-cc=s" => \@suppress_cc, "signed-off-cc|signed-off-by-cc!" => \$signed_off_by_cc, + "no-signed-off-cc|no-signed-off-by-cc" => sub {$signed_off_by_cc = 0}, "cc-cover|cc-cover!" => \$cover_cc, + "no-cc-cover" => sub {$cover_cc = 0}, "to-cover|to-cover!" => \$cover_to, + "no-to-cover" => sub {$cover_to = 0}, "confirm=s" => \$confirm, "dry-run" => \$dry_run, "envelope-sender=s" => \$envelope_sender, "thread!" => \$thread, + "no-thread" => sub {$thread = 0}, "validate!" => \$validate, + "no-validate" => sub {$validate = 0}, "transfer-encoding=s" => \$target_xfer_encoding, "format-patch!" => \$format_patch, + "no-format-patch" => sub {$format_patch = 0}, "8bit-encoding=s" => \$auto_8bit_encoding, "compose-encoding=s" => \$compose_encoding, "force" => \$force, "xmailer!" => \$use_xmailer, + "no-xmailer" => sub {$use_xmailer = 0}, ); usage() if $help; --
Re: [PATCH] t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'
Quoted 7 lines · Junio C Hamano
Quoted 5 lines · Kyle J. McKay
Quoted 1 line
use 5.008;
So either that needs to change or the code should properly deal with the version of
Getopt::Longthat comes with 5.8.0.
Quoted 6 lines
Quoted 2 lines
Since it's really not very difficult or invasive to add support for the no- variants, here's a patch to do so:
Doesn't that approach add "what does --no-no-chain-rely-to even mean?" confusion to the resulting system? If that is not the case, then I am all for it, but otherwise, let's not.
No. You have to append the '!' to get the automagic no prefix alternative(s), so while 'chain-reply-to!' means support chain-reply-to, nochain-reply-to and (if you have a new enough Getopt::Long) no-chain-reply-to, just using 'no-chain-reply-to' without the trailing '!' means that nono-chain-reply-to and no-no-chain-reply-to remain invalid options that will generate an error.
Re: [PATCH] t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'
Quoted 16 lines · Kyle J. McKay
Quoted 7 lines · Junio C Hamano
Quoted 5 lines · Kyle J. McKay
Quoted 1 line
use 5.008;
So either that needs to change or the code should properly deal with the version of
Getopt::Longthat comes with 5.8.0.Quoted 6 lines
Quoted 2 lines
Since it's really not very difficult or invasive to add support for the no- variants, here's a patch to do so:
Doesn't that approach add "what does --no-no-chain-rely-to even mean?" confusion to the resulting system? If that is not the case, then I am all for it, but otherwise, let's not.
Quoted 6 lines
No. You have to append the '!' to get the automagic no prefix alternative(s), so while 'chain-reply-to!' means support chain-reply- to, nochain-reply-to and (if you have a new enough
Getopt::Long) no- chain-reply-to, just using 'no-chain-reply-to' without the trailing !' means that nono-chain-reply-to and no-no-chain-reply-to remain invalid options that will generate an error.
Ahh, I missed that ! suffix (or lack thereof).
Thanks.
Re: [PATCH] t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'
In reply to Kyle J. McKayQuoted 2 lines · Kyle J. McKay
Since it's really not very difficult or invasive to add support for the no- variants, here's a patch to do so:
I am inclined to replace the tc/t9001-noxmailer topic that has been sitting on my Undecided pile with this patch and move it forward.
* tc/t9001-noxmailer (2015-01-30) 1 commit
- t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'
Please stop me if I am missing something obviously wrong with this plan.
Thanks.
Quoted 65 lines
-- 8< --
Subject: [PATCH] git-send-email.perl: support no- prefix with older GetOptionsOnly Perl version 5.8.0 or later is required, but that comes with an older
Getopt::Long(2.32) that does not support the 'no-' prefix. Support for that was added inGetopt::Longversion 2.33.Since the help only mentions the 'no-' prefix and not the 'no' prefix, add explicit support for the 'no-' prefix when running with older GetOptions versions.
Reported-by Tom G. Christensen <[email protected]>Signed-off-by Kyle J. McKay <[email protected]>--- git-send-email.perl | 10 ++++++++++ 1 file changed, 10 insertions(+)git-send-email.perl +10
-1@@ -299,6 +299,7 @@ my $rc = GetOptions("h" => \$help, "bcc=s" => \@bcclist, "no-bcc" => \$no_bcc, "chain-reply-to!" => \$chain_reply_to, + "no-chain-reply-to" => sub {$chain_reply_to = 0}, "smtp-server=s" => \$smtp_server, "smtp-server-option=s" => \@smtp_server_options, "smtp-server-port=s" => \$smtp_server_port,@@ -311,25 +312,34 @@ my $rc = GetOptions("h" => \$help, "smtp-domain:s" => \$smtp_domain, "identity=s" => \$identity, "annotate!" => \$annotate, + "no-annotate" => sub {$annotate = 0}, "compose" => \$compose, "quiet" => \$quiet, "cc-cmd=s" => \$cc_cmd, "suppress-from!" => \$suppress_from, + "no-suppress-from" => sub {$suppress_from = 0}, "suppress-cc=s" => \@suppress_cc, "signed-off-cc|signed-off-by-cc!" => \$signed_off_by_cc, + "no-signed-off-cc|no-signed-off-by-cc" => sub {$signed_off_by_cc = 0}, "cc-cover|cc-cover!" => \$cover_cc, + "no-cc-cover" => sub {$cover_cc = 0}, "to-cover|to-cover!" => \$cover_to, + "no-to-cover" => sub {$cover_to = 0}, "confirm=s" => \$confirm, "dry-run" => \$dry_run, "envelope-sender=s" => \$envelope_sender, "thread!" => \$thread, + "no-thread" => sub {$thread = 0}, "validate!" => \$validate, + "no-validate" => sub {$validate = 0}, "transfer-encoding=s" => \$target_xfer_encoding, "format-patch!" => \$format_patch, + "no-format-patch" => sub {$format_patch = 0}, "8bit-encoding=s" => \$auto_8bit_encoding, "compose-encoding=s" => \$compose_encoding, "force" => \$force, "xmailer!" => \$use_xmailer, + "no-xmailer" => sub {$use_xmailer = 0}, ); usage() if $help; --
cover Getopt::Long workaround in send-email
The first one is a replay of Kyle's workaround for older versions of Getopt::Long that did not take "--no-option" to negate a boolean option "--option". The second one revert the workarounds made to the test script over time, and should break if the first one does not work well for older Getopt::Long (I have no reason to suspect it would break, though).
I am inclined to squash these into one commit before starting to merge them down to 'next' and then to 'master', after getting
Tested-by: from those with older Getopt::Long (prior to 2.32).
Obviously, tc/t9001-noxmailer topic will become unnecessary and be dropped when that happens.
Thanks.
Junio C Hamano (1):
SQUASH??? t9001: turn --no$option workarounds to --no-$option
Kyle J. McKay (1):
git-send-email.perl: support no- prefix with older GetOptions
git-send-email.perl | 10 ++++++++++ t/t9001-send-email.sh | 10 +++++----- 2 files changed, 15 insertions(+), 5 deletions(-)
Signature · 1 line
2.3.0-191-geb1a277
PATCH 1/2 git-send-email.perl: support no- prefix with older GetOptions
From: "Kyle J. McKay" <[email protected]>
Only Perl version 5.8.0 or later is required, but that comes with an older Getopt::Long (2.32) that does not support the 'no-' prefix. Support for that was added in Getopt::Long version 2.33.
Since the help only mentions the 'no-' prefix and not the 'no' prefix, add explicit support for the 'no-' prefix when running with older GetOptions versions.
--- git-send-email.perl | 10 ++++++++++ 1 file changed, 10 insertions(+)
git-send-email.perl +10 -0
@@ -299,6 +299,7 @@ sub signal_handler { "bcc=s" => \@bcclist, "no-bcc" => \$no_bcc, "chain-reply-to!" => \$chain_reply_to, + "no-chain-reply-to" => sub {$chain_reply_to = 0}, "smtp-server=s" => \$smtp_server, "smtp-server-option=s" => \@smtp_server_options, "smtp-server-port=s" => \$smtp_server_port,
@@ -311,25 +312,34 @@ sub signal_handler { "smtp-domain:s" => \$smtp_domain, "identity=s" => \$identity, "annotate!" => \$annotate, + "no-annotate" => sub {$annotate = 0}, "compose" => \$compose, "quiet" => \$quiet, "cc-cmd=s" => \$cc_cmd, "suppress-from!" => \$suppress_from, + "no-suppress-from" => sub {$suppress_from = 0}, "suppress-cc=s" => \@suppress_cc, "signed-off-cc|signed-off-by-cc!" => \$signed_off_by_cc, + "no-signed-off-cc|no-signed-off-by-cc" => sub {$signed_off_by_cc = 0}, "cc-cover|cc-cover!" => \$cover_cc, + "no-cc-cover" => sub {$cover_cc = 0}, "to-cover|to-cover!" => \$cover_to, + "no-to-cover" => sub {$cover_to = 0}, "confirm=s" => \$confirm, "dry-run" => \$dry_run, "envelope-sender=s" => \$envelope_sender, "thread!" => \$thread, + "no-thread" => sub {$thread = 0}, "validate!" => \$validate, + "no-validate" => sub {$validate = 0}, "transfer-encoding=s" => \$target_xfer_encoding, "format-patch!" => \$format_patch, + "no-format-patch" => sub {$format_patch = 0}, "8bit-encoding=s" => \$auto_8bit_encoding, "compose-encoding=s" => \$compose_encoding, "force" => \$force, "xmailer!" => \$use_xmailer, + "no-xmailer" => sub {$use_xmailer = 0}, ); usage() if $help;
Signature · 1 line
2.3.0-191-geb1a277
Re: [PATCH 1/2] git-send-email.perl: support no- prefix with older GetOptions
Quoted 9 lines · Junio C Hamano
From: "Kyle J. McKay" <[email protected]>
Only Perl version 5.8.0 or later is required, but that comes with an older
Getopt::Long(2.32) that does not support the 'no-' prefix. Support for that was added inGetopt::Longversion 2.33.Since the help only mentions the 'no-' prefix and not the 'no' prefix, add explicit support for the 'no-' prefix when running with older GetOptions versions.
ultra-ultra-nit: s/when running/for when running/ The current wording makes it sound like the explicit support is only enabled when running with older GetOpt versions.
Quoted 23 lines
Reported-by Tom G. Christensen <[email protected]>Signed-off-by Kyle J. McKay <[email protected]>Signed-off-by Junio C Hamano <[email protected]>--- git-send-email.perl | 10 ++++++++++ 1 file changed, 10 insertions(+)git-send-email.perl +1
-0@@ -299,6 +299,7 @@ sub signal_handler { "bcc=s" => \@bcclist, "no-bcc" => \$no_bcc, "chain-reply-to!" => \$chain_reply_to, + "no-chain-reply-to" => sub {$chain_reply_to = 0}, "smtp-server=s" => \$smtp_server, "smtp-server-option=s" => \@smtp_server_options, "smtp-server-port=s" => \$smtp_server_port,@@ -311,25 +312,34 @@ sub signal_handler { "smtp-domain:s" => \$smtp_domain, "identity=s" => \$identity, "annotate!" => \$annotate,
git-send-email.perl sub signal_handler { · line 324
Quoted 10 lines
git-send-email.perl +3
-0+ "no-annotate" => sub {$annotate = 0}, "compose" => \$compose, "quiet" => \$quiet, "cc-cmd=s" => \$cc_cmd, "suppress-from!" => \$suppress_from, + "no-suppress-from" => sub {$suppress_from = 0}, "suppress-cc=s" => \@suppress_cc, "signed-off-cc|signed-off-by-cc!" => \$signed_off_by_cc, + "no-signed-off-cc|no-signed-off-by-cc" => sub {$signed_off_by_cc = 0}, "cc-cover|cc-cover!" => \$cover_cc,
I know it's not part of this patch, but does the above duplication of "cc-cover" do something I'm not aware of? Or should it just be "cc-cover!"?
git-send-email.perl sub signal_handler { · line 326
Quoted 2 lines
git-send-email.perl +1
-0+ "no-cc-cover" => sub {$cover_cc = 0}, "to-cover|to-cover!" => \$cover_to,
Here (above) too.
Quoted 9 lines
git-send-email.perl +3
-0+ "no-to-cover" => sub {$cover_to = 0}, "confirm=s" => \$confirm, "dry-run" => \$dry_run, "envelope-sender=s" => \$envelope_sender, "thread!" => \$thread, + "no-thread" => sub {$thread = 0}, "validate!" => \$validate, + "no-validate" => sub {$validate = 0}, "transfer-encoding=s" => \$target_xfer_encoding,
git-send-email.perl sub signal_handler { · line 345
Quoted 10 lines
git-send-email.perl +2
-0"format-patch!" => \$format_patch, + "no-format-patch" => sub {$format_patch = 0}, "8bit-encoding=s" => \$auto_8bit_encoding, "compose-encoding=s" => \$compose_encoding, "force" => \$force, "xmailer!" => \$use_xmailer, + "no-xmailer" => sub {$use_xmailer = 0}, ); usage() if $help;
Looks fine to me.
-Brandon
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH 1/2] git-send-email.perl: support no- prefix with older GetOptions
Quoted 27 lines · Kyle J. McKay
Quoted 9 lines · Brandon Casey
Quoted 7 lines · Junio C Hamano
From: "Kyle J. McKay" <[email protected]>
Only Perl version 5.8.0 or later is required, but that comes with an older
Getopt::Long(2.32) that does not support the 'no-' prefix. Support for that was added inGetopt::Longversion 2.33.Quoted 6 lines
Quoted 3 lines
Since the help only mentions the 'no-' prefix and not the 'no' prefix, add explicit support for the 'no-' prefix when running with older GetOptions versions.
ultra-ultra-nit: s/when running/for when running/
So it would say "add explicit support for the 'no-'prefix for when running with"... That doesn't make sense to me.
Quoted 3 lines
The current wording
makes it sound like the explicit support is only enabled when running with older GetOpt versions.
Quoted 5 lines
How about this instead:
Since the help only mentions the 'no-' prefix and not the 'no' prefix, add explicit support for the 'no-' prefix to support older GetOptions versions.
Works for me.
-Brandon
PATCH 2/2 SQUASH??? t9001: turn --no$option workarounds to --no-$option
In reply to Junio C HamanoThese were done to work around older versions of Getopt::Long that did not take negation of a boolean "--option" as "--no-option" (but they happily took "--nooption").
I am inclined to squash this into the previous one.
--- t/t9001-send-email.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
t/t9001-send-email.sh +5 -5
@@ -392,7 +392,7 @@ test_expect_success $PREREQ 'allow long lines with --no-validate' ' --from="Example <[email protected]>" \ [email protected] \ --smtp-server="$(pwd)/fake.sendmail" \ - --novalidate \ + --no-validate \ $patches longline.patch \ 2>errors '
@@ -426,7 +426,7 @@ test_expect_success $PREREQ 'In-Reply-To without --chain-reply-to' ' git send-email \ --from="Example <[email protected]>" \ [email protected] \ - --nochain-reply-to \ + --no-chain-reply-to \ --in-reply-to="$(cat expect)" \ --smtp-server="$(pwd)/fake.sendmail" \ $patches $patches $patches \
@@ -1067,7 +1067,7 @@ test_expect_success $PREREQ 'in-reply-to but no threading' ' --from="Example <[email protected]>" \ [email protected] \ --in-reply-to="<[email protected]>" \ - --nothread \ + --no-thread \ $patches | grep "In-Reply-To: <[email protected]>" '
@@ -1077,7 +1077,7 @@ test_expect_success $PREREQ 'no in-reply-to and no threading' ' --dry-run \ --from="Example <[email protected]>" \ [email protected] \ - --nothread \ + --no-thread \ $patches $patches >stdout && ! grep "In-Reply-To: " stdout '
@@ -1088,7 +1088,7 @@ test_expect_success $PREREQ 'threading but no chain-reply-to' ' --from="Example <[email protected]>" \ [email protected] \ --thread \ - --nochain-reply-to \ + --no-chain-reply-to \ $patches $patches >stdout && grep "In-Reply-To: " stdout '
Signature · 1 line
2.3.0-191-geb1a277
Re: [PATCH 0/2] Getopt::Long workaround in send-email
In reply to Junio C HamanoQuoted 10 lines · Junio C Hamano
The first one is a replay of Kyle's workaround for older versions of
Getopt::Longthat did not take "--no-option" to negate a boolean option "--option". The second one reverts the workarounds made to the test script over time, and should break if the first one does not work well for olderGetopt::Long(I have no reason to suspect it would break, though).I am inclined to squash these into one commit before starting to merge them down to 'next' and then to 'master', after getting
Tested-by: from those with olderGetopt::Long(prior to 2.32).
I have no objection to them being squashed together.
-Kyle
Re: [PATCH 0/2] Getopt::Long workaround in send-email
In reply to Junio C HamanoQuoted 7 lines · Junio C Hamano
The first one is a replay of Kyle's workaround for older versions of
Getopt::Longthat did not take "--no-option" to negate a boolean option "--option". The second one revert the workarounds made to the test script over time, and should break if the first one does not work well for olderGetopt::Long(I have no reason to suspect it would break, though).
Quoted 6 lines
I am inclined to squash these into one commit before starting to merge them down to 'next' and then to 'master', after getting
Tested-by: from those with olderGetopt::Long(prior to 2.32).Obviously, tc/t9001-noxmailer topic will become unnecessary and be dropped when that happens.
I think this is a good fix. It preserves the documented behavior even on less capable systems.
Signature · 3 lines
brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
Re: [PATCH 0/2] Getopt::Long workaround in send-email
In reply to Junio C HamanoQuoted 5 lines · Junio C Hamano
I am inclined to squash these into one commit before starting to merge them down to 'next' and then to 'master', after getting
Tested-by: from those with olderGetopt::Long(prior to 2.32).Junio C Hamano (1):
Quoted 9 lines
SQUASH??? t9001: turn --no$option workarounds to --no-$optionKyle J. McKay (1):
git-send-email.perl: support no- prefix with older GetOptionsgit-send-email.perl | 10 ++++++++++ t/t9001-send-email.sh | 10 +++++----- 2 files changed, 15 insertions(+), 5 deletions(-)
I replaced my original patch with this series on top of 2.3.0 and then did a build on RHEL3 (perl 5.8.0) and RHEL4 (perl 5.8.5). On both platforms t9001 passes.
-tgc
Re: [PATCH 0/2] Getopt::Long workaround in send-email
In reply to Junio C Hamano[apparently it is impossible to send a plain text email using Google Inbox, maybe people on this list know someone to talk to about that? Sorry for the dup for those on cc]
Quoted 6 lines · Junio C Hamano
The first one is a replay of Kyle's workaround for older versions of
Getopt::Longthat did not take "--no-option" to negate a boolean option "--option". The second one revert the workarounds made to the test script over time, and should break if the first one does not work well for olderGetopt::Long(I have no reason to suspect it would break, though).
The only downside I can see is that we're going to end up carrying around these extra options for the forseeable future and possibly adding more over time with this precedent. Maybe that's not so bad. The extra options are not ugly at all. My original thinking in just fixing up the tests was that the platforms with ancient versions of perl/Getopt::Long would just disappear over time and we'd eventually stop fixing up the tests to be backwards compatible when people stopped showing up saying that the tests failed on their ancient system.
What platforms are actually affected? RHEL3? Other ancient UNIX? I know the systems I was fixing up were ancient SunOS and IRIX.
Unfortunately (or fortunately, depending on how you look at it), I don't have access to any ancient systems to test on anymore. So I can't run the updated tests to make sure they still pass. The patches "look" fine to me though. :-)
-Brandon
Re: Testsuite regression with perl 5.8.0 [Re: [ANNOUNCE] Git v2.3.0-rc2]
In reply to Tom G. ChristensenQuoted 5 lines · Tom G. Christensen
Quoted 3 lines · Junio C Hamano
A release candidate Git v2.3.0-rc2 is now available for testing at the usual places.
Quoted 8 lines
Commit 2cf770 added testing of the --[no-]xmailer option to git send-email in
t9001-send-email.sh
Unfortunately it used the modernGetopt::longstyle of --no-<option> to negate the option which is not supported withGetopt::Long2.32 as shipped with perl 5.8.0 on RHEL3 causing the tests to fail.Changing the --no-xmailer option to the old --noxmailer style allows the tests to pass.
Both this and the curl-version issue you reported seem to have simple solutions that you've already worked out and tested. Would you like to express them in the form of patches so they can be applied? :)
-Peff
Re: Testsuite regression with perl 5.8.0 [Re: [ANNOUNCE] Git v2.3.0-rc2]
Quoted 4 lines · Jeff King
Both this and the curl-version issue you reported seem to have simple solutions that you've already worked out and tested. Would you like to express them in the form of patches so they can be applied? :)
Patches have been posted as requested.
-tgc