All of lore.kernel.org
 help / color / mirror / Atom feed
* What's cooking in git.git (Oct 2012, #09; Mon, 29)
@ 2012-10-29 10:21 Jeff King
  2012-11-01 18:40 ` Ramsay Jones
  0 siblings, 1 reply; 10+ messages in thread
From: Jeff King @ 2012-10-29 10:21 UTC (permalink / raw)
  To: git

What's cooking in git.git (Oct 2012, #09; Mon, 29)
--------------------------------------------------

Here are the topics that have been cooking.  Commits prefixed with
'-' are only in 'pu' (proposed updates) while commits prefixed with
'+' are in 'next'.

The second batch of topics has graduated to master. Most of the new
topics have been minor bugfixes or documentation updates, so I've merged
a lot of those to master.

You can find the changes described here in the integration branches of
my repository at:

  git://github.com/peff/git.git

Until Junio returns, kernel.org and the other "usual" places will not be
updated.

--------------------------------------------------
[New Topics]

* fc/completion-test-simplification (2012-10-29) 2 commits
 - completion: simplify __gitcomp test helper
 - completion: refactor __gitcomp related tests

 Clean up completion tests.

 Will merge to 'next'.


* fc/remote-testgit-feature-done (2012-10-29) 1 commit
 - remote-testgit: properly check for errors


* jk/maint-diff-grep-textconv (2012-10-28) 1 commit
 - diff_grep: use textconv buffers for add/deleted files
 (this branch is used by jk/pickaxe-textconv.)

 Fixes inconsistent use of textconv with "git log -G".

 Will merge to 'next'.


* jk/pickaxe-textconv (2012-10-28) 2 commits
 - pickaxe: use textconv for -S counting
 - pickaxe: hoist empty needle check
 (this branch uses jk/maint-diff-grep-textconv.)

 Use textconv filters when searching with "log -S".

 Waiting for a sanity check and review from Junio.


* km/maint-doc-git-reset (2012-10-29) 1 commit
  (merged to 'next' on 2012-10-29 at cdb4e8f)
 + doc: git-reset: make "<mode>" optional

 Will merge to 'master' in the third batch.


* mh/maint-parse-dirstat-fix (2012-10-29) 1 commit
 - parse_dirstat_params(): use string_list to split comma-separated string

 Cleans up some code and avoids a potential bug.

 Will merge to 'next'.


* nd/builtin-to-libgit (2012-10-29) 7 commits
 - fetch-pack: move core code to libgit.a
 - fetch-pack: remove global (static) configuration variable "args"
 - send-pack: move core code to libgit.a
 - Move setup_diff_pager to libgit.a
 - Move print_commit_list to libgit.a
 - Move estimate_bisect_steps to libgit.a
 - Move try_merge_command and checkout_fast_forward to libgit.a

 Code cleanups so that libgit.a does not depend on anything in the
 builtin/ directory.

 Some of the code movement is pretty big, but there doesn't seem to be
 any conflicts with topics in flight.

 Will merge to 'next'.


* ph/maint-submodule-status-fix (2012-10-29) 2 commits
 - submodule status: remove unused orig_* variables
 - t7407: Fix recursive submodule test

 Cleans up some leftover bits from an earlier submodule change.

 Will merge to 'next'.


* pp/maint-doc-pager-config (2012-10-29) 1 commit
  (merged to 'next' on 2012-10-29 at 434fbd0)
 + Documentation: improve the example of overriding LESS via core.pager

 Will merge to 'master' in the third batch.


* rf/maint-mailmap-off-by-one (2012-10-28) 1 commit
  (merged to 'next' on 2012-10-29 at 8c2214b)
 + mailmap: avoid out-of-bounds memory access

 Will merge to 'master' in the third batch.


* sz/maint-submodule-reference-arg (2012-10-26) 1 commit
  (merged to 'next' on 2012-10-29 at 1aab03c)
 + submodule add: fix handling of --reference=<repo> option

 Will merge to 'master' in the third batch.


* tb/maint-t9200-case-insensitive (2012-10-28) 1 commit
  (merged to 'next' on 2012-10-29 at 62af90c)
 + Fix t9200 on case insensitive file systems

 Will merge to 'master' in the third batch.


* tj/maint-doc-commit-sign (2012-10-29) 1 commit
  (merged to 'next' on 2012-10-29 at 44c61a0)
 + Add -S, --gpg-sign option to manpage of "git commit"

 Will merge to 'master' in the third batch.


--------------------------------------------------
[Graduated to "master"]

* jc/grep-pcre-loose-ends (2012-10-09) 7 commits
  (merged to 'next' on 2012-10-25 at 2ea9b27)
 + log: honor grep.* configuration
 + log --grep: accept --basic-regexp and --perl-regexp
 + log --grep: use the same helper to set -E/-F options as "git grep"
 + revisions: initialize revs->grep_filter using grep_init()
 + grep: move pattern-type bits support to top-level grep.[ch]
 + grep: move the configuration parsing logic to grep.[ch]
 + builtin/grep.c: make configuration callback more reusable

 "git log -F -E --grep='<ere>'" failed to use the given <ere>
 pattern as extended regular expression, and instead looked for the
 string literally.  The early part of this series is a fix for it.

 Will merge to 'master' in the second batch after 1.8.0 ships.


* jk/maint-http-init-not-in-result-handler (2012-10-12) 2 commits
  (merged to 'next' on 2012-10-25 at 59d3687)
 + http: do not set up curl auth after a 401
 + remote-curl: do not call run_slot repeatedly

 Further clean-up to the http codepath that picks up results after
 cURL library is done with one request slot.

 Will merge to 'master' in the second batch after 1.8.0 ships.


* jk/sh-setup-in-filter-branch (2012-10-18) 2 commits
  (merged to 'next' on 2012-10-25 at 3879f0e)
 + filter-branch: use git-sh-setup's ident parsing functions
 + git-sh-setup: refactor ident-parsing functions

 Will merge to 'master' in the second batch after 1.8.0 ships.


* jl/submodule-add-by-name (2012-09-30) 2 commits
  (merged to 'next' on 2012-10-25 at a322082)
 + submodule add: Fail when .git/modules/<name> already exists unless forced
 + Teach "git submodule add" the --name option

 If you remove a submodule, in order to keep the repository so that
 "git checkout" to an older commit in the superproject history can
 resurrect the submodule, the real repository will stay in $GIT_DIR
 of the superproject.  A later "git submodule add $path" to add a
 different submodule at the same path will fail.  Diagnose this case
 a bit better, and if the user really wants to add an unrelated
 submodule at the same path, give the "--name" option to give it a
 place in $GIT_DIR of the superproject that does not conflict with
 the original submodule.

 Will merge to 'master' in the second batch after 1.8.0 ships.


* jl/submodule-rm (2012-09-29) 1 commit
  (merged to 'next' on 2012-10-25 at 0fb5876)
 + submodule: teach rm to remove submodules unless they contain a git directory

 "git rm submodule" cannot blindly remove a submodule directory as
 its working tree may have local changes, and worse yet, it may even
 have its repository embedded in it.  Teach it some special cases
 where it is safe to remove a submodule, specifically, when there is
 no local changes in the submodule working tree, and its repository
 is not embedded in its working tree but is elsewhere and uses the
 gitfile mechanism to point at it.

 Will merge to 'master' in the second batch after 1.8.0 ships.


* nd/grep-true-path (2012-10-12) 1 commit
  (merged to 'next' on 2012-10-25 at 1c7d320)
 + grep: stop looking at random places for .gitattributes

 "git grep -e pattern <tree>" asked the attribute system to read
 "<tree>:.gitattributes" file in the working tree, which was
 nonsense.

 Will merge to 'master' in the second batch after 1.8.0 ships.


* nd/status-long (2012-10-18) 1 commit
  (merged to 'next' on 2012-10-25 at ff1b3a0)
 + status: add --long output format option

 Allow an earlier "--short" option on the command line to be
 countermanded with the "--long" option for "git status" and "git
 commit".

 Will merge to 'master' in the second batch after 1.8.0 ships.


* rs/branch-del-symref (2012-10-18) 5 commits
  (merged to 'next' on 2012-10-25 at c2cd358)
 + branch: show targets of deleted symrefs, not sha1s
 + branch: skip commit checks when deleting symref branches
 + branch: delete symref branch, not its target
 + branch: factor out delete_branch_config()
 + branch: factor out check_branch_commit()
 (this branch is used by jh/update-ref-d-through-symref.)

 A symbolic ref refs/heads/SYM was not correctly removed with
 "git branch -d SYM"; the command removed the ref pointed by
 SYM instead.

 Will merge to 'master' in the second batch after 1.8.0 ships.

--------------------------------------------------
[Stalled]

* rc/maint-complete-git-p4 (2012-09-24) 1 commit
  (merged to 'next' on 2012-10-29 at af52cef)
 + Teach git-completion about git p4

 Comment from Pete will need to be addressed in a follow-up patch.


* as/test-tweaks (2012-09-20) 7 commits
 - tests: paint unexpectedly fixed known breakages in bold red
 - tests: test the test framework more thoroughly
 - [SQUASH] t/t0000-basic.sh: quoting of TEST_DIRECTORY is screwed up
 - tests: refactor mechanics of testing in a sub test-lib
 - tests: paint skipped tests in bold blue
 - tests: test number comes first in 'not ok $count - $message'
 - tests: paint known breakages in bold yellow

 Various minor tweaks to the test framework to paint its output
 lines in colors that match what they mean better.

 Has the "is this really blue?" issue Peff raised resolved???


* jc/maint-name-rev (2012-09-17) 7 commits
 - describe --contains: use "name-rev --algorithm=weight"
 - name-rev --algorithm=weight: tests and documentation
 - name-rev --algorithm=weight: cache the computed weight in notes
 - name-rev --algorithm=weight: trivial optimization
 - name-rev: --algorithm option
 - name_rev: clarify the logic to assign a new tip-name to a commit
 - name-rev: lose unnecessary typedef

 "git name-rev" names the given revision based on a ref that can be
 reached in the smallest number of steps from the rev, but that is
 not useful when the caller wants to know which tag is the oldest one
 that contains the rev.  This teaches a new mode to the command that
 uses the oldest ref among those which contain the rev.

 I am not sure if this is worth it; for one thing, even with the help
 from notes-cache, it seems to make the "describe --contains" even
 slower. Also the command will be unusably slow for a user who does
 not have a write access (hence unable to create or update the
 notes-cache).

 Stalled mostly due to lack of responses.


* jc/xprm-generation (2012-09-14) 1 commit
 - test-generation: compute generation numbers and clock skews

 A toy to analyze how bad the clock skews are in histories of real
 world projects.

 Stalled mostly due to lack of responses.


* jc/blame-no-follow (2012-09-21) 2 commits
 - blame: pay attention to --no-follow
 - diff: accept --no-follow option

 Teaches "--no-follow" option to "git blame" to disable its
 whole-file rename detection.

 Stalled mostly due to lack of responses.


* jc/doc-default-format (2012-10-07) 2 commits
 - [SQAUSH] allow "cd Doc* && make DEFAULT_DOC_TARGET=..."
 - Allow generating a non-default set of documentation

 Need to address the installation half if this is to be any useful.


* mk/maint-graph-infinity-loop (2012-09-25) 1 commit
 - graph.c: infinite loop in git whatchanged --graph -m

 The --graph code fell into infinite loop when asked to do what the
 code did not expect ;-)

 Anybody who worked on "--graph" wants to comment?
 Stalled mostly due to lack of responses.


* jc/add-delete-default (2012-08-13) 1 commit
 - git add: notice removal of tracked paths by default

 "git add dir/" updated modified files and added new files, but does
 not notice removed files, which may be "Huh?" to some users.  They
 can of course use "git add -A dir/", but why should they?

 Resurrected from graveyard, as I thought it was a worthwhile thing
 to do in the longer term.

 Waiting for comments.


* mb/remote-default-nn-origin (2012-07-11) 6 commits
 - Teach get_default_remote to respect remote.default.
 - Test that plain "git fetch" uses remote.default when on a detached HEAD.
 - Teach clone to set remote.default.
 - Teach "git remote" about remote.default.
 - Teach remote.c about the remote.default configuration setting.
 - Rename remote.c's default_remote_name static variables.

 When the user does not specify what remote to interact with, we
 often attempt to use 'origin'.  This can now be customized via a
 configuration variable.

 Expecting a reroll.

 "The first remote becomes the default" bit is better done as a
 separate step.

--------------------------------------------------
[Cooking]

* mh/ceiling (2012-10-29) 8 commits
 - string_list_longest_prefix(): remove function
 - setup_git_directory_gently_1(): resolve symlinks in ceiling paths
 - longest_ancestor_length(): require prefix list entries to be normalized
 - longest_ancestor_length(): take a string_list argument for prefixes
 - longest_ancestor_length(): use string_list_split()
 - Introduce new function real_path_if_valid()
 - real_path_internal(): add comment explaining use of cwd
 - Introduce new static function real_path_internal()

 Elements of GIT_CEILING_DIRECTORIES list may not match the real
 pathname we obtain from getcwd(), leading the GIT_DIR discovery
 logic to escape the ceilings the user thought to have specified.


* mo/cvs-server-cleanup (2012-10-26) 11 commits
  (merged to 'next' on 2012-10-29 at 4e70622)
 + Use character class for sed expression instead of \s
  (merged to 'next' on 2012-10-25 at c70881d)
 + cvsserver status: provide real sticky info
 + cvsserver: cvs add: do not expand directory arguments
 + cvsserver: use whole CVS rev number in-process; don't strip "1." prefix
 + cvsserver: split up long lines in req_{status,diff,log}
 + cvsserver: clean up client request handler map comments
 + cvsserver: remove unused functions _headrev and gethistory
 + cvsserver update: comment about how we shouldn't remove a user-modified file
 + cvsserver: add comments about database schema/usage
 + cvsserver: removed unused sha1Or-k mode from kopts_from_path
 + cvsserver t9400: add basic 'cvs log' test
 (this branch is tangled with mo/cvs-server-updates.)

 Cleanups to prepare for mo/cvs-server-updates.

 Will merge to 'master' in the fourth batch.


* mo/cvs-server-updates (2012-10-16) 20 commits
 - cvsserver Documentation: new cvs ... -r support
 - cvsserver: add t9402 to test branch and tag refs
 - cvsserver: support -r and sticky tags for most operations
 - cvsserver: Add version awareness to argsfromdir
 - cvsserver: generalize getmeta() to recognize commit refs
 - cvsserver: implement req_Sticky and related utilities
 - cvsserver: add misc commit lookup, file meta data, and file listing functions
 - cvsserver: define a tag name character escape mechanism
 - cvsserver: cleanup extra slashes in filename arguments
 - cvsserver: factor out git-log parsing logic
  (merged to 'next' on 2012-10-25 at c70881d)
 + cvsserver status: provide real sticky info
 + cvsserver: cvs add: do not expand directory arguments
 + cvsserver: use whole CVS rev number in-process; don't strip "1." prefix
 + cvsserver: split up long lines in req_{status,diff,log}
 + cvsserver: clean up client request handler map comments
 + cvsserver: remove unused functions _headrev and gethistory
 + cvsserver update: comment about how we shouldn't remove a user-modified file
 + cvsserver: add comments about database schema/usage
 + cvsserver: removed unused sha1Or-k mode from kopts_from_path
 + cvsserver t9400: add basic 'cvs log' test
 (this branch is tangled with mo/cvs-server-cleanup.)

 Needs review by folks interested in cvsserver.


* ta/doc-cleanup (2012-10-25) 6 commits
 - Documentation: build html for all files in technical and howto
 - Documentation/howto: convert plain text files to asciidoc
 - Documentation/technical: convert plain text files to asciidoc
 - Change headline of technical/send-pack-pipeline.txt to not confuse its content with content from git-send-pack.txt
 - Shorten two over-long lines in git-bisect-lk2009.txt by abbreviating some sha1
 - Split over-long synopsis in git-fetch-pack.txt into several lines

 Misapplication of a patch fixed; the ones near the tip needs to
 update the links to point at the html files, though.

 Needs follow-up on Junio's comment above.


* lt/diff-stat-show-0-lines (2012-10-17) 1 commit
 - Fix "git diff --stat" for interesting - but empty - file changes

 We failed to mention a file without any content change but whose
 permission bit was modified, or (worse yet) a new file without any
 content in the "git diff --stat" output.

 Needs some test updates.


* jc/prettier-pretty-note (2012-10-26) 11 commits
 - Doc User-Manual: Patch cover letter, three dashes, and --notes
 - Doc format-patch: clarify --notes use case
 - Doc notes: Include the format-patch --notes option
 - Doc SubmittingPatches: Mention --notes option after "cover letter"
 - Documentation: decribe format-patch --notes
 - format-patch --notes: show notes after three-dashes
 - format-patch: append --signature after notes
 - pretty_print_commit(): do not append notes message
 - pretty: prepare notes message at a centralized place
 - format_note(): simplify API
 - pretty: remove reencode_commit_message()

 Now that Philip has submitted some documentation updates, this is
 looking more ready.

 Will merge to 'next'.


* sz/maint-curl-multi-timeout (2012-10-19) 1 commit
 - Fix potential hang in https handshake

 Sometimes curl_multi_timeout() function suggested a wrong timeout
 value when there is no file descriptors to wait on and the http
 transport ended up sleeping for minutes in select(2) system call.
 Detect this and reduce the wait timeout in such a case.

 Will merge to 'next'.


* jc/same-encoding (2012-10-18) 1 commit
 - reencode_string(): introduce and use same_encoding()

 Various codepaths checked if two encoding names are the same using
 ad-hoc code and some of them ended up asking iconv() to convert
 between "utf8" and "UTF-8".  The former is not a valid way to spell
 the encoding name, but often people use it by mistake, and we
 equated them in some but not all codepaths. Introduce a new helper
 function to make these codepaths consistent.

 Will merge to 'next' after fixing up commit message.


* nd/tree-walk-enum-cleanup (2012-10-19) 1 commit
 - tree-walk: use enum interesting instead of integer

 Will merge to 'next'.


* cr/cvsimport-local-zone (2012-10-16) 1 commit
 - git-cvsimport: allow author-specific timezones

 Allows "cvsimport" to read per-author timezone from the author info
 file.

 Will merge to 'next'.


* fc/completion-send-email-with-format-patch (2012-10-16) 1 commit
 - completion: add format-patch options to send-email

 Will merge to 'next'.


* fc/zsh-completion (2012-10-29) 3 commits
 - completion: add new zsh completion
 - completion: add new __gitcompadd helper
 - completion: get rid of empty COMPREPLY assignments

 Needs comments from completion folks.


* jc/apply-trailing-blank-removal (2012-10-12) 1 commit
 - apply.c:update_pre_post_images(): the preimage can be truncated

 Fix to update_pre_post_images() that did not take into account the
 possibility that whitespace fix could shrink the preimage and
 change the number of lines in it.

 Extra set of eyeballs appreciated.


* jn/warn-on-inaccessible-loosen (2012-10-14) 4 commits
 - config: exit on error accessing any config file
 - doc: advertise GIT_CONFIG_NOSYSTEM
 - config: treat user and xdg config permission problems as errors
 - config, gitignore: failure to access with ENOTDIR is ok

 An RFC to deal with a situation where .config/git is a file and we
 notice .config/git/config is not readable due to ENOTDIR, not
 ENOENT; I think a bit more refactored approach to consistently
 address permission errors across config, exclude and attrs is
 desirable.  Don't we also need a check for an opposite situation
 where we open .config/git/config or .gitattributes for reading but
 they turn out to be directories?


* rs/lock-correct-ref-during-delete (2012-10-16) 1 commit
  (merged to 'next' on 2012-10-25 at 9341eea)
 + refs: lock symref that is to be deleted, not its target

 When "update-ref -d --no-deref SYM" tried to delete a symbolic ref
 SYM, it incorrectly locked the underlying reference pointed by SYM,
 not the symbolic ref itself.

 Will merge to 'master' in the fourth batch.


* as/check-ignore (2012-10-29) 13 commits
 - Documentation/check-ignore: we show the deciding match, not the first
 - Add git-check-ignore sub-command
 - dir.c: provide free_directory() for reclaiming dir_struct memory
 - pathspec.c: move reusable code from builtin/add.c
 - dir.c: refactor treat_gitlinks()
 - dir.c: keep track of where patterns came from
 - dir.c: refactor is_path_excluded()
 - dir.c: refactor is_excluded()
 - dir.c: refactor is_excluded_from_list()
 - dir.c: rename excluded() to is_excluded()
 - dir.c: rename excluded_from_list() to is_excluded_from_list()
 - dir.c: rename path_excluded() to is_path_excluded()
 - dir.c: rename cryptic 'which' variable to more consistent name
 (this branch uses nd/attr-match-optim-more; is tangled with nd/wildmatch.)

 Duy helped to reroll this.

 Expecting another re-roll.


* js/format-2047 (2012-10-18) 7 commits
  (merged to 'next' on 2012-10-25 at 76d91fe)
 + format-patch tests: check quoting/encoding in To: and Cc: headers
 + format-patch: fix rfc2047 address encoding with respect to rfc822 specials
 + format-patch: make rfc2047 encoding more strict
 + format-patch: introduce helper function last_line_length()
 + format-patch: do not wrap rfc2047 encoded headers too late
 + format-patch: do not wrap non-rfc2047 headers too early
 + utf8: fix off-by-one wrapping of text

 Fixes many rfc2047 quoting issues in the output from format-patch.

 Will merge to 'master' in the fourth batch.


* km/send-email-compose-encoding (2012-10-25) 5 commits
  (merged to 'next' on 2012-10-29 at d7d2bb4)
 + git-send-email: add rfc2047 quoting for "=?"
 + git-send-email: introduce quote_subject()
 + git-send-email: skip RFC2047 quoting for ASCII subjects
 + git-send-email: use compose-encoding for Subject
  (merged to 'next' on 2012-10-25 at 5447367)
 + git-send-email: introduce compose-encoding

 "git send-email --compose" can let the user create a non-ascii
 cover letter message, but there was not a way to mark it with
 appropriate content type before sending it out.

 Further updates fix subject quoting.

 Will merge to 'master' in the fourth batch.


* so/prompt-command (2012-10-17) 4 commits
  (merged to 'next' on 2012-10-25 at 79565a1)
 + coloured git-prompt: paint detached HEAD marker in red
 + Fix up colored git-prompt
 + show color hints based on state of the git tree
 + Allow __git_ps1 to be used in PROMPT_COMMAND

 Updates __git_ps1 so that it can be used as $PROMPT_COMMAND,
 instead of being used for command substitution in $PS1, to embed
 color escape sequences in its output.

 Will 'cook' in next.


* aw/rebase-am-failure-detection (2012-10-11) 1 commit
 - rebase: Handle cases where format-patch fails

 I am unhappy a bit about the possible performance implications of
 having to store the output in a temporary file only for a rare case
 of format-patch aborting.


* nd/wildmatch (2012-10-15) 13 commits
  (merged to 'next' on 2012-10-25 at 510e8df)
 + Support "**" wildcard in .gitignore and .gitattributes
 + wildmatch: make /**/ match zero or more directories
 + wildmatch: adjust "**" behavior
 + wildmatch: fix case-insensitive matching
 + wildmatch: remove static variable force_lower_case
 + wildmatch: make wildmatch's return value compatible with fnmatch
 + t3070: disable unreliable fnmatch tests
 + Integrate wildmatch to git
 + wildmatch: follow Git's coding convention
 + wildmatch: remove unnecessary functions
 + Import wildmatch from rsync
 + ctype: support iscntrl, ispunct, isxdigit and isprint
 + ctype: make sane_ctype[] const array
 (this branch uses nd/attr-match-optim-more; is tangled with as/check-ignore.)

 Allows pathname patterns in .gitignore and .gitattributes files
 with double-asterisks "foo/**/bar" to match any number of directory
 hierarchies.

 I suspect that this needs to be plugged to pathspec matching code;
 otherwise "git log -- 'Docum*/**/*.txt'" would not show the log for
 commits that touch Documentation/git.txt, which would be confusing
 to the users.

 Will cook in 'next'.


* jk/lua-hackery (2012-10-07) 6 commits
 - pretty: fix up one-off format_commit_message calls
 - Minimum compilation fixup
 - Makefile: make "lua" a bit more configurable
 - add a "lua" pretty format
 - add basic lua infrastructure
 - pretty: make some commit-parsing helpers more public

 Interesting exercise. When we do this for real, we probably would want
 to wrap a commit to make it more like an "object" with methods like
 "parents", etc.


* nd/attr-match-optim-more (2012-10-15) 7 commits
  (merged to 'next' on 2012-10-25 at 09f70ce)
 + attr: more matching optimizations from .gitignore
 + gitignore: make pattern parsing code a separate function
 + exclude: split pathname matching code into a separate function
 + exclude: fix a bug in prefix compare optimization
 + exclude: split basename matching code into a separate function
 + exclude: stricten a length check in EXC_FLAG_ENDSWITH case
 + Merge commit 'f9f6e2c' into nd/attr-match-optim-more
 (this branch is used by as/check-ignore and nd/wildmatch.)

 Start laying the foundation to build the "wildmatch" after we can
 agree on its desired semantics.

 Will merge to 'master' in the fourth batch.


* nd/pretty-placeholder-with-color-option (2012-09-30) 9 commits
 . pretty: support %>> that steal trailing spaces
 . pretty: support truncating in %>, %< and %><
 . pretty: support padding placeholders, %< %> and %><
 . pretty: two phase conversion for non utf-8 commits
 . utf8.c: add utf8_strnwidth() with the ability to skip ansi sequences
 . utf8.c: move display_mode_esc_sequence_len() for use by other functions
 . pretty: support %C(auto[,N]) to turn on coloring on next placeholder(s)
 . pretty: split parsing %C into a separate function
 . pretty: share code between format_decoration and show_decorations

 This causes warnings with -Wuninitialized, so I've ejected it from pu
 for the time being.


* jc/maint-fetch-tighten-refname-check (2012-10-19) 1 commit
 - get_fetch_map(): tighten checks on dest refs

 This was split out from discarded jc/maint-push-refs-all topic.

 Will merge to 'next'.


* jh/symbolic-ref-d (2012-10-21) 1 commit
 - git symbolic-ref --delete $symref

 Add "symbolic-ref -d SYM" to delete a symbolic ref SYM.

 It is already possible to remove a symbolic ref with "update-ref -d
 --no-deref", but it may be a good addition for completeness.

 Will merge to 'next'.


* jh/update-ref-d-through-symref (2012-10-21) 2 commits
 - Fix failure to delete a packed ref through a symref
 - t1400-update-ref: Add test verifying bug with symrefs in delete_ref()

 "update-ref -d --deref SYM" to delete a ref through a symbolic ref
 that points to it did not remove it correctly.


* gb/maint-doc-svn-log-window-size (2012-10-26) 1 commit
  (merged to 'next' on 2012-10-29 at ee50b22)
 + Document git-svn fetch --log-window-size parameter

 Will merge to 'master' in the third batch.


* jk/config-ignore-duplicates (2012-10-29) 9 commits
  (merged to 'next' on 2012-10-29 at 67fa0a2)
 + builtin/config.c: Fix a sparse warning
  (merged to 'next' on 2012-10-25 at 233df08)
 + git-config: use git_config_with_options
 + git-config: do not complain about duplicate entries
 + git-config: collect values instead of immediately printing
 + git-config: fix regexp memory leaks on error conditions
 + git-config: remove memory leak of key regexp
 + t1300: test "git config --get-all" more thoroughly
 + t1300: remove redundant test
 + t1300: style updates

 Drop duplicate detection from git-config; this lets it
 better match the internal config callbacks, which clears up
 some corner cases with includes.

 Will cook in 'next'.


* mm/maint-doc-remote-tracking (2012-10-25) 1 commit
  (merged to 'next' on 2012-10-25 at 80f1592)
 + Documentation: remote tracking branch -> remote-tracking branch

 We long ago hyphenated "remote-tracking branch"; this
 catches some new instances added since then.

 Will merge to 'master' in the third batch.


* ph/pull-rebase-detached (2012-10-25) 1 commit
  (merged to 'next' on 2012-10-25 at 73d9d14)
 + git-pull: Avoid merge-base on detached head

 Avoids spewing error messages when using "pull --rebase" on a
 detached HEAD.

 Will merge to 'master' in the third batch.


* ph/submodule-sync-recursive (2012-10-29) 2 commits
 - Add tests for submodule sync --recursive
 - Teach --recursive to submodule sync

 Adds "--recursive" option to submodule sync.

 Will merge to 'next'.


* po/maint-refs-replace-docs (2012-10-25) 1 commit
  (merged to 'next' on 2012-10-25 at 3874c9d)
 + Doc repository-layout: Show refs/replace

 The refs/replace hierarchy was not mentioned in the
 repository-layout docs.

 Will merge to 'master' in the third batch.


* sl/maint-configure-messages (2012-10-25) 1 commit
  (merged to 'next' on 2012-10-25 at e1d7ecd)
 + configure: fix some output message

 Minor message fixes for the configure script.

 Will merge to 'master' in the third batch.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: What's cooking in git.git (Oct 2012, #09; Mon, 29)
  2012-10-29 10:21 What's cooking in git.git (Oct 2012, #09; Mon, 29) Jeff King
@ 2012-11-01 18:40 ` Ramsay Jones
  2012-11-02  1:12   ` Chris Rorvick
  0 siblings, 1 reply; 10+ messages in thread
From: Ramsay Jones @ 2012-11-01 18:40 UTC (permalink / raw)
  To: Jeff King; +Cc: git

Jeff King wrote:
> What's cooking in git.git (Oct 2012, #09; Mon, 29)
> --------------------------------------------------
> 

[snip]

> * cr/cvsimport-local-zone (2012-10-16) 1 commit
>  - git-cvsimport: allow author-specific timezones
> 
>  Allows "cvsimport" to read per-author timezone from the author info
>  file.
> 
>  Will merge to 'next'.

Just FYI, t9604-cvsimport-timestamps.sh is still failing for me.

I haven't spent too long on this yet, but I had hoped that setting
TZ would sidestep any DST issues. (I have downloaded new tzdata, but
have yet to install - actually I don't really want to!). It is not
clear from the tzset manpage what happens if you use the DST format
for TZ, but you don't provide the start/end date for DST, which is
what this test is doing.

Perhaps the test should use the non-DST format? e.g. "TZ=CST6 git ..."
Does the test really care about DST? (*if* that is indeed the problem).

Also: Note that the first test calls git-cvsimport twice, first *with*
TZ set then again without; I suspect a cut/paste editing error.

I have added the output of "./t9604-cvsimport-timestamps.sh -v" below.

ATB,
Ramsay Jones



ramsay@ramsay-laptop:$ ./t9604-cvsimport-timestamps.sh -v
Initialized empty Git repository in /home/ramsay/git/t/trash directory.t9604-cvsimport-timestamps/.git/
expecting success: 

        TZ=CST6CDT git cvsimport -p"-x" -C module-1 module &&
        git cvsimport -p"-x" -C module-1 module &&
        (
                cd module-1 &&
                git log --format="%s %ai"
        ) >actual-1 &&
        cat >expect-1 <<-EOF &&
        Rev 16 2006-10-29 07:00:01 +0000
        Rev 15 2006-10-29 06:59:59 +0000
        Rev 14 2006-04-02 08:00:01 +0000
        Rev 13 2006-04-02 07:59:59 +0000
        Rev 12 2005-12-01 00:00:00 +0000
        Rev 11 2005-11-01 00:00:00 +0000
        Rev 10 2005-10-01 00:00:00 +0000
        Rev  9 2005-09-01 00:00:00 +0000
        Rev  8 2005-08-01 00:00:00 +0000
        Rev  7 2005-07-01 00:00:00 +0000
        Rev  6 2005-06-01 00:00:00 +0000
        Rev  5 2005-05-01 00:00:00 +0000
        Rev  4 2005-04-01 00:00:00 +0000
        Rev  3 2005-03-01 00:00:00 +0000
        Rev  2 2005-02-01 00:00:00 +0000
        Rev  1 2005-01-01 00:00:00 +0000
        EOF
        test_cmp actual-1 expect-1

Initialized empty Git repository in /home/ramsay/git/t/trash directory.t9604-cvsimport-timestamps/module-1/.git/
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
Already up-to-date.
--- actual-1    2012-10-31 21:20:20.000000000 +0000
+++ expect-1    2012-10-31 21:20:20.000000000 +0000
@@ -13,4 +13,4 @@
 Rev  4 2005-04-01 00:00:00 +0000
 Rev  3 2005-03-01 00:00:00 +0000
 Rev  2 2005-02-01 00:00:00 +0000
-Rev  1 2004-12-31 18:00:00 +0000
+Rev  1 2005-01-01 00:00:00 +0000
not ok 1 - check timestamps are UTC (TZ=CST6CDT)
#
#
#               TZ=CST6CDT git cvsimport -p"-x" -C module-1 module &&
#               git cvsimport -p"-x" -C module-1 module &&
#               (
#                       cd module-1 &&
#                       git log --format="%s %ai"
#               ) >actual-1 &&
#               cat >expect-1 <<-EOF &&
#               Rev 16 2006-10-29 07:00:01 +0000
#               Rev 15 2006-10-29 06:59:59 +0000
#               Rev 14 2006-04-02 08:00:01 +0000
#               Rev 13 2006-04-02 07:59:59 +0000
#               Rev 12 2005-12-01 00:00:00 +0000
#               Rev 11 2005-11-01 00:00:00 +0000
#               Rev 10 2005-10-01 00:00:00 +0000
#               Rev  9 2005-09-01 00:00:00 +0000
#               Rev  8 2005-08-01 00:00:00 +0000
#               Rev  7 2005-07-01 00:00:00 +0000
#               Rev  6 2005-06-01 00:00:00 +0000
#               Rev  5 2005-05-01 00:00:00 +0000
#               Rev  4 2005-04-01 00:00:00 +0000
#               Rev  3 2005-03-01 00:00:00 +0000
#               Rev  2 2005-02-01 00:00:00 +0000
#               Rev  1 2005-01-01 00:00:00 +0000
#               EOF
#               test_cmp actual-1 expect-1
#

expecting success: 

        cat >cvs-authors <<-EOF &&
        user1=User One <user1@domain.org>
        user2=User Two <user2@domain.org> CST6CDT
        user3=User Three <user3@domain.org> EST5EDT
        user4=User Four <user4@domain.org> MST7MDT
        EOF
        git cvsimport -p"-x" -A cvs-authors -C module-2 module &&
        (
                cd module-2 &&
                git log --format="%s %ai %an"
        ) >actual-2 &&
        cat >expect-2 <<-EOF &&
        Rev 16 2006-10-29 01:00:01 -0600 User Two
        Rev 15 2006-10-29 01:59:59 -0500 User Two
        Rev 14 2006-04-02 03:00:01 -0500 User Two
        Rev 13 2006-04-02 01:59:59 -0600 User Two
        Rev 12 2005-11-30 17:00:00 -0700 User Four
        Rev 11 2005-10-31 19:00:00 -0500 User Three
        Rev 10 2005-09-30 19:00:00 -0500 User Two
        Rev  9 2005-09-01 00:00:00 +0000 User One
        Rev  8 2005-07-31 18:00:00 -0600 User Four
        Rev  7 2005-06-30 20:00:00 -0400 User Three
        Rev  6 2005-05-31 19:00:00 -0500 User Two
        Rev  5 2005-05-01 00:00:00 +0000 User One
        Rev  4 2005-03-31 17:00:00 -0700 User Four
        Rev  3 2005-02-28 19:00:00 -0500 User Three
        Rev  2 2005-01-31 18:00:00 -0600 User Two
        Rev  1 2005-01-01 00:00:00 +0000 User One
        EOF
        test_cmp actual-2 expect-2

Initialized empty Git repository in /home/ramsay/git/t/trash directory.t9604-cvsimport-timestamps/module-2/.git/
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
* UNKNOWN LINE * Branches: 
--- actual-2    2012-10-31 21:20:21.000000000 +0000
+++ expect-2    2012-10-31 21:20:21.000000000 +0000
@@ -1,16 +1,16 @@
 Rev 16 2006-10-29 01:00:01 -0600 User Two
 Rev 15 2006-10-29 01:59:59 -0500 User Two
 Rev 14 2006-04-02 03:00:01 -0500 User Two
-Rev 13 2006-04-02 00:59:59 -0600 User Two
-Rev 12 2005-11-30 19:00:00 -0700 User Four
-Rev 11 2005-10-31 18:00:00 -0500 User Three
-Rev 10 2005-10-01 01:00:00 -0500 User Two
-Rev  9 2005-08-31 18:00:00 +0000 User One
-Rev  8 2005-07-31 20:00:00 -0600 User Four
-Rev  7 2005-06-30 19:00:00 -0400 User Three
-Rev  6 2005-06-01 01:00:00 -0500 User Two
-Rev  5 2005-04-30 18:00:00 +0000 User One
-Rev  4 2005-03-31 19:00:00 -0700 User Four
-Rev  3 2005-02-28 18:00:00 -0500 User Three
-Rev  2 2005-02-01 00:00:00 -0600 User Two
+Rev 13 2006-04-02 01:59:59 -0600 User Two
+Rev 12 2005-11-30 17:00:00 -0700 User Four
+Rev 11 2005-10-31 19:00:00 -0500 User Three
+Rev 10 2005-09-30 19:00:00 -0500 User Two
+Rev  9 2005-09-01 00:00:00 +0000 User One
+Rev  8 2005-07-31 18:00:00 -0600 User Four
+Rev  7 2005-06-30 20:00:00 -0400 User Three
+Rev  6 2005-05-31 19:00:00 -0500 User Two
+Rev  5 2005-05-01 00:00:00 +0000 User One
+Rev  4 2005-03-31 17:00:00 -0700 User Four
+Rev  3 2005-02-28 19:00:00 -0500 User Three
+Rev  2 2005-01-31 18:00:00 -0600 User Two
 Rev  1 2005-01-01 00:00:00 +0000 User One
not ok 2 - check timestamps with author-specific timezones
#
#
#               cat >cvs-authors <<-EOF &&
#               user1=User One <user1@domain.org>
#               user2=User Two <user2@domain.org> CST6CDT
#               user3=User Three <user3@domain.org> EST5EDT
#               user4=User Four <user4@domain.org> MST7MDT
#               EOF
#               git cvsimport -p"-x" -A cvs-authors -C module-2 module &&
#               (
#                       cd module-2 &&
#                       git log --format="%s %ai %an"
#               ) >actual-2 &&
#               cat >expect-2 <<-EOF &&
#               Rev 16 2006-10-29 01:00:01 -0600 User Two
#               Rev 15 2006-10-29 01:59:59 -0500 User Two
#               Rev 14 2006-04-02 03:00:01 -0500 User Two
#               Rev 13 2006-04-02 01:59:59 -0600 User Two
#               Rev 12 2005-11-30 17:00:00 -0700 User Four
#               Rev 11 2005-10-31 19:00:00 -0500 User Three
#               Rev 10 2005-09-30 19:00:00 -0500 User Two
#               Rev  9 2005-09-01 00:00:00 +0000 User One
#               Rev  8 2005-07-31 18:00:00 -0600 User Four
#               Rev  7 2005-06-30 20:00:00 -0400 User Three
#               Rev  6 2005-05-31 19:00:00 -0500 User Two
#               Rev  5 2005-05-01 00:00:00 +0000 User One
#               Rev  4 2005-03-31 17:00:00 -0700 User Four
#               Rev  3 2005-02-28 19:00:00 -0500 User Three
#               Rev  2 2005-01-31 18:00:00 -0600 User Two
#               Rev  1 2005-01-01 00:00:00 +0000 User One
#               EOF
#               test_cmp actual-2 expect-2
#

# failed 2 among 2 test(s)
1..2
ramsay@ramsay-laptop:$

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: What's cooking in git.git (Oct 2012, #09; Mon, 29)
  2012-11-01 18:40 ` Ramsay Jones
@ 2012-11-02  1:12   ` Chris Rorvick
  2012-11-02  9:43     ` Jeff King
  0 siblings, 1 reply; 10+ messages in thread
From: Chris Rorvick @ 2012-11-02  1:12 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: Jeff King, git

On Thu, Nov 1, 2012 at 1:40 PM, Ramsay Jones <ramsay@ramsay1.demon.co.uk> wrote:
> Jeff King wrote:
>> What's cooking in git.git (Oct 2012, #09; Mon, 29)
>> --------------------------------------------------
>>
>
> [snip]
>
>> * cr/cvsimport-local-zone (2012-10-16) 1 commit
>>  - git-cvsimport: allow author-specific timezones
>>
>>  Allows "cvsimport" to read per-author timezone from the author info
>>  file.
>>
>>  Will merge to 'next'.
>
> Just FYI, t9604-cvsimport-timestamps.sh is still failing for me.
>
> I haven't spent too long on this yet, but I had hoped that setting
> TZ would sidestep any DST issues. (I have downloaded new tzdata, but
> have yet to install - actually I don't really want to!). It is not
> clear from the tzset manpage what happens if you use the DST format
> for TZ, but you don't provide the start/end date for DST, which is
> what this test is doing.
>
> Perhaps the test should use the non-DST format? e.g. "TZ=CST6 git ..."
> Does the test really care about DST? (*if* that is indeed the problem).

It actually looks like your TZ database is fine and the problem is
with the conversion to a struct tm.  In each case, the time is
localized to the previous TZ value while the offset for the current TZ
value.  For example, look at the first commit in the first test.  It
converted the timestamp to 18:00 (CST6) while all the rest came
through as expected.    I suspect the previous version of cvsimport
would exhibit similar behavior with the first imported commit.  What
is your platform?

> Also: Note that the first test calls git-cvsimport twice, first *with*
> TZ set then again without; I suspect a cut/paste editing error.

Oops.  The second invocation should have no effect on the repo so the
unit test is still valid, but that was a mistake for sure.  Thanks.

Chris

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: What's cooking in git.git (Oct 2012, #09; Mon, 29)
  2012-11-02  1:12   ` Chris Rorvick
@ 2012-11-02  9:43     ` Jeff King
  2012-11-02  9:56       ` Jeff King
  0 siblings, 1 reply; 10+ messages in thread
From: Jeff King @ 2012-11-02  9:43 UTC (permalink / raw)
  To: Chris Rorvick; +Cc: Ramsay Jones, git

On Thu, Nov 01, 2012 at 08:12:20PM -0500, Chris Rorvick wrote:

> > Just FYI, t9604-cvsimport-timestamps.sh is still failing for me.
> >
> > I haven't spent too long on this yet, but I had hoped that setting
> > TZ would sidestep any DST issues. (I have downloaded new tzdata, but
> > have yet to install - actually I don't really want to!). It is not
> > clear from the tzset manpage what happens if you use the DST format
> > for TZ, but you don't provide the start/end date for DST, which is
> > what this test is doing.
> >
> > Perhaps the test should use the non-DST format? e.g. "TZ=CST6 git ..."
> > Does the test really care about DST? (*if* that is indeed the problem).
> 
> It actually looks like your TZ database is fine and the problem is
> with the conversion to a struct tm.  In each case, the time is
> localized to the previous TZ value while the offset for the current TZ
> value.  For example, look at the first commit in the first test.  It
> converted the timestamp to 18:00 (CST6) while all the rest came
> through as expected.    I suspect the previous version of cvsimport
> would exhibit similar behavior with the first imported commit.  What
> is your platform?

Yeah, I think that is it. IIRC, Ramsay is on cygwin, and I noticed this
in perl 5.16's POSIX.xs:

  #ifdef WIN32

  /*
   * (1) The CRT maintains its own copy of the environment, separate from
   * the Win32API copy.
   *
   * (2) CRT getenv() retrieves from this copy. CRT putenv() updates this
   * copy, and then calls SetEnvironmentVariableA() to update the Win32API
   * copy.
   *
   * (3) win32_getenv() and win32_putenv() call GetEnvironmentVariableA() and
   * SetEnvironmentVariableA() directly, bypassing the CRT copy of the
   * environment.
   *
   * (4) The CRT strftime() "%Z" implementation calls __tzset(). That
   * calls CRT tzset(), but only the first time it is called, and in turn
   * that uses CRT getenv("TZ") to retrieve the timezone info from the CRT
   * local copy of the environment and hence gets the original setting as
   * perl never updates the CRT copy when assigning to $ENV{TZ}.
   *
   * Therefore, we need to retrieve the value of $ENV{TZ} and call CRT
   * putenv() to update the CRT copy of the environment (if it is different)
   * whenever we're about to call tzset().
   [...]

I wonder if Ramsay has an older perl that does not do this special
hackery right. I'll see if I can dig up where it first appeared.

-Peff

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: What's cooking in git.git (Oct 2012, #09; Mon, 29)
  2012-11-02  9:43     ` Jeff King
@ 2012-11-02  9:56       ` Jeff King
  2012-11-02 21:33         ` Ramsay Jones
  0 siblings, 1 reply; 10+ messages in thread
From: Jeff King @ 2012-11-02  9:56 UTC (permalink / raw)
  To: Chris Rorvick; +Cc: Ramsay Jones, git

On Fri, Nov 02, 2012 at 05:43:00AM -0400, Jeff King wrote:

> Yeah, I think that is it. IIRC, Ramsay is on cygwin, and I noticed this
> in perl 5.16's POSIX.xs:
>
> [...]
>    * (4) The CRT strftime() "%Z" implementation calls __tzset(). That
>    * calls CRT tzset(), but only the first time it is called, and in turn
>    * that uses CRT getenv("TZ") to retrieve the timezone info from the CRT
>    * local copy of the environment and hence gets the original setting as
>    * perl never updates the CRT copy when assigning to $ENV{TZ}.
> [...]
> I wonder if Ramsay has an older perl that does not do this special
> hackery right. I'll see if I can dig up where it first appeared.

It looks like that code went into perl 5.11.

I wonder, even with this fix, though, if we need to be calling tzset to
reliably update from the environment. It sounds like it _should_ happen
automatically, except that if the CRT is calling the internal tzset, it
would not do the perl "grab from $ENV" magic. Calling tzset would make
sure the internal TZ is up to date.

Ramsay, what happens with this patch on top?

diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index ceb119d..4c44050 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -24,11 +24,12 @@ use File::Basename qw(basename dirname);
 use Time::Local;
 use IO::Socket;
 use IO::Pipe;
-use POSIX qw(strftime dup2 ENOENT);
+use POSIX qw(strftime tzset dup2 ENOENT);
 use IPC::Open2;
 
 $SIG{'PIPE'}="IGNORE";
 $ENV{'TZ'}="UTC";
+tzset();
 
 our ($opt_h,$opt_o,$opt_v,$opt_k,$opt_u,$opt_d,$opt_p,$opt_C,$opt_z,$opt_i,$opt_P, $opt_s,$opt_m,@opt_M,$opt_A,$opt_S,$opt_L, $opt_a, $opt_r, $opt_R);
 my (%conv_author_name, %conv_author_email, %conv_author_tz);
@@ -855,8 +856,10 @@ sub commit {
 	}
 
 	$ENV{'TZ'}=$author_tz;
+	tzset();
 	my $commit_date = strftime("%s %z", localtime($date));
 	$ENV{'TZ'}="UTC";
+	tzset();
 	$ENV{GIT_AUTHOR_NAME} = $author_name;
 	$ENV{GIT_AUTHOR_EMAIL} = $author_email;
 	$ENV{GIT_AUTHOR_DATE} = $commit_date;

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: What's cooking in git.git (Oct 2012, #09; Mon, 29)
  2012-11-02  9:56       ` Jeff King
@ 2012-11-02 21:33         ` Ramsay Jones
  2012-11-04 12:29           ` Jeff King
  0 siblings, 1 reply; 10+ messages in thread
From: Ramsay Jones @ 2012-11-02 21:33 UTC (permalink / raw)
  To: Jeff King; +Cc: Chris Rorvick, git

Jeff King wrote:
> On Fri, Nov 02, 2012 at 05:43:00AM -0400, Jeff King wrote:
> 
>> Yeah, I think that is it. IIRC, Ramsay is on cygwin, and I noticed this
>> in perl 5.16's POSIX.xs:
>>
>> [...]
>>    * (4) The CRT strftime() "%Z" implementation calls __tzset(). That
>>    * calls CRT tzset(), but only the first time it is called, and in turn
>>    * that uses CRT getenv("TZ") to retrieve the timezone info from the CRT
>>    * local copy of the environment and hence gets the original setting as
>>    * perl never updates the CRT copy when assigning to $ENV{TZ}.
>> [...]
>> I wonder if Ramsay has an older perl that does not do this special
>> hackery right. I'll see if I can dig up where it first appeared.

Hmm, sorry for not specifying this upfront, but this failure is on Linux. ;-)
(Linux is my main platform, but I like to keep cygwin working because it has
kept me sane on Windows ever since (about) 1995 ...)
"Stranger in a strange land" ;-)

This test is skipped on cygwin because I don't have cvs (or cvsps) installed
on cygwin. (I have cvs-1.11.1p1.tar.gz and cvsps-2.2b1.tar.gz lying around
on cygwin, so I could probably build them from source and do some testing if
you would like me too. Just let me know.)

This test is skipped on MinGW because cvsps is not installed. (I have just
tried building cvsps, but there are compilation errors ...).

I'm using perl v5.8.8 on Linux.

> It looks like that code went into perl 5.11.
> 
> I wonder, even with this fix, though, if we need to be calling tzset to
> reliably update from the environment. It sounds like it _should_ happen
> automatically, except that if the CRT is calling the internal tzset, it
> would not do the perl "grab from $ENV" magic. Calling tzset would make
> sure the internal TZ is up to date.
> 
> Ramsay, what happens with this patch on top?

This patch fixes the test for me.

Thanks!

ATB,
Ramsay Jones

> diff --git a/git-cvsimport.perl b/git-cvsimport.perl
> index ceb119d..4c44050 100755
> --- a/git-cvsimport.perl
> +++ b/git-cvsimport.perl
> @@ -24,11 +24,12 @@ use File::Basename qw(basename dirname);
>  use Time::Local;
>  use IO::Socket;
>  use IO::Pipe;
> -use POSIX qw(strftime dup2 ENOENT);
> +use POSIX qw(strftime tzset dup2 ENOENT);
>  use IPC::Open2;
>  
>  $SIG{'PIPE'}="IGNORE";
>  $ENV{'TZ'}="UTC";
> +tzset();
>  
>  our ($opt_h,$opt_o,$opt_v,$opt_k,$opt_u,$opt_d,$opt_p,$opt_C,$opt_z,$opt_i,$opt_P, $opt_s,$opt_m,@opt_M,$opt_A,$opt_S,$opt_L, $opt_a, $opt_r, $opt_R);
>  my (%conv_author_name, %conv_author_email, %conv_author_tz);
> @@ -855,8 +856,10 @@ sub commit {
>  	}
>  
>  	$ENV{'TZ'}=$author_tz;
> +	tzset();
>  	my $commit_date = strftime("%s %z", localtime($date));
>  	$ENV{'TZ'}="UTC";
> +	tzset();
>  	$ENV{GIT_AUTHOR_NAME} = $author_name;
>  	$ENV{GIT_AUTHOR_EMAIL} = $author_email;
>  	$ENV{GIT_AUTHOR_DATE} = $commit_date;
> .
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: What's cooking in git.git (Oct 2012, #09; Mon, 29)
  2012-11-02 21:33         ` Ramsay Jones
@ 2012-11-04 12:29           ` Jeff King
  2012-11-10 18:33             ` Ramsay Jones
  0 siblings, 1 reply; 10+ messages in thread
From: Jeff King @ 2012-11-04 12:29 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: Chris Rorvick, git

On Fri, Nov 02, 2012 at 09:33:14PM +0000, Ramsay Jones wrote:

> >> I wonder if Ramsay has an older perl that does not do this special
> >> hackery right. I'll see if I can dig up where it first appeared.
> 
> Hmm, sorry for not specifying this upfront, but this failure is on Linux. ;-)

Ah, that's helpful to know.

> (Linux is my main platform, but I like to keep cygwin working because it has
> kept me sane on Windows ever since (about) 1995 ...)
> "Stranger in a strange land" ;-)

I used a different trick around the same time to keep me sane from
Windows, but I think it involved "dd" and "/dev/zero"...

> I'm using perl v5.8.8 on Linux.

Yeah, that is the problem. Calling localtime_r repeatedly while changing
the timezone does not work on some platforms:

  https://rt.perl.org/rt3/Public/Bug/Display.html?id=26136

The fix (to call tzset each time) went into perl 5.10.0.

> > Ramsay, what happens with this patch on top?
> 
> This patch fixes the test for me.

Great. I was guessing blindly when I wrote it, but having seen the perl
bug above, it all makes sense.

We should probably wrap it. I'm planning to queue this on top of Chris's
patch:

-- >8 --
Subject: [PATCH] cvsimport: work around perl tzset issue

On many platforms, the first invocation of localtime_r will
check $TZ in the environment, but subsequent invocations
will use a cache value. That means that setting $ENV{TZ} in
the middle of the program may or may not have an effect on
later calls to localtime.  Perl 5.10.0 and later handles
this automatically for us, but we try to remain portable
back to 5.8. Work around it by calling tzset ourselves.

Signed-off-by: Jeff King <peff@peff.net>
---
 git-cvsimport.perl | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index ceb119d..0a31ebd 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -24,11 +24,11 @@ use File::Basename qw(basename dirname);
 use Time::Local;
 use IO::Socket;
 use IO::Pipe;
-use POSIX qw(strftime dup2 ENOENT);
+use POSIX qw(strftime tzset dup2 ENOENT);
 use IPC::Open2;
 
 $SIG{'PIPE'}="IGNORE";
-$ENV{'TZ'}="UTC";
+set_timezone('UTC');
 
 our ($opt_h,$opt_o,$opt_v,$opt_k,$opt_u,$opt_d,$opt_p,$opt_C,$opt_z,$opt_i,$opt_P, $opt_s,$opt_m,@opt_M,$opt_A,$opt_S,$opt_L, $opt_a, $opt_r, $opt_R);
 my (%conv_author_name, %conv_author_email, %conv_author_tz);
@@ -99,6 +99,15 @@ sub write_author_info($) {
 	close ($f);
 }
 
+# Versions of perl before 5.10.0 may not automatically check $TZ each
+# time localtime is run (most platforms will do so only the first time).
+# We can work around this by using tzset() to update the internal
+# variable whenever we change the environment.
+sub set_timezone {
+	$ENV{TZ} = shift;
+	tzset();
+}
+
 # convert getopts specs for use by git config
 my %longmap = (
 	'A:' => 'authors-file',
@@ -854,9 +863,9 @@ sub commit {
 		}
 	}
 
-	$ENV{'TZ'}=$author_tz;
+	set_timezone($author_tz);
 	my $commit_date = strftime("%s %z", localtime($date));
-	$ENV{'TZ'}="UTC";
+	set_timezone('UTC');
 	$ENV{GIT_AUTHOR_NAME} = $author_name;
 	$ENV{GIT_AUTHOR_EMAIL} = $author_email;
 	$ENV{GIT_AUTHOR_DATE} = $commit_date;
-- 
1.8.0.207.gdf2154c

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: What's cooking in git.git (Oct 2012, #09; Mon, 29)
  2012-11-04 12:29           ` Jeff King
@ 2012-11-10 18:33             ` Ramsay Jones
  2012-11-11 17:41               ` Jeff King
  0 siblings, 1 reply; 10+ messages in thread
From: Ramsay Jones @ 2012-11-10 18:33 UTC (permalink / raw)
  To: Jeff King; +Cc: Chris Rorvick, git

Jeff King wrote:
> On Fri, Nov 02, 2012 at 09:33:14PM +0000, Ramsay Jones wrote:
> 
>> (Linux is my main platform, but I like to keep cygwin working because it has
>> kept me sane on Windows ever since (about) 1995 ...)
>> "Stranger in a strange land" ;-)
> 
> I used a different trick around the same time to keep me sane from
> Windows, but I think it involved "dd" and "/dev/zero"...

;-) That's a solution I would have been keen to try, but my employer
at the time would not have liked that idea ...

>>
>> This patch fixes the test for me.
> 
> Great. I was guessing blindly when I wrote it, but having seen the perl
> bug above, it all makes sense.
> 
> We should probably wrap it. I'm planning to queue this on top of Chris's
> patch:

Unfortunately, I haven't had time yet to test this patch. (Early this week, I
went into hospital for a "minor" surgical procedure - I have not yet fully
recovered). The patch looks good and I don't anticipate any problems. I will
hopefully test it soon (I see it's in pu now) and let you know.

[snip patch]

ATB,
Ramsay Jones

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: What's cooking in git.git (Oct 2012, #09; Mon, 29)
  2012-11-10 18:33             ` Ramsay Jones
@ 2012-11-11 17:41               ` Jeff King
  2012-11-13 18:47                 ` Ramsay Jones
  0 siblings, 1 reply; 10+ messages in thread
From: Jeff King @ 2012-11-11 17:41 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: Chris Rorvick, git

On Sat, Nov 10, 2012 at 06:33:38PM +0000, Ramsay Jones wrote:

> > We should probably wrap it. I'm planning to queue this on top of Chris's
> > patch:
> 
> Unfortunately, I haven't had time yet to test this patch. (Early this week, I
> went into hospital for a "minor" surgical procedure - I have not yet fully
> recovered). The patch looks good and I don't anticipate any problems. I will
> hopefully test it soon (I see it's in pu now) and let you know.

Thanks. I merged it to "next" on Friday, so we will see if anybody
screams. But please take your time and recover. Git will wait. :)

-Peff

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: What's cooking in git.git (Oct 2012, #09; Mon, 29)
  2012-11-11 17:41               ` Jeff King
@ 2012-11-13 18:47                 ` Ramsay Jones
  0 siblings, 0 replies; 10+ messages in thread
From: Ramsay Jones @ 2012-11-13 18:47 UTC (permalink / raw)
  To: Jeff King; +Cc: Chris Rorvick, git

Jeff King wrote:
> On Sat, Nov 10, 2012 at 06:33:38PM +0000, Ramsay Jones wrote:
> 
>>> We should probably wrap it. I'm planning to queue this on top of Chris's
>>> patch:
>>
>> Unfortunately, I haven't had time yet to test this patch. (Early this week, I
>> went into hospital for a "minor" surgical procedure - I have not yet fully
>> recovered). The patch looks good and I don't anticipate any problems. I will
>> hopefully test it soon (I see it's in pu now) and let you know.
> 
> Thanks. I merged it to "next" on Friday, so we will see if anybody
> screams. But please take your time and recover. Git will wait. :)

I have tested this patch and, as expected, it fixes things up for me.
(To be more precise: the current next branch works, but if I revert
commit c2b3af05, then t9604-cvsimport-timestamps.sh fails in the
same way as before!)

Thanks!

ATB,
Ramsay Jones

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-11-13 18:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-29 10:21 What's cooking in git.git (Oct 2012, #09; Mon, 29) Jeff King
2012-11-01 18:40 ` Ramsay Jones
2012-11-02  1:12   ` Chris Rorvick
2012-11-02  9:43     ` Jeff King
2012-11-02  9:56       ` Jeff King
2012-11-02 21:33         ` Ramsay Jones
2012-11-04 12:29           ` Jeff King
2012-11-10 18:33             ` Ramsay Jones
2012-11-11 17:41               ` Jeff King
2012-11-13 18:47                 ` Ramsay Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.