git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* What's cooking in git.git (Aug 2010, #04; Wed, 18)
@ 2010-08-18 22:27 Junio C Hamano
  2010-08-19  3:02 ` Jonathan Nieder
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Junio C Hamano @ 2010-08-18 22:27 UTC (permalink / raw)
  To: git

Here are the topics that have been cooking.  Commits prefixed with '-' are
only in 'pu' while commits prefixed with '+' are in 'next'.  The ones
marked with '.' do not appear in any of the integration branches, but I am
still holding onto them.

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

* ab/report-corrupt-object-with-type (2010-06-10) 1 commit
  (merged to 'next' on 2010-08-12 at 8a9e1d0)
 + sha1_file: Show the the type and path to corrupt objects

* ar/string-list-foreach (2010-07-03) 2 commits
  (merged to 'next' on 2010-08-11 at 993dc02)
 + Convert the users of for_each_string_list to for_each_string_list_item macro
 + Add a for_each_string_list_item macro
 (this branch is used by tf/string-list-init.)

* cc/find-commit-subject (2010-07-22) 6 commits
  (merged to 'next' on 2010-08-12 at ce38436)
 + blame: use find_commit_subject() instead of custom code
 + merge-recursive: use find_commit_subject() instead of custom code
 + bisect: use find_commit_subject() instead of custom code
 + revert: rename variables related to subject in get_message()
 + revert: refactor code to find commit subject in find_commit_subject()
 + revert: fix off by one read when searching the end of a commit subject

* jc/maint-follow-rename-fix (2010-08-15) 3 commits
  (merged to 'next' on 2010-08-15 at 2f41ea8)
 + log: test for regression introduced in v1.7.2-rc0~103^2~2
  (merged to 'next' on 2010-08-14 at 16706d6)
 + diff --follow: do call diffcore_std() as necessary
 + diff --follow: do not waste cycles while recursing

* jh/clean-exclude (2010-07-20) 2 commits
  (merged to 'next' on 2010-08-12 at 9a63fd4)
 + Add test for git clean -e.
 + Add -e/--exclude to git-clean.

* jh/graph-next-line (2010-07-13) 2 commits
  (merged to 'next' on 2010-08-11 at 333f9df)
 + Enable custom schemes for column colors in the graph API
 + Make graph_next_line() available in the graph.h API

* jh/use-test-must-fail (2010-07-20) 1 commit
  (merged to 'next' on 2010-08-12 at 16d4e11)
 + Convert "! git" to "test_must_fail git"

* jl/submodule-ignore-diff (2010-08-06) 4 commits
  (merged to 'next' on 2010-08-12 at ffe84bb)
 + Add tests for the diff.ignoreSubmodules config option
 + Add the 'diff.ignoreSubmodules' config setting
 + Submodules: Use "ignore" settings from .gitmodules too for diff and status
 + Submodules: Add the new "ignore" config option for diff and status

* jn/fast-import-subtree (2010-06-30) 1 commit
  (merged to 'next' on 2010-08-11 at 5e19de0)
 + Teach fast-import to import subtrees named by tree id

* jn/fix-abbrev (2010-07-27) 3 commits
  (merged to 'next' on 2010-08-12 at 2cf70df)
 + examples/commit: use --abbrev for commit summary
 + checkout, commit: remove confusing assignments to rev.abbrev
 + archive: abbreviate substituted commit ids again

* jn/maint-plug-leak (2010-08-09) 3 commits
  (merged to 'next' on 2010-08-14 at ec2ba20)
 + write-tree: Avoid leak when index refers to an invalid object
 + read-tree: stop leaking tree objects
 + core: Stop leaking ondisk_cache_entrys

* jn/rebase-rename-am (2008-11-10) 5 commits
  (merged to 'next' on 2010-08-12 at a6d25c4)
 + rebase: protect against diff.renames configuration
 + t3400 (rebase): whitespace cleanup
 + Teach "apply --index-info" to handle rename patches
 + t4150 (am): futureproof against failing tests
 + t4150 (am): style fix

* kf/post-receive-sample-hook (2010-07-16) 1 commit
  (merged to 'next' on 2010-08-12 at 9b7e3c9)
 + post-receive-email: optional message line count limit

I do not particularly like the idea of counting number of lines in a shell
loop but this is an opt-in feature to a contrib/ item so it should be ok.

* ml/rebase-x-strategy (2010-07-29) 1 commit
  (merged to 'next' on 2010-08-12 at 0aa2fdb)
 + rebase: support -X to pass through strategy options

* tc/checkout-B (2010-08-10) 4 commits
  (merged to 'next' on 2010-08-11 at 5433b51)
 + builtin/checkout: handle -B from detached HEAD correctly
 + builtin/checkout: learn -B
 + builtin/checkout: reword hint for -b
 + add tests for checkout -b

* tf/string-list-init (2010-07-04) 1 commit
  (merged to 'next' on 2010-08-14 at 193b4db)
 + string_list: Add STRING_LIST_INIT macro and make use of it.

* tr/xsize-bits (2010-07-28) 1 commit
  (merged to 'next' on 2010-08-11 at bcc0271)
 + xsize_t: check whether we lose bits

* vs/doc-spell (2010-07-20) 1 commit
  (merged to 'next' on 2010-08-12 at 3fbd06c)
 + Documentation: spelling fixes

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

* ab/maint-reset-mixed-w-pathspec-advice (2010-08-15) 1 commit
 - reset: Better warning message on git reset --mixed <paths>

Probably needs a "better" title; the commit shouldn't advertise itself
being "better" (or "clean" for that matter), but say what it changed and
leave it to the readers to judge if it is better.

* cb/binary-patch-id (2010-08-15) 1 commit
 - hash binary sha1 into patch id

* jj/icase-directory (2010-08-16) 6 commits
 - Support case folding in git fast-import when core.ignorecase=true
 - Support case folding for git add when core.ignorecase=true
 - Add case insensitivity support when using git ls-files
 - Add case insensitivity support for directories when using git status
 - Case insensitivity support for .gitignore via core.ignorecase
 - Add string comparison functions that respect the ignore_case variable.

Depends on GNU extension to fnmatch(3).

* jn/cherry-revert-message-clean-up (2010-08-18) 5 commits
 - tests: fix syntax error in "Use advise() for hints" test
 - cherry-pick/revert: Use advise() for hints
 - cherry-pick/revert: Use error() for failure message
 - Introduce advise() to print hints
 - Eliminate “Finished cherry-pick/revert” message
 (this branch uses cc/revert.)

* jn/merge-custom-no-trivial (2010-08-15) 2 commits
 - merge: let custom strategies intervene in trivial merges
 - t7606 (merge-theirs): modernize style

* po/etc-gitattributes (2010-08-16) 1 commit
 - Add global and system-wide gitattributes

* ab/compat-regex (2010-08-17) 5 commits
 - autoconf: don't use platform regex if it lacks REG_STARTEND
 - t/t7008-grep-binary.sh: un-TODO a test that needs REG_STARTEND
 - Change regerror() declaration from K&R style to ANSI C (C89)
 - compat/regex: get the gawk regex engine to compile within git
 - compat/regex: use the regex engine from gawk for compat

* ab/test-1 (2010-08-18) 5 commits
 . t/t0000-basic.sh: Run the passing TODO test inside its own test-lib
 . test-lib: Allow overriding of TEST_DIRECTORY
 . test-lib: Use "$GIT_BUILD_DIR" instead of "$TEST_DIRECTORY"/../
 . test-lib: Use $TEST_DIRECTORY or $GIT_BUILD_DIR instead of $(pwd) and ../
 . Merge branch 'ab/i18n' into ab/test-1
 (this branch uses ab/i18n and ab/test.)

Not merged to 'pu' as it seemed to have broken something.

* da/fix-submodule-sync-superproject-config (2010-08-18) 1 commit
 - submodule sync: Update "submodule.<name>.url"

Looked reasonable; will merge to 'next' soonish.

* jn/update-contrib-example-merge (2010-08-17) 25 commits
 - mergetool: Skip autoresolved paths
 - merge script: learn --[no-]rerere-autoupdate
 - merge script: notice @{-1} shorthand
 - merge script: handle --no-ff --no-commit correctly
 - merge script: --ff-only to disallow true merge
 - merge script: handle many-way octopus
 - merge script: handle -m --log correctly
 - merge script: forbid merge -s index
 - merge script: allow custom strategies
 - merge script: merge -X<option>
 - merge script: improve log message subject
 - merge script: refuse to merge during merge
 - merge script: tweak unmerged files message to match builtin
 - merge script: --squash, --ff from unborn branch are errors
 - fmt-merge-msg -m to override merge title
 - merge-base --independent to print reduced parent list in a merge
 - merge-base --octopus to mimic show-branch --merge-base
 - Documentation: add a SEE ALSO section for merge-base
 - t6200 (fmt-merge-msg): style nitpicks
 - t6010 (merge-base): modernize style
 - t7600 (merge): test merge from branch yet to be born
 - t7600 (merge): check reflog entry
 - t7600 (merge): do not launch gitk for --debug
 - t7600 (merge): modernize style
 - merge: do not mistake (ancestor of) tag for branch

I am of two minds about this series.  While I do very much like the ease
of experimenting with scripted implementations, contrib/examples has been
about giving easier access to the historical implementations (iow, people
could check out an older version to see how the things looked like, but
they do not have to with scripted implementations shipped in
contrib/examples).  A series like this may update scripted Porcelains with
recent new features, but the result will never be as solidly battle tested
implementations (admittedly with only subset of features and without later
fixes) like we had there so far.

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

* jc/log-grep (2010-07-19) 1 commit
 - git log: add -G<regexp> that greps in the patch text

This is broken, but haven't found any time to revisit it yet.

* jn/apply-filename-with-sp (2010-07-23) 4 commits
 - apply: Handle traditional patches with space in filename
 - t4135 (apply): use expand instead of pr for portability
 - tests: Test how well "git apply" copes with weird filenames
 - apply: Split quoted filename handling into new function

Needs prereq?

* zl/mailinfo-recode-patch (2010-06-14) 2 commits
 - add --recode-patch option to git-am
 - add --recode-patch option to git-mailinfo

I recall there was another round of re-roll planned for this one.

* jk/tag-contains (2010-07-05) 4 commits
 - Why is "git tag --contains" so slow?
 - default core.clockskew variable to one day
 - limit "contains" traversals based on commit timestamp
 - tag: speed up --contains calculation

* jn/commit-no-change-wo-status (2010-08-11) 10 commits
 . t6040 (branch tracking): check “status” instead of “commit”
 . commit: suppress status summary when no changes staged
 . commit --dry-run: give advice on empty amend
 . commit: give empty-commit avoidance code its own function
 . t7508 (status): modernize style
 . commit: split off the piece that writes status
 . commit: split commit -s handling into its own function
 . commit: split off a function to fetch the default log message
 . wt-status: split off a function for printing submodule summary
 . wt-status: split wt_status_print into digestible pieces

There seemed to be some doubts on removal of the "no changes" line?

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

* ab/perl-install (2010-08-03) 1 commit
  (merged to 'next' on 2010-08-14 at f2a27ee)
 + perl/Makefile: Unset INSTALL_BASE when making perl.mak

* ab/test (2010-08-16) 43 commits
  (merged to 'next' on 2010-08-18 at f88bdb1)
 + cvs tests: do not touch test CVS repositories shipped with source
 + t/t9602-cvsimport-branches-tags.sh: Add a PERL prerequisite
 + t/t9601-cvsimport-vendor-branch.sh: Add a PERL prerequisite
 + t/t7105-reset-patch.sh: Add a PERL prerequisite
 + t/t9001-send-email.sh: convert setup code to tests
 + t/t9001-send-email.sh: change from skip_all=* to prereq skip
 + t/t9001-send-email.sh: Remove needless PROG=* assignment
 + t/t9600-cvsimport.sh: change from skip_all=* to prereq skip
 + lib-patch-mode tests: change from skip_all=* to prereq skip
 + t/t3701-add-interactive.sh: change from skip_all=* to prereq skip
 + tests: Move FILEMODE prerequisite to lib-prereq-FILEMODE.sh
 + t/Makefile: Create test-results dir for smoke target
 + git-notes: Run partial expensive test everywhere
 + t/t3300-funny-names: change from skip_all=* to prereq skip
 + t/t3902-quoted: change from skip_all=* to prereq skip
 + t/t4016-diff-quote: change from skip_all=* to prereq skip
 + t/t5503-tagfollow: change from skip_all=* to prereq skip
 + t/t7005-editor: change from skip_all=* to prereq skip
 + t/t5705-clone-2gb: change from skip_all=* to prereq skip
 + t/t1304-default-acl: change from skip_all=* to prereq skip
 + t/README: Update "Skipping tests" to align with best practices
 + t/t7800-difftool.sh: Skip with prereq on no PERL
 + t/t5800-remote-helpers.sh: Skip with prereq on python <2.4
 + t/t4004-diff-rename-symlink.sh: use three-arg <prereq>
 + tests: implicitly skip SYMLINKS tests using <prereq>
 + Makefile: make gcov invocation configurable
 + t/README: Add a note about the dangers of coverage chasing
 + t/README: A new section about test coverage
 + Makefile: Add cover_db_html target
 + Makefile: Add cover_db target
 + Makefile: Split out the untested functions target
 + Makefile: Include subdirectories in "make cover" reports
 + gitignore: Ignore files generated by "make coverage"
 + t/README: Add SMOKE_{COMMENT,TAGS}= to smoke_report target
 + t/Makefile: Can't include GIT-BUILD-OPTIONS, it's a .sh
 + t/README: Document the Smoke testing
 + tests: Infrastructure for Git smoke testing
 + test-lib: Multi-prereq support only checked the last prereq
 + tests: A SANITY test prereq for testing if we're root
 + t/README: Document the predefined test prerequisites
 + test-lib: Print missing prerequisites in test output
 + test-lib: Add support for multiple test prerequisites
 + test-lib: Don't write test-results when HARNESS_ACTIVE
 (this branch is used by ab/test-1.)

Previously many individual topic branches from the same author, all
regarding tests.  I thought it probably was ready for 'next' but was
holding off as we seem to still keep getting many fixes on top.

* dj/fetch-tagopt (2010-08-11) 1 commit
 - fetch: allow command line --tags to override config

* po/userdiff-csharp (2010-08-16) 1 commit
  (merged to 'next' on 2010-08-18 at f5edb3a)
 + Userdiff patterns for C#

* jn/paginate-fix (2010-08-16) 14 commits
  (merged to 'next' on 2010-08-18 at bb04a13)
 + t7006 (pager): add missing TTY prerequisites
 + merge-file: run setup_git_directory_gently() sooner
 + var: run setup_git_directory_gently() sooner
 + ls-remote: run setup_git_directory_gently() sooner
 + index-pack: run setup_git_directory_gently() sooner
 + Merge branch 'jn/maint-setup-fix' (early part) into jn/paginate-fix
 + config: run setup_git_directory_gently() sooner
 + bundle: run setup_git_directory_gently() sooner
 + apply: run setup_git_directory_gently() sooner
 + grep: run setup_git_directory_gently() sooner
 + shortlog: run setup_git_directory_gently() sooner
 + git wrapper: allow setup_git_directory_gently() be called earlier
 + setup: remember whether repository was found
 + git wrapper: introduce startup_info struct
 (this branch uses jn/maint-setup-fix.)

* jn/merge-renormalize (2010-08-05) 12 commits
  (merged to 'next' on 2010-08-18 at d9aa77b)
 + merge-recursive --renormalize
 + rerere: never renormalize
 + rerere: migrate to parse-options API
 + t4200 (rerere): modernize style
 + ll-merge: let caller decide whether to renormalize
 + ll-merge: make flag easier to populate
 + Documentation/technical: document ll_merge
 + merge-trees: let caller decide whether to renormalize
 + merge-trees: push choice to renormalize away from low level
 + t6038 (merge.renormalize): check that it can be turned off
 + t6038 (merge.renormalize): try checkout -m and cherry-pick
 + t6038 (merge.renormalize): style nitpicks
 (this branch uses eb/double-convert-before-merge.)

There were heavy merge conflicts in t4200; I tried to be careful when
merging this, but extra sets of eyeballs from parties involved (Jonathan
and Szeder) would always be a good idea.

* eb/double-convert-before-merge (2010-07-02) 3 commits
 + Don't expand CRLFs when normalizing text during merge
 + Try normalizing files to avoid delete/modify conflicts when merging
 + Avoid conflicts when merging branches with mixed normalization
 (this branch is used by jn/merge-renormalize.)

* by/line-log (2010-08-11) 17 commits
 - Document line history browser
 - Add tests for line history browser
 - Add --full-line-diff option
 - Add --graph prefix before line history output
 - Add parent rewriting to line history browser
 - Make graph_next_line external to other part of git
 - Make rewrite_parents public to other part of git
 - Hook line history into cmd_log, ensuring a topo-ordered walk
 - Print the line log
 - map/take range to the parent of commits
 - Add range clone functions
 - Export three functions from diff.c
 - Parse the -L options
 - Refactor parse_loc
 - Add the basic data structure for line level history
 - parse-options: add two helper functions
 - parse-options: enhance STOP_AT_NON_OPTION

Not entirely happy with the command line parser, but will merge to 'next'
after giving the series another look.

* dg/local-mod-error-messages (2010-08-11) 5 commits
  (merged to 'next' on 2010-08-14 at e684ca8)
 + t7609: test merge and checkout error messages
 + unpack_trees: group error messages by type
 + merge-recursive: distinguish "removed" and "overwritten" messages
 + merge-recursive: porcelain messages for checkout
 + Turn unpack_trees_options.msgs into an array + enum

* en/rebase-against-rebase-fix (2010-08-12) 2 commits
  (merged to 'next' on 2010-08-14 at 1dea7b9)
 + pull --rebase: Avoid spurious conflicts and reapplying unnecessary patches
 + t5520-pull: Add testcases showing spurious conflicts from git pull --rebase

* gb/split-cmdline-errmsg (2010-08-07) 1 commit
  (merged to 'next' on 2010-08-14 at 41146ff)
 + split_cmdline: Allow caller to access error string

* jn/svn-fe (2010-08-13) 16 commits
  (merged to 'next' on 2010-08-18 at 24ab19e)
 + t9010 (svn-fe): avoid symlinks in test
 + t9010 (svn-fe): use Unix-style path in URI
 + vcs-svn: Avoid %z in format string
 + vcs-svn: Rename dirent pool to build on Windows
 + compat: add strtok_r()
 + treap: style fix
 + vcs-svn: remove build artifacts on "make clean"
 + svn-fe manual: Clarify warning about deltas in dump files
 + Update svn-fe manual
 + SVN dump parser
 + Infrastructure to write revisions in fast-export format
 + Add stream helper library
 + Add string-specific memory pool
 + Add treap implementation
 + Add memory pool library
 + Introduce vcs-svn lib

* js/detached-stash (2010-08-18) 8 commits
 - detached-stash: update Documentation
 - detached-stash: tests of git stash with stash-like arguments
 - detached-stash: simplify git stash show
 - detached-stash: simplify git stash branch
 - detached-stash: refactor git stash pop implementation
 - detached-stash: simplify stash_drop
 - detached-stash: simplify stash_apply
 - detached-stash: introduce parse_flags_and_revs function

Rerolled.

* mm/rebase-i-exec (2010-08-13) 4 commits
  (merged to 'next' on 2010-08-14 at 17620dc)
 + git-rebase--interactive.sh: use printf instead of echo to print commit message
 + git-rebase--interactive.sh: rework skip_unnecessary_picks
  (merged to 'next' on 2010-08-12 at 377e3f0)
 + test-lib: user-friendly alternatives to test [-d|-f|-e]
 + rebase -i: add exec command to launch a shell command

* so/http-user-agent (2010-08-11) 1 commit
  (merged to 'next' on 2010-08-12 at 86cc5c4)
 + Allow HTTP user agent string to be modified.

* sr/local-config (2010-08-03) 1 commit
  (merged to 'next' on 2010-08-12 at 431f7af)
 + config: add --local option

Will merge to 'master' soon.

* gb/shell-ext (2010-07-28) 3 commits
 - Add sample commands for git-shell
 - Add interactive mode to git-shell for user-friendliness
 - Allow creation of arbitrary git-shell commands

Replaced the first one with the version that uses getenv("HOME"); I am not
very happy about adding these backdoors to git-shell, which is primarily a
security mechanism, and obviously security and backdoor do not mix well.

* jn/maint-setup-fix (2010-07-24) 11 commits
  (merged to 'next' on 2010-08-18 at ded5f4d)
 + setup: split off a function to handle ordinary .git directories
 + Revert "rehabilitate 'git index-pack' inside the object store"
 + setup: do not forget working dir from subdir of gitdir
 + t4111 (apply): refresh index before applying patches to it
 + setup: split off get_device_or_die helper
 + setup: split off a function to handle hitting ceiling in repo search
 + setup: split off code to handle stumbling upon a repository
 + setup: split off a function to checks working dir for .git file
 + setup: split off $GIT_DIR-set case from setup_git_directory_gently
 + tests: try git apply from subdir of toplevel
 + t1501 (rev-parse): clarify
 (this branch is used by jn/paginate-fix.)

* mm/shortopt-detached (2010-08-05) 5 commits
  (merged to 'next' on 2010-08-12 at 35ceb98)
 + log: parse separate option for --glob
 + log: parse separate options like git log --grep foo
 + diff: parse separate options --stat-width n, --stat-name-width n
 + diff: split off a function for --stat-* option parsing
 + diff: parse separate options like -S foo

* nd/fix-sparse-checkout (2010-07-31) 5 commits
  (merged to 'next' on 2010-08-12 at 4f7a3b9)
 + unpack-trees: mark new entries skip-worktree appropriately
 + unpack-trees: do not check for conflict entries too early
 + unpack-trees: let read-tree -u remove index entries outside sparse area
 + unpack-trees: only clear CE_UPDATE|CE_REMOVE when skip-worktree is always set
 + t1011 (sparse checkout): style nitpicks

* tr/maint-no-unquote-plus (2010-07-24) 1 commit
  (merged to 'next' on 2010-08-18 at b811248)
 + Do not unquote + into ' ' in URLs

I think this one is safe in the context of git (namely smart-http
interface).

* cc/revert (2010-07-21) 5 commits
  (merged to 'next' on 2010-08-14 at a910d5a)
 + t3508: add check_head_differs_from() helper function and use it
 + revert: improve success message by adding abbreviated commit sha1
 + revert: don't print "Finished one cherry-pick." if commit failed
 + revert: refactor commit code into a new run_git_commit() function
 + revert: report success when using option --strategy
 (this branch is used by jn/cherry-revert-message-clean-up.)

* en/fast-export-fix (2010-07-17) 2 commits
  (merged to 'next' on 2010-08-18 at 9fdaf27)
 + fast-export: Add a --full-tree option
 + fast-export: Fix dropping of files with --import-marks and path limiting

* hv/autosquash-config (2010-07-14) 1 commit
  (merged to 'next' on 2010-08-18 at 03a8eec)
 + add configuration variable for --autosquash option of interactive rebase

* il/rfc-remote-fd-ext (2010-08-14) 6 commits
 - Fix build on Windows
 - Simplify send_git_request()
 - Rewrite bidirectional traffic loop
 - gitignore: Ignore the new /git-remote-{ext,fd} helpers
 - New remote helper: git-remote-ext
 - New remote helper git-remote-fd

I haven't heard anything about this series.  Is it desirable?  Or is it
not used by anybody and just another baggage we'd rather not carry?

* hv/submodule-find-ff-merge (2010-07-07) 3 commits
  (merged to 'next' on 2010-08-11 at 6900d2c)
 + Implement automatic fast-forward merge for submodules
 + setup_revisions(): Allow walking history in a submodule
 + Teach ref iteration module about submodules

* sg/rerere-gc-old-still-used (2010-07-13) 2 commits
  (merged to 'next' on 2010-08-18 at 8bc4635)
 + rerere: fix overeager gc
 + mingw_utime(): handle NULL times parameter

* en/d-f-conflict-fix (2010-08-17) 11 commits
  (merged to 'next' on 2010-08-18 at 6be0f13)
 + merge-recursive: Fix multiple file rename across D/F conflict
 + t6031: Add a testcase covering multiple renames across a D/F conflict
 + merge-recursive: Fix typo
  (merged to 'next' on 2010-08-14 at 1c9b0f5)
 + Mark tests that use symlinks as needing SYMLINKS prerequisite
  (merged to 'next' on 2010-08-03 at 7f78604)
 + t/t6035-merge-dir-to-symlink.sh: Remove TODO on passing test
 + fast-import: Improve robustness when D->F changes provided in wrong order
 + fast-export: Fix output order of D/F changes
 + merge_recursive: Fix renames across paths below D/F conflicts
 + merge-recursive: Fix D/F conflicts
 + Add a rename + D/F conflict testcase
 + Add additional testcases for D/F conflicts

* ab/i18n (2010-07-25) 4 commits
 - tests: locate i18n lib&data correctly under --valgrind
 - gettext: setlocale(LC_CTYPE, "") breaks Git's C function assumptions
 - tests: rename test to work around GNU gettext bug
 - Add infrastructure for translating Git with gettext
 (this branch is used by ab/test-1.)

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

* Re: What's cooking in git.git (Aug 2010, #04; Wed, 18)
  2010-08-18 22:27 What's cooking in git.git (Aug 2010, #04; Wed, 18) Junio C Hamano
@ 2010-08-19  3:02 ` Jonathan Nieder
  2010-08-19  8:06   ` Johannes Sixt
  2010-08-19  3:22 ` jn/update-contrib-example-merge in pu Jonathan Nieder
  2010-08-19 12:53 ` What's cooking in git.git (Aug 2010, #04; Wed, 18) Ævar Arnfjörð Bjarmason
  2 siblings, 1 reply; 23+ messages in thread
From: Jonathan Nieder @ 2010-08-19  3:02 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Junio C Hamano wrote:

> * ab/compat-regex (2010-08-17) 5 commits
>  - autoconf: don't use platform regex if it lacks REG_STARTEND
>  - t/t7008-grep-binary.sh: un-TODO a test that needs REG_STARTEND
>  - Change regerror() declaration from K&R style to ANSI C (C89)
>  - compat/regex: get the gawk regex engine to compile within git
>  - compat/regex: use the regex engine from gawk for compat

As Hannes noticed, the tip commit is bogus and the configure
test gives the wrong result on platforms with missing or inferior
regex.  Sorry about that.  Replacement is at $gmane/153782.

> * jn/update-contrib-example-merge (2010-08-17) 25 commits
[...]
> A series like this may update scripted Porcelains with
> recent new features, but the result will never be as solidly battle tested
> implementations (admittedly with only subset of features and without later
> fixes) like we had there so far.

I was similarly nervous about that.  But as you say, it is always possible
to search through history for the older version.

Administrivia:

 - patch 1 (do not mistake ancestor of tag for branch) is a separate fix.
   It probably should have been sent separately.

 - patch 9-11 (merge-base --octopus, merge-base --independent, and especially
   fmt-merge-msg -m) which expose library functions to scripts might be
   independently useful.

 - patch 24 (merge script: learn --[no-]rerere-autoupdate) requires a
   working rerere --rerere-autoupdate, which means the patch for commit
   672d1b78 (rerere: migrate to parse-options API, 2010-08-05).  I can
   make a more targetted fix if that would be helpful for testing.

> * jn/commit-no-change-wo-status (2010-08-11) 10 commits
[...]
> There seemed to be some doubts on removal of the "no changes" line?

I'm happy to drop this series for now; the resulting output is just
not very good.

> * jn/paginate-fix (2010-08-16) 14 commits
>   (merged to 'next' on 2010-08-18 at bb04a13)

I am happy to see this get more exposure.  Thanks.

> There were heavy merge conflicts in t4200; I tried to be careful when
> merging this, but extra sets of eyeballs from parties involved (Jonathan
> and Szeder) would always be a good idea.

Looks good (and agrees with what I got from manually applying Szeder's
patch on top of the topic).

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

* jn/update-contrib-example-merge in pu
  2010-08-18 22:27 What's cooking in git.git (Aug 2010, #04; Wed, 18) Junio C Hamano
  2010-08-19  3:02 ` Jonathan Nieder
@ 2010-08-19  3:22 ` Jonathan Nieder
  2010-08-19 12:53 ` What's cooking in git.git (Aug 2010, #04; Wed, 18) Ævar Arnfjörð Bjarmason
  2 siblings, 0 replies; 23+ messages in thread
From: Jonathan Nieder @ 2010-08-19  3:22 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, David Aguilar

Junio C Hamano wrote:

> * jn/update-contrib-example-merge (2010-08-17) 25 commits
>  - mergetool: Skip autoresolved paths

How did that get there?

Confused,
Jonathan

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

* Re: What's cooking in git.git (Aug 2010, #04; Wed, 18)
  2010-08-19  3:02 ` Jonathan Nieder
@ 2010-08-19  8:06   ` Johannes Sixt
  2010-08-19 12:48     ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 23+ messages in thread
From: Johannes Sixt @ 2010-08-19  8:06 UTC (permalink / raw)
  To: Jonathan Nieder
  Cc: Junio C Hamano, git, Ævar Arnfjörð Bjarmason

Am 8/19/2010 5:02, schrieb Jonathan Nieder:
> Junio C Hamano wrote:
> 
>> * ab/compat-regex (2010-08-17) 5 commits
>>  - autoconf: don't use platform regex if it lacks REG_STARTEND
>>  - t/t7008-grep-binary.sh: un-TODO a test that needs REG_STARTEND
>>  - Change regerror() declaration from K&R style to ANSI C (C89)
>>  - compat/regex: get the gawk regex engine to compile within git
>>  - compat/regex: use the regex engine from gawk for compat
> 
> As Hannes noticed, the tip commit is bogus and the configure
> test gives the wrong result on platforms with missing or inferior
> regex.  Sorry about that.  Replacement is at $gmane/153782.

and I see these warnings:

In file included from compat/regex/regex.c:71:
compat/regex/regex_internal.c: In function 're_string_reconstruct':
compat/regex/regex_internal.c:696: warning: unused variable 'prev_valid_len'
In file included from compat/regex/regex.c:78:
compat/regex/regexec.c: In function 'check_arrival_add_next_nodes':
compat/regex/regexec.c:3062: warning: unused variable 'err'

This happens because RE_ENABLE_I18N is not defined by regex_internal.h. Is
this how it is supposed to be?

-- Hannes

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

* Re: What's cooking in git.git (Aug 2010, #04; Wed, 18)
  2010-08-19  8:06   ` Johannes Sixt
@ 2010-08-19 12:48     ` Ævar Arnfjörð Bjarmason
  2010-08-19 15:04       ` Ævar Arnfjörð Bjarmason
       [not found]       ` <AANLkTinkjsLycvV-uvfG14t7Q=uKt+pnpizKCPGirVW1@mail.gmail.com>
  0 siblings, 2 replies; 23+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-19 12:48 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: Jonathan Nieder, Junio C Hamano, git

On Thu, Aug 19, 2010 at 08:06, Johannes Sixt <j.sixt@viscovery.net> wrote:

> and I see these warnings:
>
> In file included from compat/regex/regex.c:71:
> compat/regex/regex_internal.c: In function 're_string_reconstruct':
> compat/regex/regex_internal.c:696: warning: unused variable 'prev_valid_len'
> In file included from compat/regex/regex.c:78:
> compat/regex/regexec.c: In function 'check_arrival_add_next_nodes':
> compat/regex/regexec.c:3062: warning: unused variable 'err'
>
> This happens because RE_ENABLE_I18N is not defined by regex_internal.h. Is
> this how it is supposed to be?

I noted these in <1282015548-19074-1-git-send-email-avarab@gmail.com>,
although I was off by one.

I haven't read all the relevant code, but we almost definitely do not
want RE_ENABLE_I18N, since we aren't doing the relevant setlocale()
things (and doing so breaks git, see the fix in the ab/i18n series in
pu).

I was going to report this upstream once I got around to finding out
what upstream *is*, I don't *think* gawk itself is the canonical
upstream, they just copy it from somewhere else (again, I *think*).

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

* Re: What's cooking in git.git (Aug 2010, #04; Wed, 18)
  2010-08-18 22:27 What's cooking in git.git (Aug 2010, #04; Wed, 18) Junio C Hamano
  2010-08-19  3:02 ` Jonathan Nieder
  2010-08-19  3:22 ` jn/update-contrib-example-merge in pu Jonathan Nieder
@ 2010-08-19 12:53 ` Ævar Arnfjörð Bjarmason
  2010-08-19 15:27   ` Ævar Arnfjörð Bjarmason
  2 siblings, 1 reply; 23+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-19 12:53 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Wed, Aug 18, 2010 at 22:27, Junio C Hamano <gitster@pobox.com> wrote:

> [New Topics]
>
> * ab/maint-reset-mixed-w-pathspec-advice (2010-08-15) 1 commit
>  - reset: Better warning message on git reset --mixed <paths>
>
> Probably needs a "better" title; the commit shouldn't advertise itself
> being "better" (or "clean" for that matter), but say what it changed and
> leave it to the readers to judge if it is better.

s/Better/Clarify/ is as good as I can make it without making the
subject line too long.

> * ab/test-1 (2010-08-18) 5 commits
>  . t/t0000-basic.sh: Run the passing TODO test inside its own test-lib
>  . test-lib: Allow overriding of TEST_DIRECTORY
>  . test-lib: Use "$GIT_BUILD_DIR" instead of "$TEST_DIRECTORY"/../
>  . test-lib: Use $TEST_DIRECTORY or $GIT_BUILD_DIR instead of $(pwd) and ../
>  . Merge branch 'ab/i18n' into ab/test-1
>  (this branch uses ab/i18n and ab/test.)
>
> Not merged to 'pu' as it seemed to have broken something.

What does it seem to have broken? I can't fix it if I don't know
what's wrong. It Works For Me.

> * ab/perl-install (2010-08-03) 1 commit
>  (merged to 'next' on 2010-08-14 at f2a27ee)
>  + perl/Makefile: Unset INSTALL_BASE when making perl.mak
>
> * ab/test (2010-08-16) 43 commits
>  (merged to 'next' on 2010-08-18 at f88bdb1)
>  + cvs tests: do not touch test CVS repositories shipped with source
>  + t/t9602-cvsimport-branches-tags.sh: Add a PERL prerequisite
>  + t/t9601-cvsimport-vendor-branch.sh: Add a PERL prerequisite
>  + t/t7105-reset-patch.sh: Add a PERL prerequisite
>  + t/t9001-send-email.sh: convert setup code to tests
>  + t/t9001-send-email.sh: change from skip_all=* to prereq skip
>  + t/t9001-send-email.sh: Remove needless PROG=* assignment
>  + t/t9600-cvsimport.sh: change from skip_all=* to prereq skip
>  + lib-patch-mode tests: change from skip_all=* to prereq skip
>  + t/t3701-add-interactive.sh: change from skip_all=* to prereq skip
>  + tests: Move FILEMODE prerequisite to lib-prereq-FILEMODE.sh
>  + t/Makefile: Create test-results dir for smoke target
>  + git-notes: Run partial expensive test everywhere
>  + t/t3300-funny-names: change from skip_all=* to prereq skip
>  + t/t3902-quoted: change from skip_all=* to prereq skip
>  + t/t4016-diff-quote: change from skip_all=* to prereq skip
>  + t/t5503-tagfollow: change from skip_all=* to prereq skip
>  + t/t7005-editor: change from skip_all=* to prereq skip
>  + t/t5705-clone-2gb: change from skip_all=* to prereq skip
>  + t/t1304-default-acl: change from skip_all=* to prereq skip
>  + t/README: Update "Skipping tests" to align with best practices
>  + t/t7800-difftool.sh: Skip with prereq on no PERL
>  + t/t5800-remote-helpers.sh: Skip with prereq on python <2.4
>  + t/t4004-diff-rename-symlink.sh: use three-arg <prereq>
>  + tests: implicitly skip SYMLINKS tests using <prereq>
>  + Makefile: make gcov invocation configurable
>  + t/README: Add a note about the dangers of coverage chasing
>  + t/README: A new section about test coverage
>  + Makefile: Add cover_db_html target
>  + Makefile: Add cover_db target
>  + Makefile: Split out the untested functions target
>  + Makefile: Include subdirectories in "make cover" reports
>  + gitignore: Ignore files generated by "make coverage"
>  + t/README: Add SMOKE_{COMMENT,TAGS}= to smoke_report target
>  + t/Makefile: Can't include GIT-BUILD-OPTIONS, it's a .sh
>  + t/README: Document the Smoke testing
>  + tests: Infrastructure for Git smoke testing
>  + test-lib: Multi-prereq support only checked the last prereq
>  + tests: A SANITY test prereq for testing if we're root
>  + t/README: Document the predefined test prerequisites
>  + test-lib: Print missing prerequisites in test output
>  + test-lib: Add support for multiple test prerequisites
>  + test-lib: Don't write test-results when HARNESS_ACTIVE
>  (this branch is used by ab/test-1.)
>
> Previously many individual topic branches from the same author, all
> regarding tests.  I thought it probably was ready for 'next' but was
> holding off as we seem to still keep getting many fixes on top.

Thanks for merging these.

> * ab/i18n (2010-07-25) 4 commits
>  - tests: locate i18n lib&data correctly under --valgrind
>  - gettext: setlocale(LC_CTYPE, "") breaks Git's C function assumptions
>  - tests: rename test to work around GNU gettext bug
>  - Add infrastructure for translating Git with gettext
>  (this branch is used by ab/test-1.)

mmm, i18n brewing :)

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

* Re: What's cooking in git.git (Aug 2010, #04; Wed, 18)
  2010-08-19 12:48     ` Ævar Arnfjörð Bjarmason
@ 2010-08-19 15:04       ` Ævar Arnfjörð Bjarmason
       [not found]       ` <AANLkTinkjsLycvV-uvfG14t7Q=uKt+pnpizKCPGirVW1@mail.gmail.com>
  1 sibling, 0 replies; 23+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-19 15:04 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: Jonathan Nieder, Junio C Hamano, git

On Thu, Aug 19, 2010 at 12:48, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
> On Thu, Aug 19, 2010 at 08:06, Johannes Sixt <j.sixt@viscovery.net> wrote:
>
>> and I see these warnings:
>>
>> In file included from compat/regex/regex.c:71:
>> compat/regex/regex_internal.c: In function 're_string_reconstruct':
>> compat/regex/regex_internal.c:696: warning: unused variable 'prev_valid_len'
>> In file included from compat/regex/regex.c:78:
>> compat/regex/regexec.c: In function 'check_arrival_add_next_nodes':
>> compat/regex/regexec.c:3062: warning: unused variable 'err'
>>
>> This happens because RE_ENABLE_I18N is not defined by regex_internal.h. Is
>> this how it is supposed to be?
>
> I noted these in <1282015548-19074-1-git-send-email-avarab@gmail.com>,
> although I was off by one.
>
> I haven't read all the relevant code, but we almost definitely do not
> want RE_ENABLE_I18N, since we aren't doing the relevant setlocale()
> things (and doing so breaks git, see the fix in the ab/i18n series in
> pu).
>
> I was going to report this upstream once I got around to finding out
> what upstream *is*, I don't *think* gawk itself is the canonical
> upstream, they just copy it from somewhere else (again, I *think*).

I sent a patch for this upstream.

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

* Re: What's cooking in git.git (Aug 2010, #04; Wed, 18)
  2010-08-19 12:53 ` What's cooking in git.git (Aug 2010, #04; Wed, 18) Ævar Arnfjörð Bjarmason
@ 2010-08-19 15:27   ` Ævar Arnfjörð Bjarmason
  0 siblings, 0 replies; 23+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-19 15:27 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Thu, Aug 19, 2010 at 12:53, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
> On Wed, Aug 18, 2010 at 22:27, Junio C Hamano <gitster@pobox.com> wrote:
>> Not merged to 'pu' as it seemed to have broken something.
>
> What does it seem to have broken? I can't fix it if I don't know
> what's wrong. It Works For Me.

Actually no. It's broken. I deployed the wrong series to my test boxes
before sending it. The breakage is ironically enough a runaway shell
quote.

I'll send a new series that fixes this shortly.

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

* Re: Fwd: What's cooking in git.git (Aug 2010, #04; Wed, 18)
       [not found]       ` <AANLkTinkjsLycvV-uvfG14t7Q=uKt+pnpizKCPGirVW1@mail.gmail.com>
@ 2010-08-19 18:05         ` Aharon Robbins
  2010-08-19 18:30           ` [PATCH] compat/regex: define out variables only used under RE_ENABLE_I18N Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 23+ messages in thread
From: Aharon Robbins @ 2010-08-19 18:05 UTC (permalink / raw)
  To: avarab; +Cc: git, gitster, jrnieder, j.sixt

Hi! Re this:

> Date: Thu, 19 Aug 2010 13:16:56 +0000
> Subject: Fwd: What's cooking in git.git (Aug 2010, #04; Wed, 18)
> From: ??var Arnfj??r?? Bjarmason <avarab@gmail.com>
> To: "Arnold D. Robbins" <arnold@skeeve.com>
>
> Hi there. The Git project grabbed the gawk regex engine to use as a
> compat engine in case the platform we're working on doesn't support
> REG_STARTEND. But because we don't compile it with RE_ENABLE_I18N
> it'll spew some warnings about unused variables (see below). Here's a
> patch to solve this:

Wow! It's really cool to be upstream for someone else. :-)

Thanks for the patch. I'll get it into my code base.

> I was going to report this upstream once I got around to finding out
> what upstream *is*, I don't *think* gawk itself is the canonical
> upstream, they just copy it from somewhere else (again, I *think*).

About every year or so, I sync from whatever is in GLIBC.  But my version
has a number of additional fixes that have not been accepted back into
the GLIBC version.

The only other possible candidate for an "upstream" source would be the
version in gnulib.

HTH,

Arnold

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

* [PATCH] compat/regex: define out variables only used under RE_ENABLE_I18N
  2010-08-19 18:05         ` Fwd: " Aharon Robbins
@ 2010-08-19 18:30           ` Ævar Arnfjörð Bjarmason
  2010-08-19 20:02             ` Junio C Hamano
  0 siblings, 1 reply; 23+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-19 18:30 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Aharon Robbins,
	Ævar Arnfjörð Bjarmason

Wrap variables that were only used RE_ENABLE_I18N in `#ifdef
RE_ENABLE_I18N`. This eliminates compiler warnings when compiling with
NO_REGEX=YesPlease.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---

On Thu, Aug 19, 2010 at 18:05, Aharon Robbins <arnold@skeeve.com> wrote:
> Hi! Re this:
>
>> Date: Thu, 19 Aug 2010 13:16:56 +0000
>> Subject: Fwd: What's cooking in git.git (Aug 2010, #04; Wed, 18)
>> From: ??var Arnfj??r?? Bjarmason <avarab@gmail.com>
>> To: "Arnold D. Robbins" <arnold@skeeve.com>
>>
>> Hi there. The Git project grabbed the gawk regex engine to use as a
>> compat engine in case the platform we're working on doesn't support
>> REG_STARTEND. But because we don't compile it with RE_ENABLE_I18N
>> it'll spew some warnings about unused variables (see below). Here's a
>> patch to solve this:
>
> Wow! It's really cool to be upstream for someone else. :-)

Cool that someone else is teasing useful code out of glibc so I don't
have to :)

> Thanks for the patch. I'll get it into my code base.

Junio, here's a version of this patch for our tree.

>> I was going to report this upstream once I got around to finding out
>> what upstream *is*, I don't *think* gawk itself is the canonical
>> upstream, they just copy it from somewhere else (again, I *think*).
>
> About every year or so, I sync from whatever is in GLIBC.  But my version
> has a number of additional fixes that have not been accepted back into
> the GLIBC version.
>
> The only other possible candidate for an "upstream" source would be the
> version in gnulib.

That's good to know. B.t.w. we have to compile with -DNO_MBSUPPORT
because regex_internal.h will pull in mbsupport.h if it's defined,
which is a GPLv3 header, the rest being LGPL 2.1.

I don't even know if we want mbsupport.h, but if it's possible to
relicense mbsupport.h to LGPL 2.1 it'd be easier for projects like Git
to pull in the gawk regex engine.

 compat/regex/regex_internal.c |    2 +-
 compat/regex/regexec.c        |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/compat/regex/regex_internal.c b/compat/regex/regex_internal.c
index dad17a8..193854c 100644
--- a/compat/regex/regex_internal.c
+++ b/compat/regex/regex_internal.c
@@ -692,10 +692,10 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags)
 	}
       else
 	{
+#ifdef RE_ENABLE_I18N
 	  /* No, skip all characters until IDX.  */
 	  int prev_valid_len = pstr->valid_len;
 
-#ifdef RE_ENABLE_I18N
 	  if (BE (pstr->offsets_needed, 0))
 	    {
 	      pstr->len = pstr->raw_len - idx + offset;
diff --git a/compat/regex/regexec.c b/compat/regex/regexec.c
index aee502d..0c2b054 100644
--- a/compat/regex/regexec.c
+++ b/compat/regex/regexec.c
@@ -3059,7 +3059,9 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, int str_idx,
   const re_dfa_t *const dfa = mctx->dfa;
   int result;
   int cur_idx;
+#ifdef RE_ENABLE_I18N
   reg_errcode_t err = REG_NOERROR;
+#endif
   re_node_set union_set;
   re_node_set_init_empty (&union_set);
   for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx)
-- 
1.7.2.1.446.g168052

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

* Re: [PATCH] compat/regex: define out variables only used under RE_ENABLE_I18N
  2010-08-19 18:30           ` [PATCH] compat/regex: define out variables only used under RE_ENABLE_I18N Ævar Arnfjörð Bjarmason
@ 2010-08-19 20:02             ` Junio C Hamano
  2010-08-19 20:31               ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 23+ messages in thread
From: Junio C Hamano @ 2010-08-19 20:02 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: git

Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:

> Wrap variables that were only used RE_ENABLE_I18N in `#ifdef
> RE_ENABLE_I18N`. This eliminates compiler warnings when compiling with
> NO_REGEX=YesPlease.
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>

Hmm, this unfortunately is not enough for me to compile it locally.

In file included from compat/regex/regex.c:77:
compat/regex/regcomp.c: In function 're_compile_pattern':
compat/regex/regcomp.c:237: error: old-style function definition
compat/regex/regcomp.c: In function 're_set_syntax':
compat/regex/regcomp.c:276: error: old-style function definition
compat/regex/regcomp.c: In function 're_compile_fastmap':
compat/regex/regcomp.c:289: error: old-style function definition
compat/regex/regcomp.c: In function 'regcomp':
compat/regex/regcomp.c:491: error: old-style function definition
compat/regex/regcomp.c: In function 'regfree':
compat/regex/regcomp.c:655: error: old-style function definition
In file included from compat/regex/regex.c:78:
compat/regex/regexec.c: In function 'regexec':
compat/regex/regexec.c:227: error: old-style function definition
compat/regex/regexec.c: In function 're_match':
compat/regex/regexec.c:311: error: old-style function definition
compat/regex/regexec.c: In function 're_search':
compat/regex/regexec.c:324: error: old-style function definition
compat/regex/regexec.c: In function 're_match_2':
compat/regex/regexec.c:337: error: old-style function definition
compat/regex/regexec.c: In function 're_search_2':
compat/regex/regexec.c:351: error: old-style function definition
compat/regex/regexec.c: In function 're_search_2_stub':
compat/regex/regexec.c:366: error: old-style function definition
compat/regex/regexec.c: In function 're_search_stub':
compat/regex/regexec.c:410: error: old-style function definition
compat/regex/regexec.c: In function 're_copy_regs':
compat/regex/regexec.c:497: error: old-style function definition
compat/regex/regexec.c: In function 're_set_registers':
compat/regex/regexec.c:578: error: old-style function definition
compat/regex/regexec.c: In function 're_search_internal':
compat/regex/regexec.c:631: error: old-style function definition
compat/regex/regexec.c: In function 'prune_impossible_nodes':
compat/regex/regexec.c:952: error: old-style function definition
make: *** [compat/regex/regex.o] Error 1

The fix should be straightforward, and I think it should be squashed with
the header ANSIfication you sent earlier.

Thanks.

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

* Re: [PATCH] compat/regex: define out variables only used under RE_ENABLE_I18N
  2010-08-19 20:02             ` Junio C Hamano
@ 2010-08-19 20:31               ` Ævar Arnfjörð Bjarmason
  2010-08-19 21:07                 ` Junio C Hamano
  0 siblings, 1 reply; 23+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-19 20:31 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Thu, Aug 19, 2010 at 20:02, Junio C Hamano <gitster@pobox.com> wrote:
> Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
>
>> Wrap variables that were only used RE_ENABLE_I18N in `#ifdef
>> RE_ENABLE_I18N`. This eliminates compiler warnings when compiling with
>> NO_REGEX=YesPlease.
>>
>> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
>
> Hmm, this unfortunately is not enough for me to compile it locally.
>
> In file included from compat/regex/regex.c:77:
> compat/regex/regcomp.c: In function 're_compile_pattern':
> compat/regex/regcomp.c:237: error: old-style function definition
> compat/regex/regcomp.c: In function 're_set_syntax':
> compat/regex/regcomp.c:276: error: old-style function definition
> compat/regex/regcomp.c: In function 're_compile_fastmap':
> compat/regex/regcomp.c:289: error: old-style function definition
> compat/regex/regcomp.c: In function 'regcomp':
> compat/regex/regcomp.c:491: error: old-style function definition
> compat/regex/regcomp.c: In function 'regfree':
> compat/regex/regcomp.c:655: error: old-style function definition
> In file included from compat/regex/regex.c:78:
> compat/regex/regexec.c: In function 'regexec':
> compat/regex/regexec.c:227: error: old-style function definition
> compat/regex/regexec.c: In function 're_match':
> compat/regex/regexec.c:311: error: old-style function definition
> compat/regex/regexec.c: In function 're_search':
> compat/regex/regexec.c:324: error: old-style function definition
> compat/regex/regexec.c: In function 're_match_2':
> compat/regex/regexec.c:337: error: old-style function definition
> compat/regex/regexec.c: In function 're_search_2':
> compat/regex/regexec.c:351: error: old-style function definition
> compat/regex/regexec.c: In function 're_search_2_stub':
> compat/regex/regexec.c:366: error: old-style function definition
> compat/regex/regexec.c: In function 're_search_stub':
> compat/regex/regexec.c:410: error: old-style function definition
> compat/regex/regexec.c: In function 're_copy_regs':
> compat/regex/regexec.c:497: error: old-style function definition
> compat/regex/regexec.c: In function 're_set_registers':
> compat/regex/regexec.c:578: error: old-style function definition
> compat/regex/regexec.c: In function 're_search_internal':
> compat/regex/regexec.c:631: error: old-style function definition
> compat/regex/regexec.c: In function 'prune_impossible_nodes':
> compat/regex/regexec.c:952: error: old-style function definition
> make: *** [compat/regex/regex.o] Error 1
>
> The fix should be straightforward, and I think it should be squashed with
> the header ANSIfication you sent earlier.

That's odd. The old regex library only used k&r style function
declerations *except* for regerror, and only then because a variable
name conflicted with a Windows typedef.

Could you compile the old compat/regex library on the same system?
What compiler/version/flags are these?

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

* Re: [PATCH] compat/regex: define out variables only used under RE_ENABLE_I18N
  2010-08-19 20:31               ` Ævar Arnfjörð Bjarmason
@ 2010-08-19 21:07                 ` Junio C Hamano
  2010-08-19 21:30                   ` Ævar Arnfjörð Bjarmason
  2010-08-19 22:45                   ` [PATCH] compat/regex: get rid of old-style definition Junio C Hamano
  0 siblings, 2 replies; 23+ messages in thread
From: Junio C Hamano @ 2010-08-19 21:07 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: Junio C Hamano, git

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

> Could you compile the old compat/regex library on the same system?

Did I ever say this was a regression?

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

* Re: [PATCH] compat/regex: define out variables only used under RE_ENABLE_I18N
  2010-08-19 21:07                 ` Junio C Hamano
@ 2010-08-19 21:30                   ` Ævar Arnfjörð Bjarmason
  2010-08-19 22:45                   ` [PATCH] compat/regex: get rid of old-style definition Junio C Hamano
  1 sibling, 0 replies; 23+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-19 21:30 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Thu, Aug 19, 2010 at 21:07, Junio C Hamano <gitster@pobox.com> wrote:
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
>> Could you compile the old compat/regex library on the same system?
>
> Did I ever say this was a regression?

No, you don't say much at all :)

But perhaps if we know the system / compiler / versions / flags
there's something we can do to make compat/regex more portable.

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

* [PATCH] compat/regex: get rid of old-style definition
  2010-08-19 21:07                 ` Junio C Hamano
  2010-08-19 21:30                   ` Ævar Arnfjörð Bjarmason
@ 2010-08-19 22:45                   ` Junio C Hamano
  2010-08-20  7:47                     ` Ævar Arnfjörð Bjarmason
  2010-08-25 18:24                     ` Karsten Blees
  1 sibling, 2 replies; 23+ messages in thread
From: Junio C Hamano @ 2010-08-19 22:45 UTC (permalink / raw)
  To: git; +Cc: Ævar Arnfjörð Bjarmason

These files mostly used ANSI style function definitions, but with small
number of old-style ones.  Convert them to consistently use ANSI style.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---

 * With this I can finish my semi-autobuild with the Meta/Make wrapper.
   For people who don't know, a checkout of the 'todo' branch lives in
   "Meta/" subdirectory in my local environments (not that I need the
   compatibility replacement in any of them, though...)

 compat/regex/regcomp.c |   23 ++++-------
 compat/regex/regexec.c |  101 ++++++++++++++++++++++--------------------------
 2 files changed, 55 insertions(+), 69 deletions(-)

diff --git a/compat/regex/regcomp.c b/compat/regex/regcomp.c
index 4a80056..8c96ed9 100644
--- a/compat/regex/regcomp.c
+++ b/compat/regex/regcomp.c
@@ -230,10 +230,9 @@ btowc (int c)
    are set in BUFP on entry.  */
 
 const char *
-re_compile_pattern (pattern, length, bufp)
-    const char *pattern;
-    size_t length;
-    struct re_pattern_buffer *bufp;
+re_compile_pattern (const char *pattern,
+		    size_t length,
+		    struct re_pattern_buffer *bufp)
 {
   reg_errcode_t ret;
 
@@ -271,8 +270,7 @@ reg_syntax_t re_syntax_options;
    defined in regex.h.  We return the old syntax.  */
 
 reg_syntax_t
-re_set_syntax (syntax)
-    reg_syntax_t syntax;
+re_set_syntax (reg_syntax_t syntax)
 {
   reg_syntax_t ret = re_syntax_options;
 
@@ -284,8 +282,7 @@ weak_alias (__re_set_syntax, re_set_syntax)
 #endif
 
 int
-re_compile_fastmap (bufp)
-    struct re_pattern_buffer *bufp;
+re_compile_fastmap (struct re_pattern_buffer *bufp)
 {
   re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
   char *fastmap = bufp->fastmap;
@@ -484,10 +481,9 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
    the return codes and their meanings.)  */
 
 int
-regcomp (preg, pattern, cflags)
-    regex_t *__restrict preg;
-    const char *__restrict pattern;
-    int cflags;
+regcomp (regex_t *__restrict preg,
+	 const char *__restrict pattern,
+	 int cflags)
 {
   reg_errcode_t ret;
   reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED
@@ -650,8 +646,7 @@ free_dfa_content (re_dfa_t *dfa)
 /* Free dynamically allocated space used by PREG.  */
 
 void
-regfree (preg)
-    regex_t *preg;
+regfree (regex_t *preg)
 {
   re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
   if (BE (dfa != NULL, 1))
diff --git a/compat/regex/regexec.c b/compat/regex/regexec.c
index 0c2b054..b49585a 100644
--- a/compat/regex/regexec.c
+++ b/compat/regex/regexec.c
@@ -218,12 +218,12 @@ static reg_errcode_t extend_buffers (re_match_context_t *mctx)
    We return 0 if we find a match and REG_NOMATCH if not.  */
 
 int
-regexec (preg, string, nmatch, pmatch, eflags)
-    const regex_t *__restrict preg;
-    const char *__restrict string;
-    size_t nmatch;
-    regmatch_t pmatch[];
-    int eflags;
+regexec (
+	const regex_t *__restrict preg,
+	const char *__restrict string,
+	size_t nmatch,
+	regmatch_t pmatch[],
+	int eflags)
 {
   reg_errcode_t err;
   int start, length;
@@ -303,11 +303,11 @@ compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0);
    match was found and -2 indicates an internal error.  */
 
 int
-re_match (bufp, string, length, start, regs)
-    struct re_pattern_buffer *bufp;
-    const char *string;
-    int length, start;
-    struct re_registers *regs;
+re_match (struct re_pattern_buffer *bufp,
+	  const char *string,
+	  int length,
+	  int start,
+	  struct re_registers *regs)
 {
   return re_search_stub (bufp, string, length, start, 0, length, regs, 1);
 }
@@ -316,11 +316,10 @@ weak_alias (__re_match, re_match)
 #endif
 
 int
-re_search (bufp, string, length, start, range, regs)
-    struct re_pattern_buffer *bufp;
-    const char *string;
-    int length, start, range;
-    struct re_registers *regs;
+re_search (struct re_pattern_buffer *bufp,
+	   const char *string,
+	   int length, int start, int range,
+	   struct re_registers *regs)
 {
   return re_search_stub (bufp, string, length, start, range, length, regs, 0);
 }
@@ -329,11 +328,10 @@ weak_alias (__re_search, re_search)
 #endif
 
 int
-re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop)
-    struct re_pattern_buffer *bufp;
-    const char *string1, *string2;
-    int length1, length2, start, stop;
-    struct re_registers *regs;
+re_match_2 (struct re_pattern_buffer *bufp,
+	    const char *string1, int length1,
+	    const char *string2, int length2, int start,
+	    struct re_registers *regs, int stop)
 {
   return re_search_2_stub (bufp, string1, length1, string2, length2,
 			   start, 0, regs, stop, 1);
@@ -343,11 +341,10 @@ weak_alias (__re_match_2, re_match_2)
 #endif
 
 int
-re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop)
-    struct re_pattern_buffer *bufp;
-    const char *string1, *string2;
-    int length1, length2, start, range, stop;
-    struct re_registers *regs;
+re_search_2 (struct re_pattern_buffer *bufp,
+	     const char *string1, int length1,
+	     const char *string2, int length2, int start,
+	     int range, struct re_registers *regs,  int stop)
 {
   return re_search_2_stub (bufp, string1, length1, string2, length2,
 			   start, range, regs, stop, 0);
@@ -357,12 +354,11 @@ weak_alias (__re_search_2, re_search_2)
 #endif
 
 static int
-re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs,
-		  stop, ret_len)
-    struct re_pattern_buffer *bufp;
-    const char *string1, *string2;
-    int length1, length2, start, range, stop, ret_len;
-    struct re_registers *regs;
+re_search_2_stub (struct re_pattern_buffer *bufp,
+		  const char *string1, int length1,
+		  const char *string2, int length2, int start,
+		  int range, struct re_registers *regs,
+		  int stop, int ret_len)
 {
   const char *str;
   int rval;
@@ -402,11 +398,10 @@ re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs,
    otherwise the position of the match is returned.  */
 
 static int
-re_search_stub (bufp, string, length, start, range, stop, regs, ret_len)
-    struct re_pattern_buffer *bufp;
-    const char *string;
-    int length, start, range, stop, ret_len;
-    struct re_registers *regs;
+re_search_stub (struct re_pattern_buffer *bufp,
+		const char *string, int length, int start,
+		int range, int stop,
+		struct re_registers *regs, int ret_len)
 {
   reg_errcode_t result;
   regmatch_t *pmatch;
@@ -490,10 +485,9 @@ re_search_stub (bufp, string, length, start, range, stop, regs, ret_len)
 }
 
 static unsigned
-re_copy_regs (regs, pmatch, nregs, regs_allocated)
-    struct re_registers *regs;
-    regmatch_t *pmatch;
-    int nregs, regs_allocated;
+re_copy_regs (struct re_registers *regs,
+	      regmatch_t *pmatch,
+	      int nregs, int regs_allocated)
 {
   int rval = REGS_REALLOCATE;
   int i;
@@ -570,11 +564,11 @@ re_copy_regs (regs, pmatch, nregs, regs_allocated)
    freeing the old data.  */
 
 void
-re_set_registers (bufp, regs, num_regs, starts, ends)
-    struct re_pattern_buffer *bufp;
-    struct re_registers *regs;
-    unsigned num_regs;
-    regoff_t *starts, *ends;
+re_set_registers (struct re_pattern_buffer *bufp,
+		  struct re_registers *regs,
+		  unsigned num_regs,
+		  regoff_t *starts,
+		  regoff_t *ends)
 {
   if (num_regs)
     {
@@ -621,13 +615,11 @@ re_exec (s)
    (START + RANGE >= 0 && START + RANGE <= LENGTH)  */
 
 static reg_errcode_t
-re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
-		    eflags)
-    const regex_t *preg;
-    const char *string;
-    int length, start, range, stop, eflags;
-    size_t nmatch;
-    regmatch_t pmatch[];
+re_search_internal (const regex_t *preg,
+		    const char *string,
+		    int length, int start, int range, int stop,
+		    size_t nmatch, regmatch_t pmatch[],
+		    int eflags)
 {
   reg_errcode_t err;
   const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer;
@@ -947,8 +939,7 @@ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
 }
 
 static reg_errcode_t
-prune_impossible_nodes (mctx)
-     re_match_context_t *mctx;
+prune_impossible_nodes (re_match_context_t *mctx)
 {
   const re_dfa_t *const dfa = mctx->dfa;
   int halt_node, match_last;
-- 
1.7.2.1.364.gf88bdb

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

* Re: [PATCH] compat/regex: get rid of old-style definition
  2010-08-19 22:45                   ` [PATCH] compat/regex: get rid of old-style definition Junio C Hamano
@ 2010-08-20  7:47                     ` Ævar Arnfjörð Bjarmason
  2010-08-25 18:24                     ` Karsten Blees
  1 sibling, 0 replies; 23+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-20  7:47 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Aharon Robbins

On Thu, Aug 19, 2010 at 22:45, Junio C Hamano <gitster@pobox.com> wrote:
> These files mostly used ANSI style function definitions, but with small
> number of old-style ones.  Convert them to consistently use ANSI style.

CC-ing Aharon Robbins, perhaps this is something upstream gawk/glibc
is willing to change.

> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
>
>  * With this I can finish my semi-autobuild with the Meta/Make wrapper.
>   For people who don't know, a checkout of the 'todo' branch lives in
>   "Meta/" subdirectory in my local environments (not that I need the
>   compatibility replacement in any of them, though...)

It fails for your Make script because you define
-Wold-style-definition and -Werror?


>  compat/regex/regcomp.c |   23 ++++-------
>  compat/regex/regexec.c |  101 ++++++++++++++++++++++--------------------------
>  2 files changed, 55 insertions(+), 69 deletions(-)
>
> diff --git a/compat/regex/regcomp.c b/compat/regex/regcomp.c
> index 4a80056..8c96ed9 100644
> --- a/compat/regex/regcomp.c
> +++ b/compat/regex/regcomp.c
> @@ -230,10 +230,9 @@ btowc (int c)
>    are set in BUFP on entry.  */
>
>  const char *
> -re_compile_pattern (pattern, length, bufp)
> -    const char *pattern;
> -    size_t length;
> -    struct re_pattern_buffer *bufp;
> +re_compile_pattern (const char *pattern,
> +                   size_t length,
> +                   struct re_pattern_buffer *bufp)
>  {
>   reg_errcode_t ret;
>
> @@ -271,8 +270,7 @@ reg_syntax_t re_syntax_options;
>    defined in regex.h.  We return the old syntax.  */
>
>  reg_syntax_t
> -re_set_syntax (syntax)
> -    reg_syntax_t syntax;
> +re_set_syntax (reg_syntax_t syntax)
>  {
>   reg_syntax_t ret = re_syntax_options;
>
> @@ -284,8 +282,7 @@ weak_alias (__re_set_syntax, re_set_syntax)
>  #endif
>
>  int
> -re_compile_fastmap (bufp)
> -    struct re_pattern_buffer *bufp;
> +re_compile_fastmap (struct re_pattern_buffer *bufp)
>  {
>   re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
>   char *fastmap = bufp->fastmap;
> @@ -484,10 +481,9 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
>    the return codes and their meanings.)  */
>
>  int
> -regcomp (preg, pattern, cflags)
> -    regex_t *__restrict preg;
> -    const char *__restrict pattern;
> -    int cflags;
> +regcomp (regex_t *__restrict preg,
> +        const char *__restrict pattern,
> +        int cflags)
>  {
>   reg_errcode_t ret;
>   reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED
> @@ -650,8 +646,7 @@ free_dfa_content (re_dfa_t *dfa)
>  /* Free dynamically allocated space used by PREG.  */
>
>  void
> -regfree (preg)
> -    regex_t *preg;
> +regfree (regex_t *preg)
>  {
>   re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
>   if (BE (dfa != NULL, 1))
> diff --git a/compat/regex/regexec.c b/compat/regex/regexec.c
> index 0c2b054..b49585a 100644
> --- a/compat/regex/regexec.c
> +++ b/compat/regex/regexec.c
> @@ -218,12 +218,12 @@ static reg_errcode_t extend_buffers (re_match_context_t *mctx)
>    We return 0 if we find a match and REG_NOMATCH if not.  */
>
>  int
> -regexec (preg, string, nmatch, pmatch, eflags)
> -    const regex_t *__restrict preg;
> -    const char *__restrict string;
> -    size_t nmatch;
> -    regmatch_t pmatch[];
> -    int eflags;
> +regexec (
> +       const regex_t *__restrict preg,
> +       const char *__restrict string,
> +       size_t nmatch,
> +       regmatch_t pmatch[],
> +       int eflags)
>  {
>   reg_errcode_t err;
>   int start, length;
> @@ -303,11 +303,11 @@ compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0);
>    match was found and -2 indicates an internal error.  */
>
>  int
> -re_match (bufp, string, length, start, regs)
> -    struct re_pattern_buffer *bufp;
> -    const char *string;
> -    int length, start;
> -    struct re_registers *regs;
> +re_match (struct re_pattern_buffer *bufp,
> +         const char *string,
> +         int length,
> +         int start,
> +         struct re_registers *regs)
>  {
>   return re_search_stub (bufp, string, length, start, 0, length, regs, 1);
>  }
> @@ -316,11 +316,10 @@ weak_alias (__re_match, re_match)
>  #endif
>
>  int
> -re_search (bufp, string, length, start, range, regs)
> -    struct re_pattern_buffer *bufp;
> -    const char *string;
> -    int length, start, range;
> -    struct re_registers *regs;
> +re_search (struct re_pattern_buffer *bufp,
> +          const char *string,
> +          int length, int start, int range,
> +          struct re_registers *regs)
>  {
>   return re_search_stub (bufp, string, length, start, range, length, regs, 0);
>  }
> @@ -329,11 +328,10 @@ weak_alias (__re_search, re_search)
>  #endif
>
>  int
> -re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop)
> -    struct re_pattern_buffer *bufp;
> -    const char *string1, *string2;
> -    int length1, length2, start, stop;
> -    struct re_registers *regs;
> +re_match_2 (struct re_pattern_buffer *bufp,
> +           const char *string1, int length1,
> +           const char *string2, int length2, int start,
> +           struct re_registers *regs, int stop)
>  {
>   return re_search_2_stub (bufp, string1, length1, string2, length2,
>                           start, 0, regs, stop, 1);
> @@ -343,11 +341,10 @@ weak_alias (__re_match_2, re_match_2)
>  #endif
>
>  int
> -re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop)
> -    struct re_pattern_buffer *bufp;
> -    const char *string1, *string2;
> -    int length1, length2, start, range, stop;
> -    struct re_registers *regs;
> +re_search_2 (struct re_pattern_buffer *bufp,
> +            const char *string1, int length1,
> +            const char *string2, int length2, int start,
> +            int range, struct re_registers *regs,  int stop)
>  {
>   return re_search_2_stub (bufp, string1, length1, string2, length2,
>                           start, range, regs, stop, 0);
> @@ -357,12 +354,11 @@ weak_alias (__re_search_2, re_search_2)
>  #endif
>
>  static int
> -re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs,
> -                 stop, ret_len)
> -    struct re_pattern_buffer *bufp;
> -    const char *string1, *string2;
> -    int length1, length2, start, range, stop, ret_len;
> -    struct re_registers *regs;
> +re_search_2_stub (struct re_pattern_buffer *bufp,
> +                 const char *string1, int length1,
> +                 const char *string2, int length2, int start,
> +                 int range, struct re_registers *regs,
> +                 int stop, int ret_len)
>  {
>   const char *str;
>   int rval;
> @@ -402,11 +398,10 @@ re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs,
>    otherwise the position of the match is returned.  */
>
>  static int
> -re_search_stub (bufp, string, length, start, range, stop, regs, ret_len)
> -    struct re_pattern_buffer *bufp;
> -    const char *string;
> -    int length, start, range, stop, ret_len;
> -    struct re_registers *regs;
> +re_search_stub (struct re_pattern_buffer *bufp,
> +               const char *string, int length, int start,
> +               int range, int stop,
> +               struct re_registers *regs, int ret_len)
>  {
>   reg_errcode_t result;
>   regmatch_t *pmatch;
> @@ -490,10 +485,9 @@ re_search_stub (bufp, string, length, start, range, stop, regs, ret_len)
>  }
>
>  static unsigned
> -re_copy_regs (regs, pmatch, nregs, regs_allocated)
> -    struct re_registers *regs;
> -    regmatch_t *pmatch;
> -    int nregs, regs_allocated;
> +re_copy_regs (struct re_registers *regs,
> +             regmatch_t *pmatch,
> +             int nregs, int regs_allocated)
>  {
>   int rval = REGS_REALLOCATE;
>   int i;
> @@ -570,11 +564,11 @@ re_copy_regs (regs, pmatch, nregs, regs_allocated)
>    freeing the old data.  */
>
>  void
> -re_set_registers (bufp, regs, num_regs, starts, ends)
> -    struct re_pattern_buffer *bufp;
> -    struct re_registers *regs;
> -    unsigned num_regs;
> -    regoff_t *starts, *ends;
> +re_set_registers (struct re_pattern_buffer *bufp,
> +                 struct re_registers *regs,
> +                 unsigned num_regs,
> +                 regoff_t *starts,
> +                 regoff_t *ends)
>  {
>   if (num_regs)
>     {
> @@ -621,13 +615,11 @@ re_exec (s)
>    (START + RANGE >= 0 && START + RANGE <= LENGTH)  */
>
>  static reg_errcode_t
> -re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
> -                   eflags)
> -    const regex_t *preg;
> -    const char *string;
> -    int length, start, range, stop, eflags;
> -    size_t nmatch;
> -    regmatch_t pmatch[];
> +re_search_internal (const regex_t *preg,
> +                   const char *string,
> +                   int length, int start, int range, int stop,
> +                   size_t nmatch, regmatch_t pmatch[],
> +                   int eflags)
>  {
>   reg_errcode_t err;
>   const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer;
> @@ -947,8 +939,7 @@ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
>  }
>
>  static reg_errcode_t
> -prune_impossible_nodes (mctx)
> -     re_match_context_t *mctx;
> +prune_impossible_nodes (re_match_context_t *mctx)
>  {
>   const re_dfa_t *const dfa = mctx->dfa;
>   int halt_node, match_last;
> --
> 1.7.2.1.364.gf88bdb
>

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

* Re: [PATCH] compat/regex: get rid of old-style definition
  2010-08-19 22:45                   ` [PATCH] compat/regex: get rid of old-style definition Junio C Hamano
  2010-08-20  7:47                     ` Ævar Arnfjörð Bjarmason
@ 2010-08-25 18:24                     ` Karsten Blees
  2010-08-26  7:58                       ` [PATCH] Fix compat/regex ANSIfication on MinGW Johannes Sixt
  1 sibling, 1 reply; 23+ messages in thread
From: Karsten Blees @ 2010-08-25 18:24 UTC (permalink / raw)
  To: git

Hi,

this doesn't compile if internal_function is #defined non-empty (e.g. on
mingw/msysgit). The old-style definitions work.

Ciao,
Karsten

In file included from compat/regex/regex.c:78:
compat/regex/regexec.c:357: error: conflicting types for 're_search_2_stub'
compat/regex/regexec.c:44: note: previous declaration of 're_search_2_stub' was
here
compat/regex/regexec.c:401: error: conflicting types for 're_search_stub'
compat/regex/regexec.c:49: note: previous declaration of 're_search_stub' was
here
compat/regex/regexec.c:488: error: conflicting types for 're_copy_regs'
compat/regex/regexec.c:53: note: previous declaration of 're_copy_regs' was
here
compat/regex/regexec.c:618: error: conflicting types for 're_search_internal'
compat/regex/regexec.c:39: note: previous declaration of 're_search_internal'
was here
compat/regex/regexec.c:942: error: conflicting types for
'prune_impossible_nodes'
compat/regex/regexec.c:55: note: previous declaration of
'prune_impossible_nodes' was here
make: *** [compat/regex/regex.o] Error 1

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

* [PATCH] Fix compat/regex ANSIfication on MinGW
  2010-08-25 18:24                     ` Karsten Blees
@ 2010-08-26  7:58                       ` Johannes Sixt
  2010-08-26 20:34                         ` Ævar Arnfjörð Bjarmason
  2010-09-03 21:23                         ` karsten.blees
  0 siblings, 2 replies; 23+ messages in thread
From: Johannes Sixt @ 2010-08-26  7:58 UTC (permalink / raw)
  To: Karsten Blees; +Cc: git, Junio C Hamano, Ævar Arnfjörð Bjarmason

From: Johannes Sixt <j6t@kdbg.org>

compat/regexec.c had a weird combination of function declaration in ANSI
style and function definition in K&R style, for example:

 static unsigned
 re_copy_regs (struct re_registers *regs, regmatch_t *pmatch,
      int nregs, int regs_allocated) internal_function;

 static unsigned
 re_copy_regs (regs, pmatch, nregs, regs_allocated)
     struct re_registers *regs;
     regmatch_t *pmatch;
     int nregs, regs_allocated;
 { ... }

with this #define:

 #ifndef _LIBC
 # ifdef __i386__
 #  define internal_function   __attribute ((regparm (3), stdcall))
 # else
 #  define internal_function
 # endif
 #endif

The original version as shown above was fine, but with the ANSIfied
function definition and in the case where internal_function is not empty,
gcc identifies the declaration and definition as different and bails out.

Adding internal_function to the definition doesn't help (it results in
a syntax error); hence, remove it from the subset of declarations that gcc
flags as erroneous.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
Am 8/25/2010 20:24, schrieb Karsten Blees:
> this doesn't compile if internal_function is #defined non-empty (e.g. on
> mingw/msysgit). The old-style definitions work.
> 
> In file included from compat/regex/regex.c:78:
> compat/regex/regexec.c:357: error: conflicting types for 're_search_2_stub'
> compat/regex/regexec.c:44: note: previous declaration of 're_search_2_stub' was
> here

Here's a fix.

 compat/regex/regexec.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/compat/regex/regexec.c b/compat/regex/regexec.c
index b49585a..0194965 100644
--- a/compat/regex/regexec.c
+++ b/compat/regex/regexec.c
@@ -40,20 +40,19 @@ static reg_errcode_t re_search_internal (const regex_t *preg,
 					 const char *string, int length,
 					 int start, int range, int stop,
 					 size_t nmatch, regmatch_t pmatch[],
-					 int eflags) internal_function;
+					 int eflags);
 static int re_search_2_stub (struct re_pattern_buffer *bufp,
 			     const char *string1, int length1,
 			     const char *string2, int length2,
 			     int start, int range, struct re_registers *regs,
-			     int stop, int ret_len) internal_function;
+			     int stop, int ret_len);
 static int re_search_stub (struct re_pattern_buffer *bufp,
 			   const char *string, int length, int start,
 			   int range, int stop, struct re_registers *regs,
-			   int ret_len) internal_function;
+			   int ret_len);
 static unsigned re_copy_regs (struct re_registers *regs, regmatch_t *pmatch,
-			      int nregs, int regs_allocated) internal_function;
-static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx)
-     internal_function;
+			      int nregs, int regs_allocated);
+static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx);
 static int check_matching (re_match_context_t *mctx, int fl_longest_match,
 			   int *p_match_first) internal_function;
 static int check_halt_state_context (const re_match_context_t *mctx,
-- 
1.7.2.2.1305.g4e2a

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

* Re: [PATCH] Fix compat/regex ANSIfication on MinGW
  2010-08-26  7:58                       ` [PATCH] Fix compat/regex ANSIfication on MinGW Johannes Sixt
@ 2010-08-26 20:34                         ` Ævar Arnfjörð Bjarmason
  2010-09-03 21:23                         ` karsten.blees
  1 sibling, 0 replies; 23+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-26 20:34 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: Karsten Blees, git, Junio C Hamano

On Thu, Aug 26, 2010 at 07:58, Johannes Sixt <j.sixt@viscovery.net> wrote:
> Here's a fix.

This looks good. But it would be great if we could keep upstream (gawk
& glibc) in the loop here.

When I added the gawk compat regex engine we had 2 diverging lines
from upstream, now we have a lot more. Not having to manually merge
these when we update the engine again sometime in the future would be
preferrable.

I'm not internet connected enough at the moment to track down the
right people to add to the CC list here.

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

* Re: [PATCH] Fix compat/regex ANSIfication on MinGW
  2010-08-26  7:58                       ` [PATCH] Fix compat/regex ANSIfication on MinGW Johannes Sixt
  2010-08-26 20:34                         ` Ævar Arnfjörð Bjarmason
@ 2010-09-03 21:23                         ` karsten.blees
  2010-09-03 22:21                           ` Ævar Arnfjörð Bjarmason
  2010-09-07 12:56                           ` Johannes Sixt
  1 sibling, 2 replies; 23+ messages in thread
From: karsten.blees @ 2010-09-03 21:23 UTC (permalink / raw)
  To: Johannes Sixt
  Cc: Ævar Arnfjörð Bjarmason, git, Junio C Hamano,
	msysgit, johannes.schindelin

[-- Attachment #1: Type: text/plain, Size: 1271 bytes --]

Johannes Sixt <j.sixt@viscovery.net> wrote on 26.08.2010 09:58:26:
> Am 8/25/2010 20:24, schrieb Karsten Blees:
> > this doesn't compile if internal_function is #defined non-empty (e.g. 
on
> > mingw/msysgit). The old-style definitions work.
> > 
> > In file included from compat/regex/regex.c:78:
> > compat/regex/regexec.c:357: error: conflicting types for 
're_search_2_stub'
> > compat/regex/regexec.c:44: note: previous declaration of 
> 're_search_2_stub' was
> > here
> 
> Here's a fix.
> 

Sorry, I realize I should've cross-posted this to the msysgit list (adding 
cc).

In the meantime, Dscho has fixed the function definitions in the msysgit 
fork like so:
static int internal_function
re_search_2_stub (struct re_pattern_buffer *bufp,...

Your patch removes internal_function from the declaration, so now it 
doesn't compile again...

There're basically three solutions:
1. revert the whole ANSIfication stuff (stay in sync with glibc upstream)
2. add internal_function before function definition (like everywhere else 
in regexec.c - efe33c61 in git://repo.or.cz/git/mingw/4msysgit.git)
3. remove internal_function from declaration (ce518bbd)

As I don't think you plan active development on this (or push changes 
upstream?), I'd opt for (1).

Bye,
Karsten

[-- Attachment #2: Type: text/html, Size: 1833 bytes --]

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

* Re: [PATCH] Fix compat/regex ANSIfication on MinGW
  2010-09-03 21:23                         ` karsten.blees
@ 2010-09-03 22:21                           ` Ævar Arnfjörð Bjarmason
  2010-09-04  5:22                             ` Junio C Hamano
  2010-09-07 12:56                           ` Johannes Sixt
  1 sibling, 1 reply; 23+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-03 22:21 UTC (permalink / raw)
  To: karsten.blees
  Cc: Johannes Sixt, git, Junio C Hamano, msysgit, johannes.schindelin

On Fri, Sep 3, 2010 at 21:23,  <karsten.blees@dcon.de> wrote:
>
> Johannes Sixt <j.sixt@viscovery.net> wrote on 26.08.2010 09:58:26:
>> Am 8/25/2010 20:24, schrieb Karsten Blees:
>> > this doesn't compile if internal_function is #defined non-empty (e.g. on
>> > mingw/msysgit). The old-style definitions work.
>> >
>> > In file included from compat/regex/regex.c:78:
>> > compat/regex/regexec.c:357: error: conflicting types for
>> > 're_search_2_stub'
>> > compat/regex/regexec.c:44: note: previous declaration of
>> 're_search_2_stub' was
>> > here
>>
>> Here's a fix.
>>
>
> Sorry, I realize I should've cross-posted this to the msysgit list (adding
> cc).
>
> In the meantime, Dscho has fixed the function definitions in the msysgit
> fork like so:
> static int internal_function
> re_search_2_stub (struct re_pattern_buffer *bufp,...
>
> Your patch removes internal_function from the declaration, so now it doesn't
> compile again...
>
> There're basically three solutions:
> 1. revert the whole ANSIfication stuff (stay in sync with glibc upstream)
> 2. add internal_function before function definition (like everywhere else in
> regexec.c - efe33c61 in git://repo.or.cz/git/mingw/4msysgit.git)
> 3. remove internal_function from declaration (ce518bbd)
>
> As I don't think you plan active development on this (or push changes
> upstream?), I'd opt for (1).

Yeah, wasn't the only reason they were ANSI-fied because Junio had
some script in the todo branch that explicitly used -Werror in
conjunction with a warning for k&r declerations/

I've forgotten what all these fixes to compat/regex were about, but if
that's the case 1) looks simplest.

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

* Re: [PATCH] Fix compat/regex ANSIfication on MinGW
  2010-09-03 22:21                           ` Ævar Arnfjörð Bjarmason
@ 2010-09-04  5:22                             ` Junio C Hamano
  0 siblings, 0 replies; 23+ messages in thread
From: Junio C Hamano @ 2010-09-04  5:22 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason
  Cc: karsten.blees, Johannes Sixt, git, msysgit, johannes.schindelin

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

> Yeah, wasn't the only reason they were ANSI-fied because Junio had
> some script in the todo branch that explicitly used -Werror in
> conjunction with a warning for k&r declerations/

As a matter of principle, I'd really want my compilation to pass without
any warning, so -Werror is likely to stay.

Having said that, the codepath in question is not something I'd be
compiling myself very often, so I am not in a good position to vetting and
maintaining the particular ANSIification patch.  Personally I think the
change to move "internal_function" to the front (which Karsten mentioned
is consistent with the way how the same issue is handled elsewhere in
msysgit port) would be cleaner than the change to remove it.

I'd ask folks involved in Windows port to decide.  Sorry for the trouble.

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

* Re: Re: [PATCH] Fix compat/regex ANSIfication on MinGW
  2010-09-03 21:23                         ` karsten.blees
  2010-09-03 22:21                           ` Ævar Arnfjörð Bjarmason
@ 2010-09-07 12:56                           ` Johannes Sixt
  1 sibling, 0 replies; 23+ messages in thread
From: Johannes Sixt @ 2010-09-07 12:56 UTC (permalink / raw)
  To: karsten.blees
  Cc: msysgit, Ævar Arnfjörð Bjarmason, git,
	Junio C Hamano, johannes.schindelin

On Freitag, 3. September 2010, karsten.blees@dcon.de wrote:
> Johannes Sixt <j.sixt@viscovery.net> wrote on 26.08.2010 09:58:26:
> > Am 8/25/2010 20:24, schrieb Karsten Blees:
> > > this doesn't compile if internal_function is #defined non-empty (e.g.
>
> on
>
> > > mingw/msysgit). The old-style definitions work.
> > >
> > > In file included from compat/regex/regex.c:78:
> > > compat/regex/regexec.c:357: error: conflicting types for
>
> 're_search_2_stub'
>
> > > compat/regex/regexec.c:44: note: previous declaration of
> >
> > 're_search_2_stub' was
> >
> > > here
> >
> > Here's a fix.
>
> Sorry, I realize I should've cross-posted this to the msysgit list (adding
> cc).
>
> In the meantime, Dscho has fixed the function definitions in the msysgit
> fork like so:
> static int internal_function
> re_search_2_stub (struct re_pattern_buffer *bufp,...
>
> Your patch removes internal_function from the declaration, so now it
> doesn't compile again...

Sorry for the complication. Please feel free to submit a patch that implements 
the conclusion of this discussion. I don't mind how the problem is solved 
(but I do agree that moving "internal_funcion" to the front would be 
cleanest - now that I got to know that this is a possible solution :-).

-- Hannes

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

end of thread, other threads:[~2010-09-07 12:57 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-18 22:27 What's cooking in git.git (Aug 2010, #04; Wed, 18) Junio C Hamano
2010-08-19  3:02 ` Jonathan Nieder
2010-08-19  8:06   ` Johannes Sixt
2010-08-19 12:48     ` Ævar Arnfjörð Bjarmason
2010-08-19 15:04       ` Ævar Arnfjörð Bjarmason
     [not found]       ` <AANLkTinkjsLycvV-uvfG14t7Q=uKt+pnpizKCPGirVW1@mail.gmail.com>
2010-08-19 18:05         ` Fwd: " Aharon Robbins
2010-08-19 18:30           ` [PATCH] compat/regex: define out variables only used under RE_ENABLE_I18N Ævar Arnfjörð Bjarmason
2010-08-19 20:02             ` Junio C Hamano
2010-08-19 20:31               ` Ævar Arnfjörð Bjarmason
2010-08-19 21:07                 ` Junio C Hamano
2010-08-19 21:30                   ` Ævar Arnfjörð Bjarmason
2010-08-19 22:45                   ` [PATCH] compat/regex: get rid of old-style definition Junio C Hamano
2010-08-20  7:47                     ` Ævar Arnfjörð Bjarmason
2010-08-25 18:24                     ` Karsten Blees
2010-08-26  7:58                       ` [PATCH] Fix compat/regex ANSIfication on MinGW Johannes Sixt
2010-08-26 20:34                         ` Ævar Arnfjörð Bjarmason
2010-09-03 21:23                         ` karsten.blees
2010-09-03 22:21                           ` Ævar Arnfjörð Bjarmason
2010-09-04  5:22                             ` Junio C Hamano
2010-09-07 12:56                           ` Johannes Sixt
2010-08-19  3:22 ` jn/update-contrib-example-merge in pu Jonathan Nieder
2010-08-19 12:53 ` What's cooking in git.git (Aug 2010, #04; Wed, 18) Ævar Arnfjörð Bjarmason
2010-08-19 15:27   ` Ævar Arnfjörð Bjarmason

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).