[PATCH v1 2/2] convert: add alias support for 'working-tree-encoding' attributes

2018-07-08 Thread larsxschneider
From: Lars Schneider In 107642fe26 ("convert: add 'working-tree-encoding' attribute", 2018-04-15) we added an attribute which defines the working tree encoding of a file. Some platforms might spell the name of a certain encoding differently or some users might want to use different encodings on

[PATCH v1 1/2] convert: refactor conversion driver config parsing

2018-07-08 Thread larsxschneider
From: Lars Schneider Refactor conversion driver config parsing to ease the parsing of new configs in a subsequent patch. No functional change intended. Signed-off-by: Lars Schneider --- convert.c | 64 +++ 1 file changed, 32 insertions(+),

[PATCH v1 0/2] convert: add alias support for 'working-tree-encoding' attributes

2018-07-08 Thread larsxschneider
efactoring with no functional change intended. The second patch is the actual change. Thanks, Lars [1] https://public-inbox.org/git/of5d40fe06.c18cd7cd-on002582b9.002b7a02-002582b9.002b7...@notes.na.collabserv.com/ Base Ref: master Web-Diff: https://github.com/larsxschneider/git/commit/0cbee9bd8

[PATCH v1] travis-ci: fix "skip_branch_tip_with_tag()" string comparison

2017-09-21 Thread larsxschneider
1064c99165) Diff on Web: https://github.com/larsxschneider/git/commit/6b532a42f0 Checkout:git fetch https://github.com/larsxschneider/git travisci/fix-skip-branch-v1 && git checkout 6b532a42f0 ci/lib-travisci.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[PATCH v1 1/2] travis-ci: move Travis CI code into dedicated scripts

2017-09-10 Thread larsxschneider
From: Lars Schneider Most of the Travis CI commands are in the '.travis.yml'. The yml format does not support functions and therefore code duplication is necessary to run commands across all builds. To fix this, add a library for common CI functions. Move all Travis CI

[PATCH v1 0/2] travis-ci: dedicated scripts + skip duplicated builds

2017-09-10 Thread larsxschneider
Cheers, Lars Base Ref: master Web-Diff: https://github.com/larsxschneider/git/commit/65ab003ec9 Checkout: git fetch https://github.com/larsxschneider/git travisci/move-into-ci-v1 && git checkout 65ab003ec9 Lars Schneider (2): travis-ci: move Travis CI code into dedicated scripts travis-ci:

[PATCH v1 2/2] travis-ci: skip a branch build if equal tag is present

2017-09-10 Thread larsxschneider
From: Lars Schneider If we push a branch and a tag pointing to the HEAD of this branch, then Travis CI would run the build twice. This wastes resources and slows the testing. Add a function to detect this situation and skip the build the branch if appropriate. Invoke

[PATCH v1] travis-ci: fix Perforce install on macOS

2017-01-21 Thread larsxschneider
ch to `maint` if it works without trouble on `next` (as it should!)? Thanks, Lars Notes: Base Commit: 787f75f056 (master) Diff on Web: https://github.com/larsxschneider/git/commit/ec7106339d Checkout:git fetch https://github.com/larsxschneider/git travisci/brew-perforce-fix-v1 &am

[PATCH v1] convert: add "status=delayed" to filter process protocol

2017-01-08 Thread larsxschneider
a...@gmail.com/ Notes: Base Commit: e05806da9e (master) Diff on Web: https://github.com/larsxschneider/git/commit/ea25a1834b Checkout:git fetch https://github.com/larsxschneider/git filter-process/delay-v1 && git checkout ea25a1834b Interdiff (filter-process/del

[PATCH v1] git-p4: add diff/merge properties to .gitattributes for GitLFS files

2016-12-18 Thread larsxschneider
mmands/command_track.go#L121 Signed-off-by: Lars Schneider <larsxschnei...@gmail.com> --- Notes: Base Commit: d1271bddd4 (v2.11.0) Diff on Web: https://github.com/git/git/compare/d1271bddd4...larsxschneider:e045b3d5c8 Checkout:git fetch https://github.com/larsxschneider/git git-p4/fix-lf

[PATCH v1] git-p4: fix git-p4.pathEncoding for removed files

2016-12-18 Thread larsxschneider
Signed-off-by: Lars Schneider <larsxschnei...@gmail.com> --- Notes: Base Commit: d1271bddd4 (v2.11.0) Diff on Web: https://github.com/git/git/compare/d1271bddd4...larsxschneider:05a82caa69 Checkout:git fetch https://github.com/larsxschneider/git git-p4/fix-path-encoding-v1 &am

[PATCH v1] t0021: fix flaky test

2016-12-18 Thread larsxschneider
stable. Signed-off-by: Lars Schneider <larsxschnei...@gmail.com> --- Notes: Base Commit: f8bf8f2a7b (next) Diff on Web: https://github.com/git/git/compare/f8bf8f2a7b...larsxschneider:9d88b66e03 Checkout:git fetch https://github.com/larsxschneider/git filter-process/fix-f

[PATCH v1] git-p4: fix empty file processing for large file system backend GitLFS

2016-12-04 Thread larsxschneider
pare/454cb6b...larsxschneider:b717fde Checkout:git fetch https://github.com/larsxschneider/git git-p4/empty-files-v1 && git checkout b717fde git-p4.py | 29 + t/t9824-git-p4-git-lfs.sh | 2 ++ 2 files changed, 19 insertions(+), 12 dele

[PATCH v1] git-p4: add config to retry p4 commands; retry 3 times by default

2016-12-04 Thread larsxschneider
//github.com/git/git/compare/454cb6b...larsxschneider:654c727 Checkout:git fetch https://github.com/larsxschneider/git git-p4/retries-v1 && git checkout 654c727 Documentation/git-p4.txt | 4 git-p4.py| 5 + 2 files changed, 9 insertions(+) diff --git a/Docu

[PATCH v1] travis-ci: update P4 to 16.2 and GitLFS to 1.5.2 in Linux build

2016-12-04 Thread larsxschneider
ep-update-v1.diff Checkout:git fetch https://github.com/larsxschneider/git travisci/dep-update-v1 && git checkout 421365c .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0b2ea5c3e2..3843967a69 100644 --- a/.travis.y

[PATCH v1] t0021: minor filter process test cleanup

2016-12-04 Thread larsxschneider
cleanup-test-v1.diff Checkout:git fetch https://github.com/larsxschneider/git filter-process/cleanup-test-v1 && git checkout c052a3d t/t0021-conversion.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/t/t0021-conversion.sh b/t/t0021-conversion

[PATCH] docs: warn about possible '=' in clean/smudge filter process values

2016-12-03 Thread larsxschneider
From: Lars Schneider A pathname value in a clean/smudge filter process "key=value" pair can contain the '=' character (introduced in edcc858). Make the user aware of this issue in the docs, add a corresponding test case, and fix the issue in filter process value parser

[PATCH v2] Makefile: set NO_OPENSSL on macOS by default

2016-11-10 Thread larsxschneider
From: Lars Schneider Apple removed the OpenSSL header files in macOS 10.11 and above. OpenSSL was deprecated since macOS 10.7. Set `NO_OPENSSL` and `APPLE_COMMON_CRYPTO` to `YesPlease` as default for macOS. It is possible to override this and use OpenSSL by defining

[PATCH v2 2/2] read-cache: make sure file handles are not inherited by child processes

2016-10-24 Thread larsxschneider
From: Lars Schneider This fixes "convert: add filter..process option" (edcc8581) on Windows. Consider the case of a file that requires filtering and is present in branch A but not in branch B. If A is the current HEAD and we checkout B then the following happens: 1.

[PATCH v2 0/2] Use CLOEXEC to avoid fd leaks

2016-10-24 Thread larsxschneider
From: Lars Schneider Use the CLOEXEC flag similar to 05d1ed61 to fix leaked file descriptors. This mini patch series is necessary to make the "ls/filter-process" topic work properly for Windows. Right now the topic generates test failures on Windows as reported by

[PATCH v2 1/2] sha1_file: open window into packfiles with CLOEXEC

2016-10-24 Thread larsxschneider
From: Lars Schneider All processes that the Git main process spawns inherit the open file descriptors of the main process. These leaked file descriptors can cause problems. Use the CLOEXEC flag similar to 05d1ed61 to fix the leaked file descriptors. Since

[PATCH v1 2/2] travis-ci: disable GIT_TEST_HTTPD for macOS

2016-10-16 Thread larsxschneider
From: Lars Schneider TravisCI changed their default macOS image from 10.10 to 10.11 [1]. Unfortunately the HTTPD tests do not run out of the box using the pre-installed Apache web server anymore. Therefore we enable these tests only for Linux and disable them for macOS.

[PATCH v1 0/2] Fix default macOS build locally and on Travis CI

2016-10-16 Thread larsxschneider
From: Lars Schneider Apple removed the OpenSSL header files in macOS and therefore Git does not build out of the box on macOS anymore. See previous discussion with Torsten here: http://public-inbox.org/git/565b3036.8000...@web.de/ This mini series makes Git build out

[PATCH v1 1/2] config.mak.in: set NO_OPENSSL and APPLE_COMMON_CRYPTO for macOS >10.11

2016-10-16 Thread larsxschneider
From: Lars Schneider Apple removed the OpenSSL header files in macOS 10.11 and above. OpenSSL was deprecated since macOS 10.7. Set `NO_OPENSSL` and `APPLE_COMMON_CRYPTO` to `YesPlease` as default for macOS. Make it possible to override this and use OpenSSL by defining

[PATCH v11 12/14] convert: prepare filter..process option

2016-10-16 Thread larsxschneider
From: Lars Schneider Refactor the existing 'single shot filter mechanism' and prepare the new 'long running filter mechanism'. Signed-off-by: Lars Schneider --- convert.c | 60 ++-- 1

[PATCH v11 14/14] contrib/long-running-filter: add long running filter example

2016-10-16 Thread larsxschneider
From: Lars Schneider Add a simple pass-thru filter as example implementation for the Git filter protocol version 2. See Documentation/gitattributes.txt, section "Filter Protocol" for more info. Signed-off-by: Lars Schneider ---

[PATCH v11 11/14] convert: make apply_filter() adhere to standard Git error handling

2016-10-16 Thread larsxschneider
From: Lars Schneider apply_filter() returns a boolean that tells the caller if it "did convert or did not convert". The variable `ret` was used throughout the function to track errors whereas `1` denoted success and `0` failure. This is unusual for the Git source where

[PATCH v11 10/14] pkt-line: add functions to read/write flush terminated packet streams

2016-10-16 Thread larsxschneider
From: Lars Schneider write_packetized_from_fd() and write_packetized_from_buf() write a stream of packets. All content packets use the maximal packet size except for the last one. After the last content packet a `flush` control packet is written.

[PATCH v11 13/14] convert: add filter..process option

2016-10-16 Thread larsxschneider
From: Lars Schneider Git's clean/smudge mechanism invokes an external filter process for every single blob that is affected by a filter. If Git filters a lot of blobs then the startup time of the external filter processes can become a significant part of the overall Git

[PATCH v11 06/14] pkt-line: extract set_packet_header()

2016-10-16 Thread larsxschneider
From: Lars Schneider Extracted set_packet_header() function converts an integer to a 4 byte hex string. Make this function locally available so that other pkt-line functions could use it. Signed-off-by: Lars Schneider Signed-off-by: Junio C

[PATCH v11 07/14] pkt-line: add packet_write_fmt_gently()

2016-10-16 Thread larsxschneider
From: Lars Schneider packet_write_fmt() would die in case of a write error even though for some callers an error would be acceptable. Add packet_write_fmt_gently() which writes a formatted pkt-line like packet_write_fmt() but does not die in case of an error. The

[PATCH v11 09/14] pkt-line: add packet_write_gently()

2016-10-16 Thread larsxschneider
From: Lars Schneider packet_write_fmt_gently() uses format_packet() which lets the caller only send string data via "%s". That means it cannot be used for arbitrary data that may contain NULs. Add packet_write_gently() which writes arbitrary data and does not die in

[PATCH v11 08/14] pkt-line: add packet_flush_gently()

2016-10-16 Thread larsxschneider
From: Lars Schneider packet_flush() would die in case of a write error even though for some callers an error would be acceptable. Add packet_flush_gently() which writes a pkt-line flush packet like packet_flush() but does not die in case of an error. The function is

[PATCH v11 03/14] run-command: move check_pipe() from write_or_die to run_command

2016-10-16 Thread larsxschneider
From: Lars Schneider Move check_pipe() to run_command and make it public. This is necessary to call the function from pkt-line in a subsequent patch. While at it, make async_exit() static to run_command.c as it is no longer used from outside. Signed-off-by: Lars

[PATCH v11 05/14] pkt-line: rename packet_write() to packet_write_fmt()

2016-10-16 Thread larsxschneider
From: Lars Schneider packet_write() should be called packet_write_fmt() because it is a printf-like function that takes a format string as first parameter. packet_write_fmt() should be used for text strings only. Arbitrary binary data should use a new packet_write()

[PATCH v11 04/14] run-command: add clean_on_exit_handler

2016-10-16 Thread larsxschneider
From: Lars Schneider Some processes might want to perform cleanup tasks before Git kills them due to the 'clean_on_exit' flag. Let's give them an interface for doing this. The feature is used in a subsequent patch. Please note, that the cleanup callback is not executed

[PATCH v11 01/14] convert: quote filter names in error messages

2016-10-16 Thread larsxschneider
From: Lars Schneider Git filter driver commands with spaces (e.g. `filter.sh foo`) are hard to read in error messages. Quote them to improve the readability. Signed-off-by: Lars Schneider Signed-off-by: Junio C Hamano ---

[PATCH v11 02/14] convert: modernize tests

2016-10-16 Thread larsxschneider
From: Lars Schneider Use `test_config` to set the config, check that files are empty with `test_must_be_empty`, compare files with `test_cmp`, and remove spaces after ">" and "<". Please note that the "rot13" filter configured in "setup" keeps using `git config`

[PATCH v11 00/14] Git filter protocol

2016-10-16 Thread larsxschneider
lished on web: https://github.com/larsxschneider/git/pull/15 Patches 1 and 2 are cleanups and not strictly necessary for the series. Patches 3 to 12 are required preparation. Patch 13 is the main patch. Patch 14 adds an example how to use the Git filter protocol in contrib. Thanks a lot to Jakub,

[PATCH v10 04/14] run-command: add clean_on_exit_handler

2016-10-08 Thread larsxschneider
From: Lars Schneider Some processes might want to perform cleanup tasks before Git kills them due to the 'clean_on_exit' flag. Let's give them an interface for doing this. The feature is used in a subsequent patch. Please note, that the cleanup callback is not executed

[PATCH v10 03/14] run-command: move check_pipe() from write_or_die to run_command

2016-10-08 Thread larsxschneider
From: Lars Schneider Move check_pipe() to run_command and make it public. This is necessary to call the function from pkt-line in a subsequent patch. While at it, make async_exit() static to run_command.c as it is no longer used from outside. Signed-off-by: Lars

[PATCH v10 09/14] pkt-line: add packet_write_gently()

2016-10-08 Thread larsxschneider
From: Lars Schneider packet_write_fmt_gently() uses format_packet() which lets the caller only send string data via "%s". That means it cannot be used for arbitrary data that may contain NULs. Add packet_write_gently() which writes arbitrary data and does not die in

[PATCH v10 05/14] pkt-line: rename packet_write() to packet_write_fmt()

2016-10-08 Thread larsxschneider
From: Lars Schneider packet_write() should be called packet_write_fmt() because it is a printf-like function that takes a format string as first parameter. packet_write_fmt() should be used for text strings only. Arbitrary binary data should use a new packet_write()

[PATCH v10 08/14] pkt-line: add packet_flush_gently()

2016-10-08 Thread larsxschneider
From: Lars Schneider packet_flush() would die in case of a write error even though for some callers an error would be acceptable. Add packet_flush_gently() which writes a pkt-line flush packet like packet_flush() but does not die in case of an error. The function is

[PATCH v10 07/14] pkt-line: add packet_write_fmt_gently()

2016-10-08 Thread larsxschneider
From: Lars Schneider packet_write_fmt() would die in case of a write error even though for some callers an error would be acceptable. Add packet_write_fmt_gently() which writes a formatted pkt-line like packet_write_fmt() but does not die in case of an error. The

[PATCH v10 12/14] convert: prepare filter..process option

2016-10-08 Thread larsxschneider
From: Lars Schneider Refactor the existing 'single shot filter mechanism' and prepare the new 'long running filter mechanism'. Signed-off-by: Lars Schneider --- convert.c | 60 ++-- 1

[PATCH v10 06/14] pkt-line: extract set_packet_header()

2016-10-08 Thread larsxschneider
From: Lars Schneider Extracted set_packet_header() function converts an integer to a 4 byte hex string. Make this function locally available so that other pkt-line functions could use it. Signed-off-by: Lars Schneider Signed-off-by: Junio C

[PATCH v10 10/14] pkt-line: add functions to read/write flush terminated packet streams

2016-10-08 Thread larsxschneider
From: Lars Schneider write_packetized_from_fd() and write_packetized_from_buf() write a stream of packets. All content packets use the maximal packet size except for the last one. After the last content packet a `flush` control packet is written.

[PATCH v10 14/14] contrib/long-running-filter: add long running filter example

2016-10-08 Thread larsxschneider
From: Lars Schneider Add a simple pass-thru filter as example implementation for the Git filter protocol version 2. See Documentation/gitattributes.txt, section "Filter Protocol" for more info. Signed-off-by: Lars Schneider ---

[PATCH v10 11/14] convert: make apply_filter() adhere to standard Git error handling

2016-10-08 Thread larsxschneider
From: Lars Schneider apply_filter() returns a boolean that tells the caller if it "did convert or did not convert". The variable `ret` was used throughout the function to track errors whereas `1` denoted success and `0` failure. This is unusual for the Git source where

[PATCH v10 13/14] convert: add filter..process option

2016-10-08 Thread larsxschneider
From: Lars Schneider Git's clean/smudge mechanism invokes an external filter process for every single blob that is affected by a filter. If Git filters a lot of blobs then the startup time of the external filter processes can become a significant part of the overall Git

[PATCH v10 00/14] Git filter protocol

2016-10-08 Thread larsxschneider
lished on web: https://github.com/larsxschneider/git/pull/14 Patches 1 and 2 are cleanups and not strictly necessary for the series. Patches 3 to 12 are required preparation. Patch 13 is the main patch. Patch 14 adds an example how to use the Git filter protocol in contrib. Thanks a lot to Jakub,

[PATCH v10 02/14] convert: modernize tests

2016-10-08 Thread larsxschneider
From: Lars Schneider Use `test_config` to set the config, check that files are empty with `test_must_be_empty`, compare files with `test_cmp`, and remove spaces after ">" and "<". Please note that the "rot13" filter configured in "setup" keeps using `git config`

[PATCH v10 01/14] convert: quote filter names in error messages

2016-10-08 Thread larsxschneider
From: Lars Schneider Git filter driver commands with spaces (e.g. `filter.sh foo`) are hard to read in error messages. Quote them to improve the readability. Signed-off-by: Lars Schneider Signed-off-by: Junio C Hamano ---

[PATCH v9 03/14] run-command: move check_pipe() from write_or_die to run_command

2016-10-04 Thread larsxschneider
From: Lars Schneider Move check_pipe() to run_command and make it public. This is necessary to call the function from pkt-line in a subsequent patch. While at it, make async_exit() static to run_command.c as it is no longer used from outside. Signed-off-by: Lars

[PATCH v9 04/14] run-command: add wait_on_exit

2016-10-04 Thread larsxschneider
From: Lars Schneider The flag 'clean_on_exit' kills child processes spawned by Git on exit. A hard kill like this might not be desired in all cases. Add 'wait_on_exit' which closes the child's stdin on Git exit and waits until the child process has terminated. The

[PATCH v9 14/14] contrib/long-running-filter: add long running filter example

2016-10-04 Thread larsxschneider
From: Lars Schneider Add a simple pass-thru filter as example implementation for the Git filter protocol version 2. See Documentation/gitattributes.txt, section "Filter Protocol" for more info. Signed-off-by: Lars Schneider ---

[PATCH v9 10/14] pkt-line: add functions to read/write flush terminated packet streams

2016-10-04 Thread larsxschneider
From: Lars Schneider write_packetized_from_fd() and write_packetized_from_buf() write a stream of packets. All content packets use the maximal packet size except for the last one. After the last content packet a `flush` control packet is written.

[PATCH v9 11/14] convert: make apply_filter() adhere to standard Git error handling

2016-10-04 Thread larsxschneider
From: Lars Schneider apply_filter() returns a boolean that tells the caller if it "did convert or did not convert". The variable `ret` was used throughout the function to track errors whereas `1` denoted success and `0` failure. This is unusual for the Git source where

[PATCH v9 08/14] pkt-line: add packet_flush_gently()

2016-10-04 Thread larsxschneider
From: Lars Schneider packet_flush() would die in case of a write error even though for some callers an error would be acceptable. Add packet_flush_gently() which writes a pkt-line flush packet like packet_flush() but does not die in case of an error. The function is

[PATCH v9 00/14] Git filter protocol

2016-10-04 Thread larsxschneider
lished on web: https://github.com/larsxschneider/git/pull/13 Patches 1 and 2 are cleanups and not strictly necessary for the series. Patches 3 to 12 are required preparation. Patch 13 is the main patch. Patch 14 adds an example how to use the Git filter protocol in contrib. Thanks a lot to Ramsay,

[PATCH v9 12/14] convert: prepare filter..process option

2016-10-04 Thread larsxschneider
From: Lars Schneider Refactor the existing 'single shot filter mechanism' and prepare the new 'long running filter mechanism'. Signed-off-by: Lars Schneider --- convert.c | 60 ++-- 1

[PATCH v9 01/14] convert: quote filter names in error messages

2016-10-04 Thread larsxschneider
From: Lars Schneider Git filter driver commands with spaces (e.g. `filter.sh foo`) are hard to read in error messages. Quote them to improve the readability. Signed-off-by: Lars Schneider Signed-off-by: Junio C Hamano ---

[PATCH v9 09/14] pkt-line: add packet_write_gently()

2016-10-04 Thread larsxschneider
From: Lars Schneider packet_write_fmt_gently() uses format_packet() which lets the caller only send string data via "%s". That means it cannot be used for arbitrary data that may contain NULs. Add packet_write_gently() which writes arbitrary data and does not die in

[PATCH v9 07/14] pkt-line: add packet_write_fmt_gently()

2016-10-04 Thread larsxschneider
From: Lars Schneider packet_write_fmt() would die in case of a write error even though for some callers an error would be acceptable. Add packet_write_fmt_gently() which writes a formatted pkt-line like packet_write_fmt() but does not die in case of an error. The

[PATCH v9 06/14] pkt-line: extract set_packet_header()

2016-10-04 Thread larsxschneider
From: Lars Schneider Extracted set_packet_header() function converts an integer to a 4 byte hex string. Make this function locally available so that other pkt-line functions could use it. Signed-off-by: Lars Schneider Signed-off-by: Junio C

[PATCH v9 02/14] convert: modernize tests

2016-10-04 Thread larsxschneider
From: Lars Schneider Use `test_config` to set the config, check that files are empty with `test_must_be_empty`, compare files with `test_cmp`, and remove spaces after ">" and "<". Please note that the "rot13" filter configured in "setup" keeps using `git config`

[PATCH v9 13/14] convert: add filter..process option

2016-10-04 Thread larsxschneider
From: Lars Schneider Git's clean/smudge mechanism invokes an external filter process for every single blob that is affected by a filter. If Git filters a lot of blobs then the startup time of the external filter processes can become a significant part of the overall Git

[PATCH v1] travis-ci: ask homebrew for the its path instead of hardcoding it

2016-09-21 Thread larsxschneider
From: Lars Schneider The TravisCI macOS build is broken because homebrew (a macOS depedency manager) changed its internal directory structure [1]. This is a problem because we modify the Perforce dependencies in the homebrew repository before installing them. Fix it by

[PATCH v8 05/11] pkt-line: add packet_flush_gently()

2016-09-20 Thread larsxschneider
From: Lars Schneider packet_flush() would die in case of a write error even though for some callers an error would be acceptable. Add packet_flush_gently() which writes a pkt-line flush packet like packet_flush() but does not die in case of an error. The function is

[PATCH v8 07/11] pkt-line: add functions to read/write flush terminated packet streams

2016-09-20 Thread larsxschneider
From: Lars Schneider write_packetized_from_fd() and write_packetized_from_buf() write a stream of packets. All content packets use the maximal packet size except for the last one. After the last content packet a `flush` control packet is written.

[PATCH v8 08/11] convert: quote filter names in error messages

2016-09-20 Thread larsxschneider
From: Lars Schneider Git filter driver commands with spaces (e.g. `filter.sh foo`) are hard to read in error messages. Quote them to improve the readability. Signed-off-by: Lars Schneider --- convert.c | 12 ++-- 1 file changed, 6

[PATCH v8 09/11] convert: modernize tests

2016-09-20 Thread larsxschneider
From: Lars Schneider Use `test_config` to set the config, check that files are empty with `test_must_be_empty`, compare files with `test_cmp`, and remove spaces after ">" and "<". Please note that the "rot13" filter configured in "setup" keeps using `git config`

[PATCH v8 11/11] convert: add filter..process option

2016-09-20 Thread larsxschneider
From: Lars Schneider Git's clean/smudge mechanism invokes an external filter process for every single blob that is affected by a filter. If Git filters a lot of blobs then the startup time of the external filter processes can become a significant part of the overall Git

[PATCH v8 10/11] convert: make apply_filter() adhere to standard Git error handling

2016-09-20 Thread larsxschneider
From: Lars Schneider apply_filter() returns a boolean that tells the caller if it "did convert or did not convert". The variable `ret` was used throughout the function to track errors whereas `1` denoted success and `0` failure. This is unusual for the Git source where

[PATCH v8 06/11] pkt-line: add packet_write_gently()

2016-09-20 Thread larsxschneider
From: Lars Schneider packet_write_fmt_gently() uses format_packet() which lets the caller only send string data via "%s". That means it cannot be used for arbitrary data that may contain NULs. Add packet_write_gently() which writes arbitrary data and does not die in

[PATCH v8 04/11] pkt-line: add packet_write_fmt_gently()

2016-09-20 Thread larsxschneider
From: Lars Schneider packet_write_fmt() would die in case of a write error even though for some callers an error would be acceptable. Add packet_write_fmt_gently() which writes a formatted pkt-line like packet_write_fmt() but does not die in case of an error. The

[PATCH v8 02/11] pkt-line: extract set_packet_header()

2016-09-20 Thread larsxschneider
From: Lars Schneider set_packet_header() converts an integer to a 4 byte hex string. Make this function locally available so that other pkt-line functions can use it. Signed-off-by: Lars Schneider --- pkt-line.c | 19 +-- 1

[PATCH v8 01/11] pkt-line: rename packet_write() to packet_write_fmt()

2016-09-20 Thread larsxschneider
From: Lars Schneider packet_write() should be called packet_write_fmt() as the string parameter can be formatted. Suggested-by: Junio C Hamano Signed-off-by: Lars Schneider --- builtin/archive.c| 4 ++--

[PATCH v8 03/11] run-command: move check_pipe() from write_or_die to run_command

2016-09-20 Thread larsxschneider
From: Lars Schneider Move check_pipe() to run_command and make it public. This is necessary to call the function from pkt-line in a subsequent patch. Signed-off-by: Lars Schneider --- run-command.c | 13 + run-command.h | 2 ++

[PATCH v7 10/10] convert: add filter..process option

2016-09-08 Thread larsxschneider
From: Lars Schneider Git's clean/smudge mechanism invokes an external filter process for every single blob that is affected by a filter. If Git filters a lot of blobs then the startup time of the external filter processes can become a significant part of the overall Git

[PATCH v7 09/10] convert: make apply_filter() adhere to standard Git error handling

2016-09-08 Thread larsxschneider
From: Lars Schneider apply_filter() returns a boolean that tells the caller if it "did convert or did not convert". The variable `ret` was used throughout the function to track errors whereas `1` denoted success and `0` failure. This is unusual for the Git source where

[PATCH v7 04/10] pkt-line: add packet_flush_gently()

2016-09-08 Thread larsxschneider
From: Lars Schneider packet_flush() would die in case of a write error even though for some callers an error would be acceptable. Add packet_flush_gently() which writes a pkt-line flush packet and returns `0` for success and `-1` for failure. Signed-off-by: Lars

[PATCH v7 07/10] convert: quote filter names in error messages

2016-09-08 Thread larsxschneider
From: Lars Schneider Git filter driver commands with spaces (e.g. `filter.sh foo`) are hard to read in error messages. Quote them to improve the readability. Signed-off-by: Lars Schneider --- convert.c | 12 ++-- 1 file changed, 6

[PATCH v7 05/10] pkt-line: add packet_write_gently()

2016-09-08 Thread larsxschneider
From: Lars Schneider packet_write_fmt_gently() uses format_packet() which lets the caller only send string data via "%s". That means it cannot be used for arbitrary data that may contain NULs. Add packet_write_gently() which writes arbitrary data and returns `0` for

[PATCH v7 08/10] convert: modernize tests

2016-09-08 Thread larsxschneider
From: Lars Schneider Use `test_config` to set the config, check that files are empty with `test_must_be_empty`, compare files with `test_cmp`, and remove spaces after ">" and "<". Please note that the "rot13" filter configured in "setup" keeps using `git config`

[PATCH v7 06/10] pkt-line: add functions to read/write flush terminated packet streams

2016-09-08 Thread larsxschneider
From: Lars Schneider write_packetized_from_fd() and write_packetized_from_buf() write a stream of packets. All content packets use the maximal packet size except for the last one. After the last content packet a `flush` control packet is written.

[PATCH v7 02/10] pkt-line: extract set_packet_header()

2016-09-08 Thread larsxschneider
From: Lars Schneider set_packet_header() converts an integer to a 4 byte hex string. Make this function locally available so that other pkt-line functions can use it. Signed-off-by: Lars Schneider --- pkt-line.c | 19 +-- 1

[PATCH v7 01/10] pkt-line: rename packet_write() to packet_write_fmt()

2016-09-08 Thread larsxschneider
From: Lars Schneider packet_write() should be called packet_write_fmt() as the string parameter can be formatted. Suggested-by: Junio C Hamano Signed-off-by: Lars Schneider --- builtin/archive.c| 4 ++--

[PATCH v7 03/10] pkt-line: add packet_write_fmt_gently()

2016-09-08 Thread larsxschneider
From: Lars Schneider packet_write_fmt() would die in case of a write error even though for some callers an error would be acceptable. Add packet_write_fmt_gently() which writes a formatted pkt-line and returns `0` for success and `-1` for an error. Signed-off-by: Lars

[PATCH v7 00/10] Git filter protocol

2016-09-08 Thread larsxschneider
lished on web: https://github.com/larsxschneider/git/pull/11 Thanks a lot to Stefan, Junio, Jakub (Narebski and Keller), Peff, and Torsten for very helpful reviews, Lars ## Major changes since v6 * series rebased to Git v2.10.0 * simplified and improved multi-packet test * v2 filter takes prec

[PATCH v1 2/2] read-cache: make sure file handles are not inherited by child processes

2016-09-05 Thread larsxschneider
From: Lars Schneider This fix prepares a series with the goal to avoid launching a new clean/smudge filter process for each file that is filtered. A new long running filter process is introduced that is used to filter all files in a single Git invocation. Consider the

[PATCH v1 1/2] sha1_file: open window into packfiles with CLOEXEC

2016-09-05 Thread larsxschneider
From: Lars Schneider All processes that the Git main process spawns inherit the open file descriptors of the main process. These leaked file descriptors can cause problems. Use the CLOEXEC flag similar to 05d1ed61 to fix the leaked file descriptors. Signed-off-by:

[PATCH v1 0/2] Use CLOEXEC to avoid fd leaks

2016-09-05 Thread larsxschneider
From: Lars Schneider Use the CLOEXEC flag similar to 05d1ed61 to fix leaked file descriptors. Patch 1/2 was contemplated by Junio here: http://public-inbox.org/git/xmqq37lnbbpk@gitster.mtv.corp.google.com/ I followed Torsten's advice and renamed `git_open_noatime`

[PATCH v1] pack-protocol: fix maximum pkt-line size

2016-08-29 Thread larsxschneider
From: Lars Schneider According to LARGE_PACKET_MAX in pkt-line.h the maximal length of a pkt-line packet is 65520 bytes. The pkt-line header takes 4 bytes and therefore the pkt-line data component must not exceed 65516 bytes. Signed-off-by: Lars Schneider

[PATCH v6 07/13] pack-protocol: fix maximum pkt-line size

2016-08-25 Thread larsxschneider
From: Lars Schneider According to LARGE_PACKET_MAX in pkt-line.h the maximal length of a pkt-line packet is 65520 bytes. The pkt-line header takes 4 bytes and therefore the pkt-line data component must not exceed 65516 bytes. Signed-off-by: Lars Schneider

[PATCH v6 04/13] pkt-line: add packet_flush_gently()

2016-08-25 Thread larsxschneider
From: Lars Schneider packet_flush() would die in case of a write error even though for some callers an error would be acceptable. Add packet_flush_gently() which writes a pkt-line flush packet and returns `0` for success and `-1` for failure. Signed-off-by: Lars

[PATCH v6 08/13] convert: quote filter names in error messages

2016-08-25 Thread larsxschneider
From: Lars Schneider Git filter driver commands with spaces (e.g. `filter.sh foo`) are hard to read in error messages. Quote them to improve the readability. Signed-off-by: Lars Schneider --- convert.c | 12 ++-- 1 file changed, 6

[PATCH v6 09/13] convert: modernize tests

2016-08-25 Thread larsxschneider
From: Lars Schneider Use `test_config` to set the config, check that files are empty with `test_must_be_empty`, compare files with `test_cmp`, and remove spaces after ">" and "<". Signed-off-by: Lars Schneider --- t/t0021-conversion.sh | 62

[PATCH v6 00/13] Git filter protocol

2016-08-25 Thread larsxschneider
lished on web: https://github.com/larsxschneider/git/pull/10 Thanks a lot for your reviews, Lars ## Changes since v5 ### Peff * http://public-inbox.org/git/20160810131541.ovpvgwdxjibae5gy%40sigill.intra.peff.net/ * drop patch "pkt-line: add `gentle` parameter to format_packet()"

  1   2   3   4   >