All of lore.kernel.org
 help / color / mirror / Atom feed
* What's cooking in git.git (Oct 2016, #09; Mon, 31)
@ 2016-10-31 21:49 Junio C Hamano
  2016-11-02  7:16 ` Torsten Bögershausen
                   ` (4 more replies)
  0 siblings, 5 replies; 30+ messages in thread
From: Junio C Hamano @ 2016-10-31 21:49 UTC (permalink / raw)
  To: git

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 ones marked with '.' do not appear in any of
the integration branches, but I am still holding onto them.

Git v2.10.2, the second maintenance release for 2.10.x track, has
been tagged.  On the master front, an early preview v2.11.0-rc0 has
been tagged.  An updated, slightly slipped from the original,
schedule is found at http://tinyurl.com/gitCal and I am hoping that
we can conclude this cycle before US Thanksgiving.

You can find the changes described here in the integration branches
of the repositories listed at

    http://git-blame.blogspot.com/p/git-public-repositories.html

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

* ak/pre-receive-hook-template-modefix (2016-10-28) 1 commit
  (merged to 'next' on 2016-10-28 at 86d95836a3)
 + pre-receive.sample: mark it executable

 A trivial clean-up to a recently graduated topic.


* ak/sh-setup-dot-source-i18n-fix (2016-10-30) 1 commit
  (merged to 'next' on 2016-10-31 at 538a72700e)
 + git-sh-setup: be explicit where to dot-source git-sh-i18n from.

 Recent update to git-sh-setup (a library of shell functions that
 are used by our in-tree scripted Porcelain commands) included
 another shell library git-sh-i18n without specifying where it is,
 relying on the $PATH.  This has been fixed to be more explicit by
 prefixing $(git --exec-path) output in front.


* aw/numbered-stash (2016-10-26) 1 commit
  (merged to 'next' on 2016-10-26 at 8d9325fa3a)
 + stash: allow stashes to be referenced by index only

 The user always has to say "stash@{$N}" when naming a single
 element in the default location of the stash, i.e. reflogs in
 refs/stash.  The "git stash" command learned to accept "git stash
 apply 4" as a short-hand for "git stash apply stash@{4}".


* jk/common-main (2016-10-27) 1 commit
  (merged to 'next' on 2016-10-28 at fcdd4f8a26)
 + git-compat-util: move content inside ifdef/endif guards

 A trivial clean-up to a recently graduated topic.


* jk/rebase-config-insn-fmt-docfix (2016-10-30) 1 commit
  (merged to 'next' on 2016-10-31 at d48e20ffa2)
 + doc: fix missing "::" in config list

 Documentation fix.


* jt/trailer-with-cruft (2016-10-21) 8 commits
  (merged to 'next' on 2016-10-27 at b5d1a21811)
 + trailer: support values folded to multiple lines
 + trailer: forbid leading whitespace in trailers
 + trailer: allow non-trailers in trailer block
 + trailer: clarify failure modes in parse_trailer
 + trailer: make args have their own struct
 + trailer: streamline trailer item create and add
 + trailer: use list.h for doubly-linked list
 + trailer: improve const correctness
 (this branch is used by jt/use-trailer-api-in-commands.)

 Update "interpret-trailers" machinery and teaches it that people in
 real world write all sorts of crufts in the "trailer" that was
 originally designed to have the neat-o "Mail-Header: like thing"
 and nothing else.


* ls/filter-process (2016-10-17) 14 commits
  (merged to 'next' on 2016-10-19 at ffd0de042c)
 + contrib/long-running-filter: add long running filter example
 + convert: add filter.<driver>.process option
 + convert: prepare filter.<driver>.process option
 + convert: make apply_filter() adhere to standard Git error handling
 + pkt-line: add functions to read/write flush terminated packet streams
 + pkt-line: add packet_write_gently()
 + pkt-line: add packet_flush_gently()
 + pkt-line: add packet_write_fmt_gently()
 + pkt-line: extract set_packet_header()
 + pkt-line: rename packet_write() to packet_write_fmt()
 + run-command: add clean_on_exit_handler
 + run-command: move check_pipe() from write_or_die to run_command
 + convert: modernize tests
 + convert: quote filter names in error messages

 The smudge/clean filter API expect an external process is spawned
 to filter the contents for each path that has a filter defined.  A
 new type of "process" filter API has been added to allow the first
 request to run the filter for a path to spawn a single process, and
 all filtering need is served by this single process for multiple
 paths, reducing the process creation overhead.


* ls/git-open-cloexec (2016-10-25) 3 commits
  (merged to 'next' on 2016-10-26 at f7259cbddb)
 + read-cache: make sure file handles are not inherited by child processes
 + sha1_file: open window into packfiles with O_CLOEXEC
 + sha1_file: rename git_open_noatime() to git_open()
 (this branch is used by jc/git-open-cloexec.)

 Git generally does not explicitly close file descriptors that were
 open in the parent process when spawning a child process, but most
 of the time the child does not want to access them. As Windows does
 not allow removing or renaming a file that has a file descriptor
 open, a slow-to-exit child can even break the parent process by
 holding onto them.  Use O_CLOEXEC flag to open files in various
 codepaths.


* nd/test-helpers (2016-10-27) 1 commit
  (merged to 'next' on 2016-10-31 at 9780fe6d90)
 + valgrind: support test helpers

 Update to the test framework made in 2.9 timeframe broke running
 the tests under valgrind, which has been fixed.


* rs/commit-pptr-simplify (2016-10-30) 1 commit
  (merged to 'next' on 2016-10-31 at ddeed2e66a)
 + commit: simplify building parents list

 Code simplification.


* sc/fmt-merge-msg-doc-markup-fix (2016-10-28) 1 commit
  (merged to 'next' on 2016-10-31 at 198c259bb2)
 + Documentation/fmt-merge-msg: fix markup in example

 Documentation fix.

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

* jc/push-default-explicit (2016-10-28) 1 commit
 - push: do not use potentially ambiguous default refspec

 A lazy "git push" without refspec did not internally use a fully
 specified refspec to perform 'current', 'simple', or 'upstream'
 push, causing unnecessary "ambiguous ref" errors.

 Needs updates to the tests.


* jt/use-trailer-api-in-commands (2016-10-28) 4 commits
 - sequencer: use trailer's trailer layout
 - trailer: have function to describe trailer layout
 - trailer: avoid unnecessary splitting on lines
 - commit: make ignore_non_trailer take buf/len

 Commands that operate on a log message and add lines to the trailer
 blocks, such as "format-patch -s", "cherry-pick (-x|-s)", and
 "commit -s", have been taught to use the logic of and share the
 code with "git interpret-trailer".

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

* hv/submodule-not-yet-pushed-fix (2016-10-10) 3 commits
 - batch check whether submodule needs pushing into one call
 - serialize collection of refs that contain submodule changes
 - serialize collection of changed submodules

 The code in "git push" to compute if any commit being pushed in the
 superproject binds a commit in a submodule that hasn't been pushed
 out was overly inefficient, making it unusable even for a small
 project that does not have any submodule but have a reasonable
 number of refs.

 Waiting for review.
 cf. <cover.1475851621.git.hvoigt@hvoigt.net>


* sb/push-make-submodule-check-the-default (2016-10-10) 2 commits
 - push: change submodule default to check when submodules exist
 - submodule add: extend force flag to add existing repos

 Turn the default of "push.recurseSubmodules" to "check" when
 submodules seem to be in use.

 Will hold to wait for hv/submodule-not-yet-pushed-fix


* jc/bundle (2016-03-03) 6 commits
 - index-pack: --clone-bundle option
 - Merge branch 'jc/index-pack' into jc/bundle
 - bundle v3: the beginning
 - bundle: keep a copy of bundle file name in the in-core bundle header
 - bundle: plug resource leak
 - bundle doc: 'verify' is not about verifying the bundle

 The beginning of "split bundle", which could be one of the
 ingredients to allow "git clone" traffic off of the core server
 network to CDN.

 While I think it would make it easier for people to experiment and
 build on if the topic is merged to 'next', I am at the same time a
 bit reluctant to merge an unproven new topic that introduces a new
 file format, which we may end up having to support til the end of
 time.  It is likely that to support a "prime clone from CDN", it
 would need a lot more than just "these are the heads and the pack
 data is over there", so this may not be sufficient.

 Will discard.


* mh/connect (2016-06-06) 10 commits
 - connect: [host:port] is legacy for ssh
 - connect: move ssh command line preparation to a separate function
 - connect: actively reject git:// urls with a user part
 - connect: change the --diag-url output to separate user and host
 - connect: make parse_connect_url() return the user part of the url as a separate value
 - connect: group CONNECT_DIAG_URL handling code
 - connect: make parse_connect_url() return separated host and port
 - connect: re-derive a host:port string from the separate host and port variables
 - connect: call get_host_and_port() earlier
 - connect: document why we sometimes call get_port after get_host_and_port

 Rewrite Git-URL parsing routine (hopefully) without changing any
 behaviour.

 It has been two months without any support.  We may want to discard
 this.


* kn/ref-filter-branch-list (2016-05-17) 17 commits
 - branch: implement '--format' option
 - branch: use ref-filter printing APIs
 - branch, tag: use porcelain output
 - ref-filter: allow porcelain to translate messages in the output
 - ref-filter: add `:dir` and `:base` options for ref printing atoms
 - ref-filter: make remote_ref_atom_parser() use refname_atom_parser_internal()
 - ref-filter: introduce symref_atom_parser() and refname_atom_parser()
 - ref-filter: introduce refname_atom_parser_internal()
 - ref-filter: make "%(symref)" atom work with the ':short' modifier
 - ref-filter: add support for %(upstream:track,nobracket)
 - ref-filter: make %(upstream:track) prints "[gone]" for invalid upstreams
 - ref-filter: introduce format_ref_array_item()
 - ref-filter: move get_head_description() from branch.c
 - ref-filter: modify "%(objectname:short)" to take length
 - ref-filter: implement %(if:equals=<string>) and %(if:notequals=<string>)
 - ref-filter: include reference to 'used_atom' within 'atom_value'
 - ref-filter: implement %(if), %(then), and %(else) atoms

 The code to list branches in "git branch" has been consolidated
 with the more generic ref-filter API.

 Rerolled.
 Needs review.


* ec/annotate-deleted (2015-11-20) 1 commit
 - annotate: skip checking working tree if a revision is provided

 Usability fix for annotate-specific "<file> <rev>" syntax with deleted
 files.

 Has been waiting for a review for too long without seeing anything.

 Will discard.


* dk/gc-more-wo-pack (2016-01-13) 4 commits
 - gc: clean garbage .bitmap files from pack dir
 - t5304: ensure non-garbage files are not deleted
 - t5304: test .bitmap garbage files
 - prepare_packed_git(): find more garbage

 Follow-on to dk/gc-idx-wo-pack topic, to clean up stale
 .bitmap and .keep files.

 Has been waiting for a reroll for too long.
 cf. <xmqq60ypbeng.fsf@gitster.mtv.corp.google.com>

 Will discard.


* jc/diff-b-m (2015-02-23) 5 commits
 . WIPWIP
 . WIP: diff-b-m
 - diffcore-rename: allow easier debugging
 - diffcore-rename.c: add locate_rename_src()
 - diffcore-break: allow debugging

 "git diff -B -M" produced incorrect patch when the postimage of a
 completely rewritten file is similar to the preimage of a removed
 file; such a resulting file must not be expressed as a rename from
 other place.

 The fix in this patch is broken, unfortunately.

 Will discard.

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

* nd/rebase-forget (2016-10-28) 1 commit
 - rebase: add --forget to cleanup rebase, leave HEAD untouched

 "git rebase" learned "--forget" option, which allows a user to
 remove the metadata left by an earlier "git rebase" that was
 manually aborted without using "git rebase --abort".

 Waiting for a reroll.


* jc/git-open-cloexec (2016-10-31) 3 commits
 - sha1_file: stop opening files with O_NOATIME
 - git_open_cloexec(): use fcntl(2) w/ FD_CLOEXEC fallback
 - git_open(): untangle possible NOATIME and CLOEXEC interactions

 The codeflow of setting NOATIME and CLOEXEC on file descriptors Git
 opens has been simplified.

 We may want to drop the tip one.


* jk/no-looking-at-dotgit-outside-repo-final (2016-10-26) 1 commit
  (merged to 'next' on 2016-10-26 at 220e160451)
 + setup_git_env: avoid blind fall-back to ".git"

 This is the endgame of the topic to avoid blindly falling back to
 ".git" when the setup sequence said we are _not_ in Git repository.
 A corner case that happens to work right now may be broken by a
 call to die("BUG").

 Will cook in 'next'.


* jc/reset-unmerge (2016-10-24) 1 commit
 - reset: --unmerge

 After "git add" is run prematurely during a conflict resolution,
 "git diff" can no longer be used as a way to sanity check by
 looking at the combined diff.  "git reset" learned a new
 "--unmerge" option to recover from this situation.


* jc/merge-base-fp-only (2016-10-19) 8 commits
 . merge-base: fp experiment
 - merge: allow to use only the fp-only merge bases
 - merge-base: limit the output to bases that are on first-parent chain
 - merge-base: mark bases that are on first-parent chain
 - merge-base: expose get_merge_bases_many_0() a bit more
 - merge-base: stop moving commits around in remove_redundant()
 - sha1_name: remove ONELINE_SEEN bit
 - commit: simplify fastpath of merge-base

 An experiment of merge-base that ignores common ancestors that are
 not on the first parent chain.


* tb/convert-stream-check (2016-10-27) 2 commits
 - convert.c: stream and fast search for binary
 - read-cache: factor out get_sha1_from_index() helper

 End-of-line conversion sometimes needs to see if the current blob
 in the index has NULs and CRs to base its decision.  We used to
 always get a full statistics over the blob, but in many cases we
 can return early when we have seen "enough" (e.g. if we see a
 single NUL, the blob will be handled as binary).  The codepaths
 have been optimized by using streaming interface.

 Waiting for review.
 The tip seems to do too much in a single commit and may be better split.
 cf. <20161012134724.28287-1-tboegi@web.de>
 cf. <xmqqd1il5w4e.fsf@gitster.mtv.corp.google.com>


* pb/bisect (2016-10-18) 27 commits
 - bisect--helper: remove the dequote in bisect_start()
 - bisect--helper: retire `--bisect-auto-next` subcommand
 - bisect--helper: retire `--bisect-autostart` subcommand
 - bisect--helper: retire `--bisect-write` subcommand
 - bisect--helper: `bisect_replay` shell function in C
 - bisect--helper: `bisect_log` shell function in C
 - bisect--helper: retire `--write-terms` subcommand
 - bisect--helper: retire `--check-expected-revs` subcommand
 - bisect--helper: `bisect_state` & `bisect_head` shell function in C
 - bisect--helper: `bisect_autostart` shell function in C
 - bisect--helper: retire `--next-all` subcommand
 - bisect--helper: retire `--bisect-clean-state` subcommand
 - bisect--helper: `bisect_next` and `bisect_auto_next` shell function in C
 - t6030: no cleanup with bad merge base
 - bisect--helper: `bisect_start` shell function partially in C
 - bisect--helper: `get_terms` & `bisect_terms` shell function in C
 - bisect--helper: `bisect_next_check` & bisect_voc shell function in C
 - bisect--helper: `check_and_set_terms` shell function in C
 - bisect--helper: `bisect_write` shell function in C
 - bisect--helper: `is_expected_rev` & `check_expected_revs` shell function in C
 - bisect--helper: `bisect_reset` shell function in C
 - wrapper: move is_empty_file() and rename it as is_empty_or_missing_file()
 - t6030: explicitly test for bisection cleanup
 - bisect--helper: `bisect_clean_state` shell function in C
 - bisect--helper: `write_terms` shell function in C
 - bisect: rewrite `check_term_format` shell function in C
 - bisect--helper: use OPT_CMDMODE instead of OPT_BOOL

 Move more parts of "git bisect" to C.

 Waiting for review.


* st/verify-tag (2016-10-10) 7 commits
 - t/t7004-tag: Add --format specifier tests
 - t/t7030-verify-tag: Add --format specifier tests
 - builtin/tag: add --format argument for tag -v
 - builtin/verify-tag: add --format to verify-tag
 - tag: add format specifier to gpg_verify_tag
 - ref-filter: add function to print single ref_array_item
 - gpg-interface, tag: add GPG_VERIFY_QUIET flag

 "git tag" and "git verify-tag" learned to put GPG verification
 status in their "--format=<placeholders>" output format.

 Waiting for a reroll.
 cf. <20161007210721.20437-1-santiago@nyu.edu>


* sb/attr (2016-10-28) 37 commits
 - completion: clone can initialize specific submodules
 - clone: add --init-submodule=<pathspec> switch
 - submodule update: add `--init-default-path` switch
 - pathspec: allow escaped query values
 - pathspec: allow querying for attributes
 - pathspec: move prefix check out of the inner loop
 - pathspec: move long magic parsing out of prefix_pathspec
 - Documentation: fix a typo
 - attr: keep attr stack for each check
 - SQUASH???
 - attr: convert to new threadsafe API
 - attr: make git_check_attr_counted static
 - attr.c: outline the future plans by heavily commenting
 - attr.c: always pass check[] to collect_some_attrs()
 - attr.c: introduce empty_attr_check_elems()
 - attr.c: correct ugly hack for git_all_attrs()
 - attr.c: rename a local variable check
 - attr.c: pass struct git_attr_check down the callchain
 - attr.c: add push_stack() helper
 - attr: support quoting pathname patterns in C style
 - attr: expose validity check for attribute names
 - attr: add counted string version of git_attr()
 - attr: add counted string version of git_check_attr()
 - attr: retire git_check_attrs() API
 - attr: convert git_check_attrs() callers to use the new API
 - attr: convert git_all_attrs() to use "struct git_attr_check"
 - attr: (re)introduce git_check_attr() and struct git_attr_check
 - attr: rename function and struct related to checking attributes
 - attr.c: plug small leak in parse_attr_line()
 - attr.c: tighten constness around "git_attr" structure
 - attr.c: simplify macroexpand_one()
 - attr.c: mark where #if DEBUG ends more clearly
 - attr.c: complete a sentence in a comment
 - attr.c: explain the lack of attr-name syntax check in parse_attr()
 - attr.c: update a stale comment on "struct match_attr"
 - attr.c: use strchrnul() to scan for one line
 - commit.c: use strchrnul() to scan for one line

 The attributes API has been updated so that it can later be
 optimized using the knowledge of which attributes are queried.
 Building on top of the updated API, the pathspec machinery learned
 to select only paths with given attributes set.

 Waiting for review.


* va/i18n-perl-scripts (2016-10-20) 14 commits
 - i18n: difftool: mark warnings for translation
 - i18n: send-email: mark string with interpolation for translation
 - i18n: send-email: mark warnings and errors for translation
 - i18n: send-email: mark strings for translation
 - i18n: add--interactive: mark status words for translation
 - i18n: add--interactive: remove %patch_modes entries
 - i18n: add--interactive: mark edit_hunk_manually message for translation
 - i18n: add--interactive: i18n of help_patch_cmd
 - i18n: add--interactive: mark patch prompt for translation
 - i18n: add--interactive: mark plural strings
 - i18n: clean.c: match string with git-add--interactive.perl
 - i18n: add--interactive: mark strings with interpolation for translation
 - i18n: add--interactive: mark simple here-documents for translation
 - i18n: add--interactive: mark strings for translation

 Porcelain scripts written in Perl are getting internationalized.

 Waiting for review.
 cf. <20161010125449.7929-1-vascomalmeida@sapo.pt>


* jc/latin-1 (2016-09-26) 2 commits
  (merged to 'next' on 2016-09-28 at c8673e03c2)
 + utf8: accept "latin-1" as ISO-8859-1
 + utf8: refactor code to decide fallback encoding

 Some platforms no longer understand "latin-1" that is still seen in
 the wild in e-mail headers; replace them with "iso-8859-1" that is
 more widely known when conversion fails from/to it.

 Will hold to see if people scream.


* sg/fix-versioncmp-with-common-suffix (2016-09-08) 5 commits
 - versioncmp: cope with common leading parts in versionsort.prereleaseSuffix
 - versioncmp: pass full tagnames to swap_prereleases()
 - t7004-tag: add version sort tests to show prerelease reordering issues
 - t7004-tag: use test_config helper
 - t7004-tag: delete unnecessary tags with test_when_finished

 The prereleaseSuffix feature of version comparison that is used in
 "git tag -l" did not correctly when two or more prereleases for the
 same release were present (e.g. when 2.0, 2.0-beta1, and 2.0-beta2
 are there and the code needs to compare 2.0-beta1 and 2.0-beta2).

 Waiting for a reroll.
 cf. <20160908223727.Horde.jVOOJ278ssZ3qkyjkmyqZD-@webmail.informatik.kit.edu>


* jc/pull-rebase-ff (2016-07-28) 1 commit
 - pull: fast-forward "pull --rebase=true"

 "git pull --rebase", when there is no new commits on our side since
 we forked from the upstream, should be able to fast-forward without
 invoking "git rebase", but it didn't.

 Needs a real log message and a few tests.


* jc/merge-drop-old-syntax (2015-04-29) 1 commit
  (merged to 'next' on 2016-10-11 at 8928c8b9b3)
 + merge: drop 'git merge <message> HEAD <commit>' syntax

 Stop supporting "git merge <message> HEAD <commit>" syntax that has
 been deprecated since October 2007, and issues a deprecation
 warning message since v2.5.0.

 It has been reported that git-gui still uses the deprecated syntax,
 which needs to be fixed before this final step can proceed.
 cf. <5671DB28.8020901@kdbg.org>

 Will cook in 'next'.

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

* Re: What's cooking in git.git (Oct 2016, #09; Mon, 31)
  2016-10-31 21:49 What's cooking in git.git (Oct 2016, #09; Mon, 31) Junio C Hamano
@ 2016-11-02  7:16 ` Torsten Bögershausen
  2016-11-02 12:55   ` Junio C Hamano
  2016-11-02  9:57 ` Johannes Schindelin
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 30+ messages in thread
From: Torsten Bögershausen @ 2016-11-02  7:16 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

> 
> * tb/convert-stream-check (2016-10-27) 2 commits
>  - convert.c: stream and fast search for binary
>  - read-cache: factor out get_sha1_from_index() helper
> 
>  End-of-line conversion sometimes needs to see if the current blob
>  in the index has NULs and CRs to base its decision.  We used to
>  always get a full statistics over the blob, but in many cases we
>  can return early when we have seen "enough" (e.g. if we see a
>  single NUL, the blob will be handled as binary).  The codepaths
>  have been optimized by using streaming interface.
> 
>  The tip seems to do too much in a single commit and may be better split.
>  cf. <20161012134724.28287-1-tboegi@web.de>
>  cf. <xmqqd1il5w4e.fsf@gitster.mtv.corp.google.com>

Reviews have been done, thanks everybody.

It looks to be a good "proof of concept".

The current series is far away from being ready, so please kick it
out of pu and feel free to discard.
 

 

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

* Re: What's cooking in git.git (Oct 2016, #09; Mon, 31)
  2016-10-31 21:49 What's cooking in git.git (Oct 2016, #09; Mon, 31) Junio C Hamano
  2016-11-02  7:16 ` Torsten Bögershausen
@ 2016-11-02  9:57 ` Johannes Schindelin
  2016-11-02 12:57   ` Junio C Hamano
  2016-11-02 17:04 ` Torsten Bögershausen
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 30+ messages in thread
From: Johannes Schindelin @ 2016-11-02  9:57 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Hi Junio,

On Mon, 31 Oct 2016, Junio C Hamano wrote:

> * jc/git-open-cloexec (2016-10-31) 3 commits
>  - sha1_file: stop opening files with O_NOATIME
>  - git_open_cloexec(): use fcntl(2) w/ FD_CLOEXEC fallback
>  - git_open(): untangle possible NOATIME and CLOEXEC interactions
> 
>  The codeflow of setting NOATIME and CLOEXEC on file descriptors Git
>  opens has been simplified.

This branch (in particular, the "use fcntl(2)" one) breaks the build on
Windows. Until this breakage is resolved, I won't be able to see (nor
report) any test breakages in `pu`.

Ciao,
Dscho

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

* Re: What's cooking in git.git (Oct 2016, #09; Mon, 31)
  2016-11-02  7:16 ` Torsten Bögershausen
@ 2016-11-02 12:55   ` Junio C Hamano
  0 siblings, 0 replies; 30+ messages in thread
From: Junio C Hamano @ 2016-11-02 12:55 UTC (permalink / raw)
  To: Torsten Bögershausen; +Cc: git

Torsten Bögershausen <tboegi@web.de> writes:

>> * tb/convert-stream-check (2016-10-27) 2 commits
>>  - convert.c: stream and fast search for binary
>>  - read-cache: factor out get_sha1_from_index() helper
>> 
>
> It looks to be a good "proof of concept".
>
> The current series is far away from being ready, so please kick it
> out of pu and feel free to discard.

Thanks for a heads-up.  Anything in 'pu' won't be of importance
until 2.11 final, so please don't worry too much about it.

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

* Re: What's cooking in git.git (Oct 2016, #09; Mon, 31)
  2016-11-02  9:57 ` Johannes Schindelin
@ 2016-11-02 12:57   ` Junio C Hamano
  0 siblings, 0 replies; 30+ messages in thread
From: Junio C Hamano @ 2016-11-02 12:57 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> On Mon, 31 Oct 2016, Junio C Hamano wrote:
>
>> * jc/git-open-cloexec (2016-10-31) 3 commits
>>  - sha1_file: stop opening files with O_NOATIME
>>  - git_open_cloexec(): use fcntl(2) w/ FD_CLOEXEC fallback
>>  - git_open(): untangle possible NOATIME and CLOEXEC interactions
>> 
>>  The codeflow of setting NOATIME and CLOEXEC on file descriptors Git
>>  opens has been simplified.
>
> This branch (in particular, the "use fcntl(2)" one) breaks the build on
> Windows. Until this breakage is resolved, I won't be able to see (nor
> report) any test breakages in `pu`.

Thanks for a heads-up.  Anything in 'pu' won't be of importance
until 2.11 final, so please don't worry too much about it.  Instead
please do make sure the tip of 'master' is OK.

Having said that, an incremental update or replacement to help
preparing it for post 2.11 final is appreciated ;-)

FYI, I may be offline for a few days.

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

* Re: What's cooking in git.git (Oct 2016, #09; Mon, 31)
  2016-10-31 21:49 What's cooking in git.git (Oct 2016, #09; Mon, 31) Junio C Hamano
  2016-11-02  7:16 ` Torsten Bögershausen
  2016-11-02  9:57 ` Johannes Schindelin
@ 2016-11-02 17:04 ` Torsten Bögershausen
  2016-11-02 17:40   ` Jeff King
                     ` (2 more replies)
  2016-11-05  7:42 ` Torsten Bögershausen
  2016-11-08  8:12 ` Karthik Nayak
  4 siblings, 3 replies; 30+ messages in thread
From: Torsten Bögershausen @ 2016-11-02 17:04 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

> * ls/filter-process (2016-10-17) 14 commits
>   (merged to 'next' on 2016-10-19 at ffd0de042c)

Some (late, as I recently got a new battery for the Mac OS 10.6 test system) 
comments:
t0021 failes here:


Can't locate object method "flush" via package "IO::Handle" at /Users/tb/projects/git/git.next/t/t0021/rot13-filter.pl line 90.
fatal: The remote end hung up unexpectedly


perl itself is 5.10 and we use the one shipped with Mac OS.
Why that ?
t0021 uses the hard-coded path:
t0021/rot13-filter.pl (around line 345) and the nice macro
PERL_PATH from the Makefile is fully ignored.

Commenting out the different "flush" makes the test hang, and I haven't digged further.


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

* Re: What's cooking in git.git (Oct 2016, #09; Mon, 31)
  2016-11-02 17:04 ` Torsten Bögershausen
@ 2016-11-02 17:40   ` Jeff King
  2016-11-02 18:16     ` [PATCH 0/4] t0021 perl portability fixups Jeff King
  2016-11-02 17:43   ` What's cooking in git.git (Oct 2016, #09; Mon, 31) Johannes Sixt
  2016-11-02 17:44   ` Lars Schneider
  2 siblings, 1 reply; 30+ messages in thread
From: Jeff King @ 2016-11-02 17:40 UTC (permalink / raw)
  To: Torsten Bögershausen; +Cc: Lars Schneider, Junio C Hamano, git

On Wed, Nov 02, 2016 at 05:04:15PM +0000, Torsten Bögershausen wrote:

> > * ls/filter-process (2016-10-17) 14 commits
> >   (merged to 'next' on 2016-10-19 at ffd0de042c)
> 
> Some (late, as I recently got a new battery for the Mac OS 10.6 test system) 
> comments:
> t0021 failes here:
> 
> 
> Can't locate object method "flush" via package "IO::Handle" at /Users/tb/projects/git/git.next/t/t0021/rot13-filter.pl line 90.
> fatal: The remote end hung up unexpectedly
> 
> 
> perl itself is 5.10 and we use the one shipped with Mac OS.

Wow, haven't seen that bug in a while[1]. The problem is that STDIN is a
filehandle object, but older versions of perl do not automatically load
IO::Handle to get all of the methods. This was fixed in perl 5.13.

We can work around it with:

  use IO::Handle;

at the top of the script. That should work everywhere, as IO::Handle has
been part of the core system for ages. But another option would be to
just turn on autoflush, with:

  $| = 1;

at the top of the script (though it looks like we flush $debug, too, so
we'd probably need to "select $debug; $| = 1" there, too). The "use"
command is preferable IMHO.

> Why that ?
> t0021 uses the hard-coded path:
> t0021/rot13-filter.pl (around line 345) and the nice macro
> PERL_PATH from the Makefile is fully ignored.

Yeah, we should be using PERL_PATH. Doing so inside the filter config
value is probably a pain due to shell quoting issues. But we could
use write_script() to get a local copy.

I'll see if I can work up a patch.

-Peff

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=261953

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

* Re: What's cooking in git.git (Oct 2016, #09; Mon, 31)
  2016-11-02 17:04 ` Torsten Bögershausen
  2016-11-02 17:40   ` Jeff King
@ 2016-11-02 17:43   ` Johannes Sixt
  2016-11-03 14:21     ` Lars Schneider
  2016-11-02 17:44   ` Lars Schneider
  2 siblings, 1 reply; 30+ messages in thread
From: Johannes Sixt @ 2016-11-02 17:43 UTC (permalink / raw)
  To: Torsten Bögershausen; +Cc: Junio C Hamano, git

Am 02.11.2016 um 18:04 schrieb Torsten Bögershausen:
>> * ls/filter-process (2016-10-17) 14 commits
>>   (merged to 'next' on 2016-10-19 at ffd0de042c)
> 
> Some (late, as I recently got a new battery for the Mac OS 10.6 test system) 
> comments:
> t0021 failes here:
> 
> 
> Can't locate object method "flush" via package "IO::Handle" at /Users/tb/projects/git/git.next/t/t0021/rot13-filter.pl line 90.
> fatal: The remote end hung up unexpectedly
> 
> 
> perl itself is 5.10 and we use the one shipped with Mac OS.
> Why that ?
> t0021 uses the hard-coded path:
> t0021/rot13-filter.pl (around line 345) and the nice macro
> PERL_PATH from the Makefile is fully ignored.
> 
> Commenting out the different "flush" makes the test hang, and I haven't digged further.
> 

https://public-inbox.org/git/e8deda5f-11a6-1463-4fc5-25454084ccb1@kdbg.org/

-- Hannes


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

* Re: What's cooking in git.git (Oct 2016, #09; Mon, 31)
  2016-11-02 17:04 ` Torsten Bögershausen
  2016-11-02 17:40   ` Jeff King
  2016-11-02 17:43   ` What's cooking in git.git (Oct 2016, #09; Mon, 31) Johannes Sixt
@ 2016-11-02 17:44   ` Lars Schneider
       [not found]     ` <CAG2PGspq34wn2bAGyhR6B-XmmayadmL-v3_65y5LJWTWNHXkOQ@mail.gmail.com>
  2 siblings, 1 reply; 30+ messages in thread
From: Lars Schneider @ 2016-11-02 17:44 UTC (permalink / raw)
  To: Torsten Bögershausen, mlbright; +Cc: Junio C Hamano, git


On 2 Nov 2016, at 17:04, Torsten Bögershausen <tboegi@web.de> wrote:

>> * ls/filter-process (2016-10-17) 14 commits
>>  (merged to 'next' on 2016-10-19 at ffd0de042c)
> 
> Some (late, as I recently got a new battery for the Mac OS 10.6 test system) 
> comments:
> t0021 failes here:
> 
> 
> Can't locate object method "flush" via package "IO::Handle" at /Users/tb/projects/git/git.next/t/t0021/rot13-filter.pl line 90.
> fatal: The remote end hung up unexpectedly
> 
> 
> perl itself is 5.10 and we use the one shipped with Mac OS.
> Why that ?

Thanks for reporting! It surprises me that flush is not available. I don't have a 10.6 system to tests. Where you able to reproduce the problem on a newer system with an older Perl, too?

@Martin: do you have a clue?

I can't debug the issue right now (only on mobile) but I will look into it on Friday!

> t0021 uses the hard-coded path:
> t0021/rot13-filter.pl (around line 345) and the nice macro
> PERL_PATH from the Makefile is fully t

Can you check the line number? Rot13-filter.pl has only 192 lines. I'll look into the PERL_PATH. 


> Commenting out the different "flush" makes the test hang, and I haven't digged further.

That would be expected because the pl file writes output to a file which is checked by the calling sh script.

Thanks,
Lars 

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

* [PATCH 0/4] t0021 perl portability fixups
  2016-11-02 17:40   ` Jeff King
@ 2016-11-02 18:16     ` Jeff King
  2016-11-02 18:17       ` [PATCH 1/4] t0021: use write_script to create rot13 shell script Jeff King
                         ` (3 more replies)
  0 siblings, 4 replies; 30+ messages in thread
From: Jeff King @ 2016-11-02 18:16 UTC (permalink / raw)
  To: Torsten Bögershausen; +Cc: Lars Schneider, Junio C Hamano, git

This series should fix the portability problem you saw (in the final
patch), and fixes the failure to use PERL_PATH along the way.

  [1/4]: t0021: use write_script to create rot13 shell script
  [2/4]: t0021: put $TEST_ROOT in $PATH
  [3/4]: t0021: use $PERL_PATH for rot13-filter.pl
  [4/4]: t0021: fix filehandle usage on older perl

 t/t0021-conversion.sh   | 30 ++++++++++++++++--------------
 t/t0021/rot13-filter.pl |  2 +-
 2 files changed, 17 insertions(+), 15 deletions(-)
 mode change 100755 => 100644 t/t0021/rot13-filter.pl

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

* [PATCH 1/4] t0021: use write_script to create rot13 shell script
  2016-11-02 18:16     ` [PATCH 0/4] t0021 perl portability fixups Jeff King
@ 2016-11-02 18:17       ` Jeff King
  2016-11-06 14:25         ` Lars Schneider
  2016-11-02 18:18       ` [PATCH 2/4] t0021: put $TEST_ROOT in $PATH Jeff King
                         ` (2 subsequent siblings)
  3 siblings, 1 reply; 30+ messages in thread
From: Jeff King @ 2016-11-02 18:17 UTC (permalink / raw)
  To: Torsten Bögershausen; +Cc: Lars Schneider, Junio C Hamano, git

This avoids us fooling around with $SHELL_PATH and the
executable bit ourselves.

Signed-off-by: Jeff King <peff@peff.net>
---
 t/t0021-conversion.sh | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh
index a20b9f58e..dfde22549 100755
--- a/t/t0021-conversion.sh
+++ b/t/t0021-conversion.sh
@@ -6,13 +6,11 @@ test_description='blob conversion via gitattributes'
 
 TEST_ROOT="$(pwd)"
 
-cat <<EOF >"$TEST_ROOT/rot13.sh"
-#!$SHELL_PATH
+write_script <<\EOF "$TEST_ROOT/rot13.sh"
 tr \
   'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' \
   'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'
 EOF
-chmod +x "$TEST_ROOT/rot13.sh"
 
 generate_random_characters () {
 	LEN=$1
-- 
2.11.0.rc0.258.gf434c15


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

* [PATCH 2/4] t0021: put $TEST_ROOT in $PATH
  2016-11-02 18:16     ` [PATCH 0/4] t0021 perl portability fixups Jeff King
  2016-11-02 18:17       ` [PATCH 1/4] t0021: use write_script to create rot13 shell script Jeff King
@ 2016-11-02 18:18       ` Jeff King
  2016-11-03 20:40         ` Johannes Sixt
  2016-11-06 14:29         ` Lars Schneider
  2016-11-02 18:20       ` [PATCH 3/4] t0021: use $PERL_PATH for rot13-filter.pl Jeff King
  2016-11-02 18:23       ` [PATCH 4/4] t0021: fix filehandle usage on older perl Jeff King
  3 siblings, 2 replies; 30+ messages in thread
From: Jeff King @ 2016-11-02 18:18 UTC (permalink / raw)
  To: Torsten Bögershausen; +Cc: Lars Schneider, Junio C Hamano, git

We create a rot13.sh script in the trash directory, but need
to call it by its full path when we have moved our cwd to
another directory. Let's just put $TEST_ROOT in our $PATH so
that the script is always found.

This is a minor convenience for rot13.sh, but will be a
major one when we switch rot13-filter.pl to a script in the
same directory, as it means we will not have to deal with
shell quoting inside the filter-process config.

Signed-off-by: Jeff King <peff@peff.net>
---
 t/t0021-conversion.sh | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh
index dfde22549..c1ad20c61 100755
--- a/t/t0021-conversion.sh
+++ b/t/t0021-conversion.sh
@@ -5,6 +5,7 @@ test_description='blob conversion via gitattributes'
 . ./test-lib.sh
 
 TEST_ROOT="$(pwd)"
+PATH=$TEST_ROOT:$PATH
 
 write_script <<\EOF "$TEST_ROOT/rot13.sh"
 tr \
@@ -64,7 +65,7 @@ test_cmp_exclude_clean () {
 # is equal to the committed content.
 test_cmp_committed_rot13 () {
 	test_cmp "$1" "$2" &&
-	"$TEST_ROOT/rot13.sh" <"$1" >expected &&
+	rot13.sh <"$1" >expected &&
 	git cat-file blob :"$2" >actual &&
 	test_cmp expected actual
 }
@@ -513,7 +514,7 @@ test_expect_success PERL 'required process filter should process multiple packet
 		for FILE in "$TEST_ROOT"/*.file
 		do
 			cp "$FILE" . &&
-			"$TEST_ROOT/rot13.sh" <"$FILE" >"$FILE.rot13"
+			rot13.sh <"$FILE" >"$FILE.rot13"
 		done &&
 
 		echo "*.file filter=protocol" >.gitattributes &&
@@ -616,7 +617,7 @@ test_expect_success PERL 'process filter should restart after unexpected write f
 
 		# Smudge failed
 		! test_cmp smudge-write-fail.o smudge-write-fail.r &&
-		"$TEST_ROOT/rot13.sh" <smudge-write-fail.o >expected &&
+		rot13.sh <smudge-write-fail.o >expected &&
 		git cat-file blob :smudge-write-fail.r >actual &&
 		test_cmp expected actual
 	)
-- 
2.11.0.rc0.258.gf434c15


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

* [PATCH 3/4] t0021: use $PERL_PATH for rot13-filter.pl
  2016-11-02 18:16     ` [PATCH 0/4] t0021 perl portability fixups Jeff King
  2016-11-02 18:17       ` [PATCH 1/4] t0021: use write_script to create rot13 shell script Jeff King
  2016-11-02 18:18       ` [PATCH 2/4] t0021: put $TEST_ROOT in $PATH Jeff King
@ 2016-11-02 18:20       ` Jeff King
  2016-11-06 14:52         ` Lars Schneider
  2016-11-02 18:23       ` [PATCH 4/4] t0021: fix filehandle usage on older perl Jeff King
  3 siblings, 1 reply; 30+ messages in thread
From: Jeff King @ 2016-11-02 18:20 UTC (permalink / raw)
  To: Torsten Bögershausen; +Cc: Lars Schneider, Junio C Hamano, git

The rot13-filter.pl script hardcodes "#!/usr/bin/perl", and
does not respect $PERL_PATH at all. That is a problem if the
system does not have perl at that path, or if it has a perl
that is too old to run a complicated script like the
rot13-filter (but PERL_PATH points to a more modern one).

We can fix this by using write_script() to create a new copy
of the script with the correct #!-line. In theory we could
move the whole script inside t0021-conversion.sh rather than
having it as an auxiliary file, but it's long enough that
it just makes things harder to read.

As a bonus, we can stop using the full path to the script in
the filter-process config we add (because the trash
directory is in our PATH). Not only is this shorter, but it
sidesteps any shell-quoting issues. The original was broken
when $TEST_DIRECTORY contained a space, because it was
interpolated in the outer script.

Signed-off-by: Jeff King <peff@peff.net>
---
 t/t0021-conversion.sh   | 19 +++++++++++--------
 t/t0021/rot13-filter.pl |  1 -
 2 files changed, 11 insertions(+), 9 deletions(-)
 mode change 100755 => 100644 t/t0021/rot13-filter.pl

diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh
index c1ad20c61..a8fa52148 100755
--- a/t/t0021-conversion.sh
+++ b/t/t0021-conversion.sh
@@ -13,6 +13,9 @@ tr \
   'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'
 EOF
 
+write_script rot13-filter.pl "$PERL_PATH" \
+	<"$TEST_DIRECTORY"/t0021/rot13-filter.pl
+
 generate_random_characters () {
 	LEN=$1
 	NAME=$2
@@ -341,7 +344,7 @@ test_expect_success 'diff does not reuse worktree files that need cleaning' '
 '
 
 test_expect_success PERL 'required process filter should filter data' '
-	test_config_global filter.protocol.process "$TEST_DIRECTORY/t0021/rot13-filter.pl clean smudge" &&
+	test_config_global filter.protocol.process "rot13-filter.pl clean smudge" &&
 	test_config_global filter.protocol.required true &&
 	rm -rf repo &&
 	mkdir repo &&
@@ -434,7 +437,7 @@ test_expect_success PERL 'required process filter should filter data' '
 
 test_expect_success PERL 'required process filter takes precedence' '
 	test_config_global filter.protocol.clean false &&
-	test_config_global filter.protocol.process "$TEST_DIRECTORY/t0021/rot13-filter.pl clean" &&
+	test_config_global filter.protocol.process "rot13-filter.pl clean" &&
 	test_config_global filter.protocol.required true &&
 	rm -rf repo &&
 	mkdir repo &&
@@ -459,7 +462,7 @@ test_expect_success PERL 'required process filter takes precedence' '
 '
 
 test_expect_success PERL 'required process filter should be used only for "clean" operation only' '
-	test_config_global filter.protocol.process "$TEST_DIRECTORY/t0021/rot13-filter.pl clean" &&
+	test_config_global filter.protocol.process "rot13-filter.pl clean" &&
 	rm -rf repo &&
 	mkdir repo &&
 	(
@@ -494,7 +497,7 @@ test_expect_success PERL 'required process filter should be used only for "clean
 '
 
 test_expect_success PERL 'required process filter should process multiple packets' '
-	test_config_global filter.protocol.process "$TEST_DIRECTORY/t0021/rot13-filter.pl clean smudge" &&
+	test_config_global filter.protocol.process "rot13-filter.pl clean smudge" &&
 	test_config_global filter.protocol.required true &&
 
 	rm -rf repo &&
@@ -554,7 +557,7 @@ test_expect_success PERL 'required process filter should process multiple packet
 '
 
 test_expect_success PERL 'required process filter with clean error should fail' '
-	test_config_global filter.protocol.process "$TEST_DIRECTORY/t0021/rot13-filter.pl clean smudge" &&
+	test_config_global filter.protocol.process "rot13-filter.pl clean smudge" &&
 	test_config_global filter.protocol.required true &&
 	rm -rf repo &&
 	mkdir repo &&
@@ -573,7 +576,7 @@ test_expect_success PERL 'required process filter with clean error should fail'
 '
 
 test_expect_success PERL 'process filter should restart after unexpected write failure' '
-	test_config_global filter.protocol.process "$TEST_DIRECTORY/t0021/rot13-filter.pl clean smudge" &&
+	test_config_global filter.protocol.process "rot13-filter.pl clean smudge" &&
 	rm -rf repo &&
 	mkdir repo &&
 	(
@@ -624,7 +627,7 @@ test_expect_success PERL 'process filter should restart after unexpected write f
 '
 
 test_expect_success PERL 'process filter should not be restarted if it signals an error' '
-	test_config_global filter.protocol.process "$TEST_DIRECTORY/t0021/rot13-filter.pl clean smudge" &&
+	test_config_global filter.protocol.process "rot13-filter.pl clean smudge" &&
 	rm -rf repo &&
 	mkdir repo &&
 	(
@@ -663,7 +666,7 @@ test_expect_success PERL 'process filter should not be restarted if it signals a
 '
 
 test_expect_success PERL 'process filter abort stops processing of all further files' '
-	test_config_global filter.protocol.process "$TEST_DIRECTORY/t0021/rot13-filter.pl clean smudge" &&
+	test_config_global filter.protocol.process "rot13-filter.pl clean smudge" &&
 	rm -rf repo &&
 	mkdir repo &&
 	(
diff --git a/t/t0021/rot13-filter.pl b/t/t0021/rot13-filter.pl
old mode 100755
new mode 100644
index ae4c50f5c..e3ea58e1e
--- a/t/t0021/rot13-filter.pl
+++ b/t/t0021/rot13-filter.pl
@@ -1,4 +1,3 @@
-#!/usr/bin/perl
 #
 # Example implementation for the Git filter protocol version 2
 # See Documentation/gitattributes.txt, section "Filter Protocol"
-- 
2.11.0.rc0.258.gf434c15


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

* [PATCH 4/4] t0021: fix filehandle usage on older perl
  2016-11-02 18:16     ` [PATCH 0/4] t0021 perl portability fixups Jeff King
                         ` (2 preceding siblings ...)
  2016-11-02 18:20       ` [PATCH 3/4] t0021: use $PERL_PATH for rot13-filter.pl Jeff King
@ 2016-11-02 18:23       ` Jeff King
  2016-11-02 20:54         ` Torsten Bögershausen
  2016-11-06 14:55         ` Lars Schneider
  3 siblings, 2 replies; 30+ messages in thread
From: Jeff King @ 2016-11-02 18:23 UTC (permalink / raw)
  To: Torsten Bögershausen
  Cc: Johannes Sixt, Lars Schneider, Junio C Hamano, git

The rot13-filter.pl script calls methods on implicitly
defined filehandles (STDOUT, and the result of an open()
call).  Prior to perl 5.13, these methods are not
automatically loaded, and perl will complain with:

  Can't locate object method "flush" via package "IO::Handle"

Let's explicitly load IO::File (which inherits from
IO::Handle). That's more than we need for just "flush", but
matches what perl has done since:

  http://perl5.git.perl.org/perl.git/commit/15e6cdd91beb4cefae4b65e855d68cf64766965d

Signed-off-by: Jeff King <peff@peff.net>
---
I see J6t solved this a week ago using "FileHandle". These days that is
basically a compatibility synonym for IO::File. I think both should be
available pretty much everywhere, so I went with IO::File for the
reasons above. But if that doesn't work for some reason, switching to
"use FileHandle" should be OK, too.

I don't have an old enough perl easily available to test it either way.

 t/t0021/rot13-filter.pl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/t/t0021/rot13-filter.pl b/t/t0021/rot13-filter.pl
index e3ea58e1e..4d5697ee5 100644
--- a/t/t0021/rot13-filter.pl
+++ b/t/t0021/rot13-filter.pl
@@ -21,6 +21,7 @@
 
 use strict;
 use warnings;
+use IO::File;
 
 my $MAX_PACKET_CONTENT_SIZE = 65516;
 my @capabilities            = @ARGV;
-- 
2.11.0.rc0.258.gf434c15

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

* Re: [PATCH 4/4] t0021: fix filehandle usage on older perl
  2016-11-02 18:23       ` [PATCH 4/4] t0021: fix filehandle usage on older perl Jeff King
@ 2016-11-02 20:54         ` Torsten Bögershausen
  2016-11-06 14:55         ` Lars Schneider
  1 sibling, 0 replies; 30+ messages in thread
From: Torsten Bögershausen @ 2016-11-02 20:54 UTC (permalink / raw)
  To: Jeff King; +Cc: Johannes Sixt, Lars Schneider, Junio C Hamano, git


> +use IO::File;

That did the trick (the J6T version work as well)

Thanks for the fast responses.

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

* Re: What's cooking in git.git (Oct 2016, #09; Mon, 31)
  2016-11-02 17:43   ` What's cooking in git.git (Oct 2016, #09; Mon, 31) Johannes Sixt
@ 2016-11-03 14:21     ` Lars Schneider
  0 siblings, 0 replies; 30+ messages in thread
From: Lars Schneider @ 2016-11-03 14:21 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: Torsten Bögershausen, Junio C Hamano, git


> On 2 Nov 2016, at 17:43, Johannes Sixt <j6t@kdbg.org> wrote:
> 
> Am 02.11.2016 um 18:04 schrieb Torsten Bögershausen:
>>> * ls/filter-process (2016-10-17) 14 commits
>>>  (merged to 'next' on 2016-10-19 at ffd0de042c)
>> 
>> Some (late, as I recently got a new battery for the Mac OS 10.6 test system) 
>> comments:
>> t0021 failes here:
>> 
>> 
>> Can't locate object method "flush" via package "IO::Handle" at /Users/tb/projects/git/git.next/t/t0021/rot13-filter.pl line 90.
>> fatal: The remote end hung up unexpectedly
>> 
>> 
>> perl itself is 5.10 and we use the one shipped with Mac OS.
>> Why that ?
>> t0021 uses the hard-coded path:
>> t0021/rot13-filter.pl (around line 345) and the nice macro
>> PERL_PATH from the Makefile is fully ignored.
>> 
>> Commenting out the different "flush" makes the test hang, and I haven't digged further.
>> 
> 
> https://public-inbox.org/git/e8deda5f-11a6-1463-4fc5-25454084ccb1@kdbg.org/

Woooh. I am sorry Hannes - I completely missed that email! Looks like Peff addressed the issue already. His patches look very good but I want to try it on my machine tomorrow.

Thanks,
Lars

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

* Re: [PATCH 2/4] t0021: put $TEST_ROOT in $PATH
  2016-11-02 18:18       ` [PATCH 2/4] t0021: put $TEST_ROOT in $PATH Jeff King
@ 2016-11-03 20:40         ` Johannes Sixt
  2016-11-03 20:44           ` Jeff King
  2016-11-06 14:29         ` Lars Schneider
  1 sibling, 1 reply; 30+ messages in thread
From: Johannes Sixt @ 2016-11-03 20:40 UTC (permalink / raw)
  To: Jeff King; +Cc: Torsten Bögershausen, Lars Schneider, Junio C Hamano, git

Am 02.11.2016 um 19:18 schrieb Jeff King:
> We create a rot13.sh script in the trash directory, but need
> to call it by its full path when we have moved our cwd to
> another directory. Let's just put $TEST_ROOT in our $PATH so
> that the script is always found.
> 
> This is a minor convenience for rot13.sh, but will be a
> major one when we switch rot13-filter.pl to a script in the
> same directory, as it means we will not have to deal with
> shell quoting inside the filter-process config.
> 
> Signed-off-by: Jeff King <peff@peff.net>
> ---
>  t/t0021-conversion.sh | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh
> index dfde22549..c1ad20c61 100755
> --- a/t/t0021-conversion.sh
> +++ b/t/t0021-conversion.sh
> @@ -5,6 +5,7 @@ test_description='blob conversion via gitattributes'
>  . ./test-lib.sh
>  
>  TEST_ROOT="$(pwd)"
> +PATH=$TEST_ROOT:$PATH

This causes problems on Windows. We need the following squashed in.

---- 8< ----
[PATCH] squash! t0021: put $TEST_ROOT in $PATH

We have to use $PWD instead of $(pwd) because on Windows the
latter would add a C: style path to bash's Unix-style $PATH
variable, which becomes confused by the colon after the
drive letter. ($PWD is a Unix-style path.)

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
 t/t0021-conversion.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh
index 4e4b9a6be3..cff2b7259d 100755
--- a/t/t0021-conversion.sh
+++ b/t/t0021-conversion.sh
@@ -4,7 +4,7 @@ test_description='blob conversion via gitattributes'
 
 . ./test-lib.sh
 
-TEST_ROOT="$(pwd)"
+TEST_ROOT="$PWD"
 PATH=$TEST_ROOT:$PATH
 
 write_script <<\EOF "$TEST_ROOT/rot13.sh"
-- 
2.11.0.rc0.55.gd967357


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

* Re: [PATCH 2/4] t0021: put $TEST_ROOT in $PATH
  2016-11-03 20:40         ` Johannes Sixt
@ 2016-11-03 20:44           ` Jeff King
  2016-11-03 21:09             ` Johannes Sixt
  0 siblings, 1 reply; 30+ messages in thread
From: Jeff King @ 2016-11-03 20:44 UTC (permalink / raw)
  To: Johannes Sixt
  Cc: Torsten Bögershausen, Lars Schneider, Junio C Hamano, git

On Thu, Nov 03, 2016 at 09:40:01PM +0100, Johannes Sixt wrote:

> >  TEST_ROOT="$(pwd)"
> > +PATH=$TEST_ROOT:$PATH
> 
> This causes problems on Windows. We need the following squashed in.
> 
> ---- 8< ----
> [PATCH] squash! t0021: put $TEST_ROOT in $PATH
> 
> We have to use $PWD instead of $(pwd) because on Windows the
> latter would add a C: style path to bash's Unix-style $PATH
> variable, which becomes confused by the colon after the
> drive letter. ($PWD is a Unix-style path.)

Thanks. I have to admit I remain confused about which one to use at any
given invocation (I would have thought that switching to $PWD causes
problems elsewhere in the script, but I guess file redirection is
capable of handling either type).

-Peff

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

* Re: [PATCH 2/4] t0021: put $TEST_ROOT in $PATH
  2016-11-03 20:44           ` Jeff King
@ 2016-11-03 21:09             ` Johannes Sixt
  0 siblings, 0 replies; 30+ messages in thread
From: Johannes Sixt @ 2016-11-03 21:09 UTC (permalink / raw)
  To: Jeff King; +Cc: Torsten Bögershausen, Lars Schneider, Junio C Hamano, git

Am 03.11.2016 um 21:44 schrieb Jeff King:
> On Thu, Nov 03, 2016 at 09:40:01PM +0100, Johannes Sixt wrote:
>> We have to use $PWD instead of $(pwd) because on Windows...
>
> Thanks. I have to admit I remain confused about which one to use at any
> given invocation

No worries. It *is* complex, and I don't expect anyone who is not deep 
in the business to get this thing right except by mere chance.

> (I would have thought that switching to $PWD causes
> problems elsewhere in the script, but I guess file redirection is
> capable of handling either type).

Correct.

-- Hannes


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

* Re: What's cooking in git.git (Oct 2016, #09; Mon, 31)
       [not found]     ` <CAG2PGspq34wn2bAGyhR6B-XmmayadmL-v3_65y5LJWTWNHXkOQ@mail.gmail.com>
@ 2016-11-05  7:27       ` Torsten Bögershausen
  0 siblings, 0 replies; 30+ messages in thread
From: Torsten Bögershausen @ 2016-11-05  7:27 UTC (permalink / raw)
  To: Martin-Louis Bright; +Cc: Lars Schneider, Junio C Hamano, git

On Thu, Nov 03, 2016 at 09:30:44AM -0400, Martin-Louis Bright wrote:
> I will see if I can find a OSX 10.6 system to test with, and I'll try with
> perl 5.10.
> 
> --Martin

No need to worry too much:

I have tested Peffs patch applied on next OK- 
And the integration into pu that came the 2nd Novevember is tested OK as well.

(And please everybody: avoid top-posting here)

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

* Re: What's cooking in git.git (Oct 2016, #09; Mon, 31)
  2016-10-31 21:49 What's cooking in git.git (Oct 2016, #09; Mon, 31) Junio C Hamano
                   ` (2 preceding siblings ...)
  2016-11-02 17:04 ` Torsten Bögershausen
@ 2016-11-05  7:42 ` Torsten Bögershausen
  2016-11-08  8:12 ` Karthik Nayak
  4 siblings, 0 replies; 30+ messages in thread
From: Torsten Bögershausen @ 2016-11-05  7:42 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, santiago, gitster, peff, sunshine, walters

> * st/verify-tag (2016-10-10) 7 commits
>  - t/t7004-tag: Add --format specifier tests
>  - t/t7030-verify-tag: Add --format specifier tests
>  - builtin/tag: add --format argument for tag -v
>  - builtin/verify-tag: add --format to verify-tag
>  - tag: add format specifier to gpg_verify_tag
>  - ref-filter: add function to print single ref_array_item
>  - gpg-interface, tag: add GPG_VERIFY_QUIET flag
> 
>  "git tag" and "git verify-tag" learned to put GPG verification
>  status in their "--format=<placeholders>" output format.
> 
>  Waiting for a reroll.
>  cf. <20161007210721.20437-1-santiago@nyu.edu>

I don't know if this has been reported before:
Some tests needs to be protected by GPG:
+test_expect_success GPG 'verifying a proper tag with --format pass and format accordingly' 

test_expect_success GPG 'verifying a forged tag with --format fail and format accordingly'

test_expect_success GPG 'verifying a forged tag with --format fail and format accordingly'

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

* Re: [PATCH 1/4] t0021: use write_script to create rot13 shell script
  2016-11-02 18:17       ` [PATCH 1/4] t0021: use write_script to create rot13 shell script Jeff King
@ 2016-11-06 14:25         ` Lars Schneider
  2016-11-06 14:29           ` Jeff King
  0 siblings, 1 reply; 30+ messages in thread
From: Lars Schneider @ 2016-11-06 14:25 UTC (permalink / raw)
  To: Jeff King; +Cc: Torsten Bögershausen, Junio C Hamano, git


> On 02 Nov 2016, at 19:17, Jeff King <peff@peff.net> wrote:
> 
> This avoids us fooling around with $SHELL_PATH and the
> executable bit ourselves.
> 
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> t/t0021-conversion.sh | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh
> index a20b9f58e..dfde22549 100755
> --- a/t/t0021-conversion.sh
> +++ b/t/t0021-conversion.sh
> @@ -6,13 +6,11 @@ test_description='blob conversion via gitattributes'
> 
> TEST_ROOT="$(pwd)"
> 
> -cat <<EOF >"$TEST_ROOT/rot13.sh"
> -#!$SHELL_PATH
> +write_script <<\EOF "$TEST_ROOT/rot13.sh"
> tr \
>   'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' \
>   'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'
> EOF
> -chmod +x "$TEST_ROOT/rot13.sh"
> 
> generate_random_characters () {
> 	LEN=$1
> -- 
> 2.11.0.rc0.258.gf434c15
> 

This looks good to me (and it works on my machine).
However, I took a look at the "write_script" function and found this,
added by Junio in 840c519d:

echo "#!${2-"$SHELL_PATH"}" &&

There is some kind of variable expansion happening with the "2-" but
I can't quite figure out what is going on. Plus, I can't find anything 
about this in the sh docs.

Can anyone help me to understand it?

Thanks,
Lars
 

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

* Re: [PATCH 2/4] t0021: put $TEST_ROOT in $PATH
  2016-11-02 18:18       ` [PATCH 2/4] t0021: put $TEST_ROOT in $PATH Jeff King
  2016-11-03 20:40         ` Johannes Sixt
@ 2016-11-06 14:29         ` Lars Schneider
  1 sibling, 0 replies; 30+ messages in thread
From: Lars Schneider @ 2016-11-06 14:29 UTC (permalink / raw)
  To: Jeff King; +Cc: Torsten Bögershausen, Junio C Hamano, git


> On 02 Nov 2016, at 19:18, Jeff King <peff@peff.net> wrote:
> 
> We create a rot13.sh script in the trash directory, but need
> to call it by its full path when we have moved our cwd to
> another directory. Let's just put $TEST_ROOT in our $PATH so
> that the script is always found.
> 
> This is a minor convenience for rot13.sh, but will be a
> major one when we switch rot13-filter.pl to a script in the
> same directory, as it means we will not have to deal with
> shell quoting inside the filter-process config.
> 
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> t/t0021-conversion.sh | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh
> index dfde22549..c1ad20c61 100755
> --- a/t/t0021-conversion.sh
> +++ b/t/t0021-conversion.sh
> @@ -5,6 +5,7 @@ test_description='blob conversion via gitattributes'
> . ./test-lib.sh
> 
> TEST_ROOT="$(pwd)"
> +PATH=$TEST_ROOT:$PATH
> 
> write_script <<\EOF "$TEST_ROOT/rot13.sh"
> tr \
> @@ -64,7 +65,7 @@ test_cmp_exclude_clean () {
> # is equal to the committed content.
> test_cmp_committed_rot13 () {
> 	test_cmp "$1" "$2" &&
> -	"$TEST_ROOT/rot13.sh" <"$1" >expected &&
> +	rot13.sh <"$1" >expected &&
> 	git cat-file blob :"$2" >actual &&
> 	test_cmp expected actual
> }
> @@ -513,7 +514,7 @@ test_expect_success PERL 'required process filter should process multiple packet
> 		for FILE in "$TEST_ROOT"/*.file
> 		do
> 			cp "$FILE" . &&
> -			"$TEST_ROOT/rot13.sh" <"$FILE" >"$FILE.rot13"
> +			rot13.sh <"$FILE" >"$FILE.rot13"
> 		done &&
> 
> 		echo "*.file filter=protocol" >.gitattributes &&
> @@ -616,7 +617,7 @@ test_expect_success PERL 'process filter should restart after unexpected write f
> 
> 		# Smudge failed
> 		! test_cmp smudge-write-fail.o smudge-write-fail.r &&
> -		"$TEST_ROOT/rot13.sh" <smudge-write-fail.o >expected &&
> +		rot13.sh <smudge-write-fail.o >expected &&
> 		git cat-file blob :smudge-write-fail.r >actual &&
> 		test_cmp expected actual
> 	)
> -- 
> 2.11.0.rc0.258.gf434c15

Looks good to me and the PWD Windows fix suggested by Hannes [1] works great
on macOS.

Thanks,
Lars

[1] http://public-inbox.org/git/20161103204438.zfe653c2bsv3zqkx@sigill.intra.peff.net/

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

* Re: [PATCH 1/4] t0021: use write_script to create rot13 shell script
  2016-11-06 14:25         ` Lars Schneider
@ 2016-11-06 14:29           ` Jeff King
  2016-11-06 14:43             ` Lars Schneider
  0 siblings, 1 reply; 30+ messages in thread
From: Jeff King @ 2016-11-06 14:29 UTC (permalink / raw)
  To: Lars Schneider; +Cc: Torsten Bögershausen, Junio C Hamano, git

On Sun, Nov 06, 2016 at 03:25:33PM +0100, Lars Schneider wrote:

> This looks good to me (and it works on my machine).
> However, I took a look at the "write_script" function and found this,
> added by Junio in 840c519d:
> 
> echo "#!${2-"$SHELL_PATH"}" &&
> 
> There is some kind of variable expansion happening with the "2-" but
> I can't quite figure out what is going on. Plus, I can't find anything 
> about this in the sh docs.
> 
> Can anyone help me to understand it?

See the section on parameter expansion in "man bash". Basically:

 ${foo:-bar}

expands to $foo, or "bar" if it is unset or empty. Without the colon:

  ${foo-bar}

expands to $foo, "bar" if it unset (but not if it is empty). I don't
think we really care about the distinction here, and either is fine (you
would not ever pass an empty argument).

So in this context you may pass in the interpreter:

  write_script "$PERL_PATH" <<\EOF
  ... some perl code ...
  EOF

or it defaults to shell, which is what most of the callers want:

  write_script <<\EOF
  ... some shell code ...
  EOF

-Peff

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

* Re: [PATCH 1/4] t0021: use write_script to create rot13 shell script
  2016-11-06 14:29           ` Jeff King
@ 2016-11-06 14:43             ` Lars Schneider
  0 siblings, 0 replies; 30+ messages in thread
From: Lars Schneider @ 2016-11-06 14:43 UTC (permalink / raw)
  To: Jeff King; +Cc: Torsten Bögershausen, Junio C Hamano, git


> On 06 Nov 2016, at 15:29, Jeff King <peff@peff.net> wrote:
> 
> On Sun, Nov 06, 2016 at 03:25:33PM +0100, Lars Schneider wrote:
> 
>> This looks good to me (and it works on my machine).
>> However, I took a look at the "write_script" function and found this,
>> added by Junio in 840c519d:
>> 
>> echo "#!${2-"$SHELL_PATH"}" &&
>> 
>> There is some kind of variable expansion happening with the "2-" but
>> I can't quite figure out what is going on. Plus, I can't find anything 
>> about this in the sh docs.
>> 
>> Can anyone help me to understand it?
> 
> See the section on parameter expansion in "man bash". Basically:
> 
> ${foo:-bar}
> 
> expands to $foo, or "bar" if it is unset or empty. Without the colon:
> 
>  ${foo-bar}
> 
> expands to $foo, "bar" if it unset (but not if it is empty).

Ahh! The missing colon tricked me. For some reason the version
without colon is not mentioned in my docs (GNU bash, version 3.2.57)
or I overlooked it.

Thanks for taking the time to explain it!

- Lars


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

* Re: [PATCH 3/4] t0021: use $PERL_PATH for rot13-filter.pl
  2016-11-02 18:20       ` [PATCH 3/4] t0021: use $PERL_PATH for rot13-filter.pl Jeff King
@ 2016-11-06 14:52         ` Lars Schneider
  2016-11-06 14:54           ` Jeff King
  0 siblings, 1 reply; 30+ messages in thread
From: Lars Schneider @ 2016-11-06 14:52 UTC (permalink / raw)
  To: Jeff King; +Cc: Torsten Bögershausen, Junio C Hamano, git


> On 02 Nov 2016, at 19:20, Jeff King <peff@peff.net> wrote:
> 
> The rot13-filter.pl script hardcodes "#!/usr/bin/perl", and
> does not respect $PERL_PATH at all. That is a problem if the
> system does not have perl at that path, or if it has a perl
> that is too old to run a complicated script like the
> rot13-filter (but PERL_PATH points to a more modern one).
> 
> We can fix this by using write_script() to create a new copy
> of the script with the correct #!-line. In theory we could
> move the whole script inside t0021-conversion.sh rather than
> having it as an auxiliary file, but it's long enough that
> it just makes things harder to read.
> 
> As a bonus, we can stop using the full path to the script in
> the filter-process config we add (because the trash
> directory is in our PATH). Not only is this shorter, but it
> sidesteps any shell-quoting issues. The original was broken
> when $TEST_DIRECTORY contained a space, because it was
> interpolated in the outer script.
> 
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> t/t0021-conversion.sh   | 19 +++++++++++--------
> t/t0021/rot13-filter.pl |  1 -
> 2 files changed, 11 insertions(+), 9 deletions(-)
> mode change 100755 => 100644 t/t0021/rot13-filter.pl
> 
> diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh
> index c1ad20c61..a8fa52148 100755
> --- a/t/t0021-conversion.sh
> +++ b/t/t0021-conversion.sh
> @@ -13,6 +13,9 @@ tr \
>   'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'
> EOF
> 
> +write_script rot13-filter.pl "$PERL_PATH" \
> +	<"$TEST_DIRECTORY"/t0021/rot13-filter.pl
> +
> generate_random_characters () {
> 	LEN=$1
> 	NAME=$2
> @@ -341,7 +344,7 @@ test_expect_success 'diff does not reuse worktree files that need cleaning' '
> '
> 
> test_expect_success PERL 'required process filter should filter data' '
> -	test_config_global filter.protocol.process "$TEST_DIRECTORY/t0021/rot13-filter.pl clean smudge" &&
> +	test_config_global filter.protocol.process "rot13-filter.pl clean smudge" &&
> 	test_config_global filter.protocol.required true &&
> 	rm -rf repo &&
> 	mkdir repo &&
> @@ -434,7 +437,7 @@ test_expect_success PERL 'required process filter should filter data' '
> 
> test_expect_success PERL 'required process filter takes precedence' '
> 	test_config_global filter.protocol.clean false &&
> -	test_config_global filter.protocol.process "$TEST_DIRECTORY/t0021/rot13-filter.pl clean" &&
> +	test_config_global filter.protocol.process "rot13-filter.pl clean" &&
> 	test_config_global filter.protocol.required true &&
> 	rm -rf repo &&
> 	mkdir repo &&
> @@ -459,7 +462,7 @@ test_expect_success PERL 'required process filter takes precedence' '
> '
> 
> test_expect_success PERL 'required process filter should be used only for "clean" operation only' '
> -	test_config_global filter.protocol.process "$TEST_DIRECTORY/t0021/rot13-filter.pl clean" &&
> +	test_config_global filter.protocol.process "rot13-filter.pl clean" &&
> 	rm -rf repo &&
> 	mkdir repo &&
> 	(
> @@ -494,7 +497,7 @@ test_expect_success PERL 'required process filter should be used only for "clean
> '
> 
> test_expect_success PERL 'required process filter should process multiple packets' '
> -	test_config_global filter.protocol.process "$TEST_DIRECTORY/t0021/rot13-filter.pl clean smudge" &&
> +	test_config_global filter.protocol.process "rot13-filter.pl clean smudge" &&
> 	test_config_global filter.protocol.required true &&
> 
> 	rm -rf repo &&
> @@ -554,7 +557,7 @@ test_expect_success PERL 'required process filter should process multiple packet
> '
> 
> test_expect_success PERL 'required process filter with clean error should fail' '
> -	test_config_global filter.protocol.process "$TEST_DIRECTORY/t0021/rot13-filter.pl clean smudge" &&
> +	test_config_global filter.protocol.process "rot13-filter.pl clean smudge" &&
> 	test_config_global filter.protocol.required true &&
> 	rm -rf repo &&
> 	mkdir repo &&
> @@ -573,7 +576,7 @@ test_expect_success PERL 'required process filter with clean error should fail'
> '
> 
> test_expect_success PERL 'process filter should restart after unexpected write failure' '
> -	test_config_global filter.protocol.process "$TEST_DIRECTORY/t0021/rot13-filter.pl clean smudge" &&
> +	test_config_global filter.protocol.process "rot13-filter.pl clean smudge" &&
> 	rm -rf repo &&
> 	mkdir repo &&
> 	(
> @@ -624,7 +627,7 @@ test_expect_success PERL 'process filter should restart after unexpected write f
> '
> 
> test_expect_success PERL 'process filter should not be restarted if it signals an error' '
> -	test_config_global filter.protocol.process "$TEST_DIRECTORY/t0021/rot13-filter.pl clean smudge" &&
> +	test_config_global filter.protocol.process "rot13-filter.pl clean smudge" &&
> 	rm -rf repo &&
> 	mkdir repo &&
> 	(
> @@ -663,7 +666,7 @@ test_expect_success PERL 'process filter should not be restarted if it signals a
> '
> 
> test_expect_success PERL 'process filter abort stops processing of all further files' '
> -	test_config_global filter.protocol.process "$TEST_DIRECTORY/t0021/rot13-filter.pl clean smudge" &&
> +	test_config_global filter.protocol.process "rot13-filter.pl clean smudge" &&
> 	rm -rf repo &&
> 	mkdir repo &&
> 	(
> diff --git a/t/t0021/rot13-filter.pl b/t/t0021/rot13-filter.pl
> old mode 100755
> new mode 100644
> index ae4c50f5c..e3ea58e1e
> --- a/t/t0021/rot13-filter.pl
> +++ b/t/t0021/rot13-filter.pl
> @@ -1,4 +1,3 @@
> -#!/usr/bin/perl
> #
> # Example implementation for the Git filter protocol version 2
> # See Documentation/gitattributes.txt, section "Filter Protocol"
> -- 
> 2.11.0.rc0.258.gf434c15

Looks good to me! 

Minor pedantic nit: 
Would it make sense to rename "rot13-filter.pl" to 
"rot13-filter.pl.template" or something because of the
missing shebang?

- Lars


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

* Re: [PATCH 3/4] t0021: use $PERL_PATH for rot13-filter.pl
  2016-11-06 14:52         ` Lars Schneider
@ 2016-11-06 14:54           ` Jeff King
  0 siblings, 0 replies; 30+ messages in thread
From: Jeff King @ 2016-11-06 14:54 UTC (permalink / raw)
  To: Lars Schneider; +Cc: Torsten Bögershausen, Junio C Hamano, git

On Sun, Nov 06, 2016 at 03:52:00PM +0100, Lars Schneider wrote:

> Would it make sense to rename "rot13-filter.pl" to 
> "rot13-filter.pl.template" or something because of the
> missing shebang?

I think it makes sense to keep it as ".pl". Without the "#!" things like
editors will use the extension to guess what type of file it is, for
features like syntax highlight and auto-indentation.

I was actually tempted to _keep_ the #! line for that reason, but then
the built result ends up with two such lines (which is not wrong, but is
confusing if anybody actually looks at it).

-Peff

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

* Re: [PATCH 4/4] t0021: fix filehandle usage on older perl
  2016-11-02 18:23       ` [PATCH 4/4] t0021: fix filehandle usage on older perl Jeff King
  2016-11-02 20:54         ` Torsten Bögershausen
@ 2016-11-06 14:55         ` Lars Schneider
  1 sibling, 0 replies; 30+ messages in thread
From: Lars Schneider @ 2016-11-06 14:55 UTC (permalink / raw)
  To: Jeff King
  Cc: Torsten Bögershausen, Johannes Sixt, Junio C Hamano, git,
	Martin-Louis Bright


> On 02 Nov 2016, at 19:23, Jeff King <peff@peff.net> wrote:
> 
> The rot13-filter.pl script calls methods on implicitly
> defined filehandles (STDOUT, and the result of an open()
> call).  Prior to perl 5.13, these methods are not
> automatically loaded, and perl will complain with:
> 
>  Can't locate object method "flush" via package "IO::Handle"
> 
> Let's explicitly load IO::File (which inherits from
> IO::Handle). That's more than we need for just "flush", but
> matches what perl has done since:
> 
>  http://perl5.git.perl.org/perl.git/commit/15e6cdd91beb4cefae4b65e855d68cf64766965d
> 
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> I see J6t solved this a week ago using "FileHandle". These days that is
> basically a compatibility synonym for IO::File. I think both should be
> available pretty much everywhere, so I went with IO::File for the
> reasons above. But if that doesn't work for some reason, switching to
> "use FileHandle" should be OK, too.
> 
> I don't have an old enough perl easily available to test it either way.
> 
> t/t0021/rot13-filter.pl | 1 +
> 1 file changed, 1 insertion(+)
> 
> diff --git a/t/t0021/rot13-filter.pl b/t/t0021/rot13-filter.pl
> index e3ea58e1e..4d5697ee5 100644
> --- a/t/t0021/rot13-filter.pl
> +++ b/t/t0021/rot13-filter.pl
> @@ -21,6 +21,7 @@
> 
> use strict;
> use warnings;
> +use IO::File;
> 
> my $MAX_PACKET_CONTENT_SIZE = 65516;
> my @capabilities            = @ARGV;
> -- 
> 2.11.0.rc0.258.gf434c15

Looks good to me (and works flawlessly on newer macOS).

Thanks,
Lars

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

* Re: What's cooking in git.git (Oct 2016, #09; Mon, 31)
  2016-10-31 21:49 What's cooking in git.git (Oct 2016, #09; Mon, 31) Junio C Hamano
                   ` (3 preceding siblings ...)
  2016-11-05  7:42 ` Torsten Bögershausen
@ 2016-11-08  8:12 ` Karthik Nayak
       [not found]   ` <CA+P7+xo+CJU_ng5OWX1y26+=QPCg6Zxpv_0opTAzsNqeFXAwng@mail.gmail.com>
  4 siblings, 1 reply; 30+ messages in thread
From: Karthik Nayak @ 2016-11-08  8:12 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git List

Hello,

>
> * kn/ref-filter-branch-list (2016-05-17) 17 commits
>  - branch: implement '--format' option
>  - branch: use ref-filter printing APIs
>  - branch, tag: use porcelain output
>  - ref-filter: allow porcelain to translate messages in the output
>  - ref-filter: add `:dir` and `:base` options for ref printing atoms
>  - ref-filter: make remote_ref_atom_parser() use refname_atom_parser_internal()
>  - ref-filter: introduce symref_atom_parser() and refname_atom_parser()
>  - ref-filter: introduce refname_atom_parser_internal()
>  - ref-filter: make "%(symref)" atom work with the ':short' modifier
>  - ref-filter: add support for %(upstream:track,nobracket)
>  - ref-filter: make %(upstream:track) prints "[gone]" for invalid upstreams
>  - ref-filter: introduce format_ref_array_item()
>  - ref-filter: move get_head_description() from branch.c
>  - ref-filter: modify "%(objectname:short)" to take length
>  - ref-filter: implement %(if:equals=<string>) and %(if:notequals=<string>)
>  - ref-filter: include reference to 'used_atom' within 'atom_value'
>  - ref-filter: implement %(if), %(then), and %(else) atoms
>
>  The code to list branches in "git branch" has been consolidated
>  with the more generic ref-filter API.
>
>  Rerolled.
>  Needs review.

Anything I could do to push this forward? It's been a while now.

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

* Re: What's cooking in git.git (Oct 2016, #09; Mon, 31)
       [not found]   ` <CA+P7+xo+CJU_ng5OWX1y26+=QPCg6Zxpv_0opTAzsNqeFXAwng@mail.gmail.com>
@ 2016-11-08  9:03     ` Karthik Nayak
  0 siblings, 0 replies; 30+ messages in thread
From: Karthik Nayak @ 2016-11-08  9:03 UTC (permalink / raw)
  To: Jacob Keller; +Cc: Junio C Hamano, Git mailing list

Helo,

On Tue, Nov 8, 2016 at 1:58 PM, Jacob Keller <jacob.keller@gmail.com> wrote:
> On Nov 8, 2016 12:24 AM, "Karthik Nayak" <karthik.188@gmail.com> wrote:
>> Anything I could do to push this forward? It's been a while now.
>
> Hi,
>
> If this just needs more reviewers I can take a look. Do you possibly have a
> link to the series so I can find it more easily on the mailing list?
>

Since It's been so long I feel it's better I rerolled it, rebasing on
'master'. So I'll
do that soon.

-- 
Regards,
Karthik Nayak

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

end of thread, other threads:[~2016-11-08  9:03 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-31 21:49 What's cooking in git.git (Oct 2016, #09; Mon, 31) Junio C Hamano
2016-11-02  7:16 ` Torsten Bögershausen
2016-11-02 12:55   ` Junio C Hamano
2016-11-02  9:57 ` Johannes Schindelin
2016-11-02 12:57   ` Junio C Hamano
2016-11-02 17:04 ` Torsten Bögershausen
2016-11-02 17:40   ` Jeff King
2016-11-02 18:16     ` [PATCH 0/4] t0021 perl portability fixups Jeff King
2016-11-02 18:17       ` [PATCH 1/4] t0021: use write_script to create rot13 shell script Jeff King
2016-11-06 14:25         ` Lars Schneider
2016-11-06 14:29           ` Jeff King
2016-11-06 14:43             ` Lars Schneider
2016-11-02 18:18       ` [PATCH 2/4] t0021: put $TEST_ROOT in $PATH Jeff King
2016-11-03 20:40         ` Johannes Sixt
2016-11-03 20:44           ` Jeff King
2016-11-03 21:09             ` Johannes Sixt
2016-11-06 14:29         ` Lars Schneider
2016-11-02 18:20       ` [PATCH 3/4] t0021: use $PERL_PATH for rot13-filter.pl Jeff King
2016-11-06 14:52         ` Lars Schneider
2016-11-06 14:54           ` Jeff King
2016-11-02 18:23       ` [PATCH 4/4] t0021: fix filehandle usage on older perl Jeff King
2016-11-02 20:54         ` Torsten Bögershausen
2016-11-06 14:55         ` Lars Schneider
2016-11-02 17:43   ` What's cooking in git.git (Oct 2016, #09; Mon, 31) Johannes Sixt
2016-11-03 14:21     ` Lars Schneider
2016-11-02 17:44   ` Lars Schneider
     [not found]     ` <CAG2PGspq34wn2bAGyhR6B-XmmayadmL-v3_65y5LJWTWNHXkOQ@mail.gmail.com>
2016-11-05  7:27       ` Torsten Bögershausen
2016-11-05  7:42 ` Torsten Bögershausen
2016-11-08  8:12 ` Karthik Nayak
     [not found]   ` <CA+P7+xo+CJU_ng5OWX1y26+=QPCg6Zxpv_0opTAzsNqeFXAwng@mail.gmail.com>
2016-11-08  9:03     ` Karthik Nayak

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.