Bug report : bad filter-branch (OSX only)

2015-04-26 Thread Olivier ROLAND
Hello, Seem to be a bug. OSX 10.10.3 git 2.3.6 HFS+ case-sensitive How to reproduce : Step 1 : git clone https://github.com/begeric/FastParsers.git Step 2 : cd FastParsers/ Step 3 : git filter-branch --env-filter 'if [ 0 = 1 ]; then echo 0; fi' -- --all Result on OSX : Rewrite

[PATCH v5 2/5] setup: sanity check file size in read_gitfile_gently

2015-04-26 Thread Erik Elfström
read_gitfile_gently will allocate a buffer to fit the entire file that should be read. Add a sanity check of the file size before opening to avoid allocating a potentially huge amount of memory if we come across a large file that someone happened to name .git. The limit is set to a sufficiently

[PATCH v5 4/5] p7300: add performance tests for clean

2015-04-26 Thread Erik Elfström
The tests are run in dry-run mode to avoid having to restore the test directories for each timed iteration. Using dry-run is an acceptable compromise since we are mostly interested in the initial computation of what to clean and not so much in the cleaning it self. Signed-off-by: Erik Elfström

[PATCH v5 3/5] t7300: add tests to document behavior of clean and nested git

2015-04-26 Thread Erik Elfström
Signed-off-by: Erik Elfström erik.elfst...@gmail.com --- t/t7300-clean.sh | 128 +++ 1 file changed, 128 insertions(+) diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh index 99be5d9..11f3a6d 100755 --- a/t/t7300-clean.sh +++ b/t/t7300-clean.sh

[PATCH v5 1/5] setup: add gentle version of read_gitfile

2015-04-26 Thread Erik Elfström
read_gitfile will die on most error cases. This makes it unsuitable for speculative calls. Extract the core logic and provide a gentle version that returns NULL on failure. The first usecase of the new gentle version will be to probe for submodules during git clean. Helped-by: Junio C Hamano

[PATCH v5 5/5] clean: improve performance when removing lots of directories

2015-04-26 Thread Erik Elfström
git clean uses resolve_gitlink_ref() to check for the presence of nested git repositories, but it has the drawback of creating a ref_cache entry for every directory that should potentially be cleaned. The linear search through the ref_cache list causes a massive performance hit for large number of

[PATCH v5 0/5] Improving performance of git clean

2015-04-26 Thread Erik Elfström
Changes in v5: * Added defines for read_gitfile_gently error codes. This was a silly mistake, sorry about that. Erik Elfström (5): setup: add gentle version of read_gitfile setup: sanity check file size in read_gitfile_gently t7300: add tests to document behavior of clean and nested git

[PATCH/RFC] blame: CRLF in the working tree and LF in the repo

2015-04-26 Thread Torsten Bögershausen
A typicall setup under Windows: core.eol is CRLF and a file is marked as text in .gitattributes. After 4d4813a5 git blame no longer works as expected, every line is annotated as Not Committed Yet, even though the working directory is clean. commit 4d4813a5 removed the conversion in blame.c for

Re: git-p4 Question

2015-04-26 Thread Luke Diamand
On 24/04/15 15:36, FusionX86 wrote: I get an error if I misspell part of the path. For example, if I type //depot/maain instead of //depot/main I will get the no such files message you indicated. BUT using incorrect case like //depot/main instead of //depot/Main doesn't return any error, but

Re: [PATCH v3 0/3] Improve robustness of putty detection

2015-04-26 Thread Junio C Hamano
brian m. carlson sand...@crustytoothpaste.net writes: While I was adding tests, I noticed that we had a broken test due to the use of single quotes within a test, which resulted in the test always being skipped. Good eyes. While fixing the test is necessary, we should also be able to improve

Question about how git determines the minimum packfile for a push.

2015-04-26 Thread Brad Litterell
Hi, I'm using git with a submodule containing a (large) binary toolchain where I updated the version from GCC-4.7 to 4.8. When I added 4.8 I deleted 4.7 and now want to add 4.7 back to the HEAD. As shown in the tree objects below, the 4.7 bits are still in the repository (as expected), but

Re: [PATCH v2 00/16] Convert parts of refs.c to struct object_id

2015-04-26 Thread Michael Haggerty
On 04/23/2015 01:24 AM, brian m. carlson wrote: This is a conversion of parts of refs.c to use struct object_id. refs.c, and the for_each_ref series of functions explicitly, is the source for many instances of object IDs in the codebase. Therefore, it makes sense to convert this series of

Re: [PATCH/RFC] blame: CRLF in the working tree and LF in the repo

2015-04-26 Thread Eric Sunshine
On Sun, Apr 26, 2015 at 8:02 AM, Torsten Bögershausen tbo...@web.de wrote: A typicall setup under Windows: s/typicall/typical/ core.eol is CRLF and a file is marked as text in .gitattributes. After 4d4813a5 git blame no longer works as expected, every line is annotated as Not Committed Yet,

[PATCH v3 3/3] connect: improve check for plink to reduce false positives

2015-04-26 Thread brian m. carlson
The git_connect function has code to handle plink and tortoiseplink specially, as they require different command line arguments from OpenSSH (-P instead of -p for ports; tortoiseplink additionally requires -batch). However, the match was done by checking for plink anywhere in the string, which

[PATCH v3 0/3] Improve robustness of putty detection

2015-04-26 Thread brian m. carlson
This series improves detection of plink (the putty utility). While I was adding tests, I noticed that we had a broken test due to the use of single quotes within a test, which resulted in the test always being skipped. Therefore, nobody noticed that the test was actually broken. brian m.

[PATCH v3 2/3] t5601: fix quotation error leading to skipped tests

2015-04-26 Thread brian m. carlson
One of the tests in t5601 used single quotes to delimit an argument containing spaces. However, this caused test_expect_success to be passed three arguments instead of two, which in turn caused the test name to be treated as a prerequisite instead of a test name. As there was no prerequisite

[PATCH v3 1/3] connect: simplify SSH connection code path

2015-04-26 Thread brian m. carlson
The code path used in git_connect pushed the majority of the SSH connection code into an else block, even though the if block returns. Simplify the code by eliminating the else block, as it is unneeded. Signed-off-by: Jeff King p...@peff.net Signed-off-by: brian m. carlson

[PATCH RFC] add: Do not open editor if patch is empty

2015-04-26 Thread Alexander Kuleshov
If we'll run 'git add -e path' on a path which has no difference with the current index, empty editor will open. This patch prevents this behaviour and checks that patch is not empty before an editor with patch will be opened. Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com ---

Re: [PATCH RFC] add: Do not open editor if patch is empty

2015-04-26 Thread Eric Sunshine
On Sun, Apr 26, 2015 at 1:03 PM, Alexander Kuleshov kuleshovm...@gmail.com wrote: If we'll run 'git add -e path' on a path which has no difference with the current index, empty editor will open. This patch prevents this behaviour and checks that patch is not empty before an editor with patch

Re: [PATCH v2 2/2] connect: improve check for plink to reduce false positives

2015-04-26 Thread brian m. carlson
On Sat, Apr 25, 2015 at 06:03:22PM +0200, Torsten Bögershausen wrote: (I'm not sute if the commit message describes the problem deep enough for readers which are not familar with all the details of the original report): A feature implemented for Windows may break things for e.g. Linux users)

Re: Question about how git determines the minimum packfile for a push.

2015-04-26 Thread Junio C Hamano
On Sun, Apr 26, 2015 at 5:41 PM, Brad Litterell b...@evidence.com wrote: Is it possible git is not computing the delta correctly? Or does git only look at the top-level commit objects to figure out what to include in the push packfile? We walk the commit graph backwards to discover the common

Re: [PATCH/RFC] blame: CRLF in the working tree and LF in the repo

2015-04-26 Thread Junio C Hamano
Torsten Bögershausen tbo...@web.de writes: Although the intention of 4d4813a5 is good, it breaks the usual EOL-handling for Windows. Until we have a better solution, we suggest to revert it. That makes it sound like you are proposing to rob Peter to pay Paul, but that is not how we do things

Re: [PATCH/RFC] blame: CRLF in the working tree and LF in the repo

2015-04-26 Thread Stepan Kasal
Hello, thank you Torsten for the patch [I'm the reporter, but could not do it myself] -test_expect_success 'blaming files with CRLF newlines' ' +test_expect_failure 'blaming files with CRLF newlines in repo, core.autoclrf=input' ' Shouldn't the old test be rather removed? It deals with an