Re: [PATCH v2] log -G: Ignore binary files

2018-11-28 Thread Junio C Hamano
Junio C Hamano writes: >> +test_expect_success 'log -G ignores binary files' ' >> +git checkout --orphan orphan1 && >> +printf "a\0a" >data.bin && >> +git add data.bin && >> +git commit -m "mess

Re: [PATCH v2] log -G: Ignore binary files

2018-11-28 Thread Junio C Hamano
Thomas Braun writes: > Subject: Re: [PATCH v2] log -G: Ignore binary files s/Ig/ig/; (will locally munge--this alone is no reason to reroll). The code changes looked sensible. > diff --git a/t/t4209-log-pickaxe.sh b/t/t4209-log-pickaxe.sh > index 844df760f7..5c3e2a16b2 100755 > -

Re: [PATCH v2] log -G: Ignore binary files

2018-11-28 Thread Ævar Arnfjörð Bjarmason
On Wed, Nov 28 2018, Thomas Braun wrote: Looks much better this time around. > The -G option of log looks for the differences whose patch text > contains added/removed lines that match regex. > > As the concept of patch text only makes sense for text files, we need to > igno

[PATCH v2] log -G: Ignore binary files

2018-11-28 Thread Thomas Braun
The -G option of log looks for the differences whose patch text contains added/removed lines that match regex. As the concept of patch text only makes sense for text files, we need to ignore binary files when searching with -G as well. The -S option of log looks for differences that changes

Re: [PATCH v1 1/2] log -G: Ignore binary files

2018-11-28 Thread Thomas Braun
> Ævar Arnfjörð Bjarmason hat am 22. November 2018 um 11:16 > geschrieben: [...] > > > > +test_expect_success 'log -G ignores binary files' ' > > + rm -rf .git && > > + git init && > > + printf "a\0b" >data.bin && &

Re: [PATCH v1 2/2] log -S: Add test which searches in binary files

2018-11-28 Thread Thomas Braun
e pointer. I've updated the commit message. > > diff --git a/t/t4209-log-pickaxe.sh b/t/t4209-log-pickaxe.sh > > index 42cc8afd8b..d430f6f2f9 100755 > > --- a/t/t4209-log-pickaxe.sh > > +++ b/t/t4209-log-pickaxe.sh > > @@ -128,4 +128,15 @@ test_expect_success 'log -G l

Re: [PATCH v1 1/2] log -G: Ignore binary files

2018-11-28 Thread Thomas Braun
t; >> contains added/removed lines that match regex. > >> > >> The concept of differences only makes sense for text files, therefore > >> we need to ignore binary files when searching with -G as well. > > > > What about partial text/partial binary files?

Re: [PATCH v1 2/2] log -S: Add test which searches in binary files

2018-11-28 Thread Thomas Braun
etion) > > in a file. > > > > Add a test to ensure that we keep looking into binary files with -S > > as changing that would break backwards compatibility in unexpected ways. > > > > Signed-off-by: Thomas Braun > > --- > > t/t4209-log-pickaxe.sh |

Re: [PATCH v1 1/2] log -G: Ignore binary files

2018-11-28 Thread Thomas Braun
> Ævar Arnfjörð Bjarmason hat am 22. November 2018 um 11:16 > geschrieben: [...] > > > > +test_expect_success 'log -G ignores binary files' ' > > + rm -rf .git && > > + git init && > > + printf "a\0b" >data.bin && &

Re: [PATCH v1 1/2] log -G: Ignore binary files

2018-11-28 Thread Thomas Braun
; DIFF_PICKAXE_KIND_G) && > > + ((!textconv_one && diff_filespec_is_binary(o->repo, p->one)) || > > +(!textconv_two && diff_filespec_is_binary(o->repo, p->two > > + return 0; > > If the user passes "-a&qu

Re: [PATCH v1 1/2] log -G: Ignore binary files

2018-11-28 Thread Thomas Braun
only makes sense for text files, therefore > > we need to ignore binary files when searching with -G as well. > > > > Signed-off-by: Thomas Braun > > --- > > Documentation/gitdiffcore.txt | 2 +- > > diffcore-pickaxe.c| 5 + > >

Re: [PATCH v1 1/2] log -G: Ignore binary files

2018-11-26 Thread Junio C Hamano
iles, therefore >> we need to ignore binary files when searching with -G as well. > > What about partial text/partial binary files? Good point. You'd use "-a" (or "--text") to tell the diff machinery to treat the contents as text, and the new logic must pay attention to that command line option.

Re: [PATCH v1 1/2] log -G: Ignore binary files

2018-11-26 Thread Stefan Beller
On Wed, Nov 21, 2018 at 1:08 PM Thomas Braun wrote: > > The -G option of log looks for the differences whose patch text > contains added/removed lines that match regex. > > The concept of differences only makes sense for text files, therefore > we need to ignore binary fi

Re: [PATCH v1 1/2] log -G: Ignore binary files

2018-11-23 Thread Junio C Hamano
Jeff King writes: >> +if ((o->pickaxe_opts & DIFF_PICKAXE_KIND_G) && >> +((!textconv_one && diff_filespec_is_binary(o->repo, p->one)) || >> + (!textconv_two && diff_filespec_is_binary(o->repo, p->two >>

Re: [PATCH v1 2/2] log -S: Add test which searches in binary files

2018-11-23 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > On Wed, Nov 21 2018, Thomas Braun wrote: > >> The -S option of log looks for differences that changes the >> number of occurrences of the specified string (i.e. addition/deletion) >> in a file. >> > ... > This should just be part of 1/2 since the behavior is

Re: [PATCH v1 1/2] log -G: Ignore binary files

2018-11-22 Thread Jeff King
On Thu, Nov 22, 2018 at 11:16:38AM +0100, Ævar Arnfjörð Bjarmason wrote: > > +test_expect_success 'log -G looks into binary files with textconv filter' ' > > + rm -rf .git && > > + git init && > > + echo "* diff=bin" > .gitattributes

Re: [PATCH v1 1/2] log -G: Ignore binary files

2018-11-22 Thread Jeff King
> + (!textconv_two && diff_filespec_is_binary(o->repo, p->two > + return 0; If the user passes "-a" to treat binary files as text, we should probably skip the binary check. I think we'd need to check "o->flags.text" here. > d

Re: [PATCH v1 1/2] log -G: Ignore binary files

2018-11-22 Thread Ævar Arnfjörð Bjarmason
> On Wed, Nov 21 2018, Thomas Braun wrote: > The -G option of log looks for the differences whose patch text > contains added/removed lines that match regex. > > The concept of differences only makes sense for text files, therefore > we need to ignore binary files when searchin

Re: [PATCH v1 2/2] log -S: Add test which searches in binary files

2018-11-22 Thread Ævar Arnfjörð Bjarmason
On Wed, Nov 21 2018, Thomas Braun wrote: > The -S option of log looks for differences that changes the > number of occurrences of the specified string (i.e. addition/deletion) > in a file. > > Add a test to ensure that we keep looking into binary files with -S > as changin

Re: [PATCH v1 2/2] log -S: Add test which searches in binary files

2018-11-21 Thread Junio C Hamano
/t4209-log-pickaxe.sh > @@ -128,4 +128,15 @@ test_expect_success 'log -G looks into binary files with > textconv filter' ' > test_cmp actual expected > ' > > +test_expect_success 'log -S looks into binary files' ' > + rm -rf .git && > + git

Re: [PATCH v1 1/2] log -G: Ignore binary files

2018-11-21 Thread Junio C Hamano
Thomas Braun writes: > The -G option of log looks for the differences whose patch text > contains added/removed lines that match regex. > > The concept of differences only makes sense for text files, therefore > we need to ignore binary files when searching with -G as well.

[PATCH v1 2/2] log -S: Add test which searches in binary files

2018-11-21 Thread Thomas Braun
The -S option of log looks for differences that changes the number of occurrences of the specified string (i.e. addition/deletion) in a file. Add a test to ensure that we keep looking into binary files with -S as changing that would break backwards compatibility in unexpected ways. Signed-off

[PATCH 0/2] Teach log -G to ignore binary files

2018-11-21 Thread Thomas Braun
Based on the previous discussion in [1] I've prepared patches which teach log -G to ignore binary files. log -S keeps its behaviour but got a test to ensure that. Feedback welcome! [1]: https://public-inbox.org/git/7a0992eb-adb9-a7a1-cfaa-3384bc4d3...@virtuell-zuhause.de/ Thomas Braun (2

[PATCH v1 1/2] log -G: Ignore binary files

2018-11-21 Thread Thomas Braun
The -G option of log looks for the differences whose patch text contains added/removed lines that match regex. The concept of differences only makes sense for text files, therefore we need to ignore binary files when searching with -G as well. Signed-off-by: Thomas Braun --- Documentation

[PATCH 0/2] Teach log -G to ignore binary files

2018-11-21 Thread Thomas Braun
Based on the previous discussion in [1] I've prepared patches which teach log -G to ignore binary files. log -S keeps its behaviour but got a test to ensure that. Feedback welcome! [1]: https://public-inbox.org/git/7a0992eb-adb9-a7a1-cfaa-3384bc4d3...@virtuell-zuhause.de/ PS

RE: [Question] Signature calculation ignoring parts of binary files

2018-09-13 Thread Randall S. Becker
On September 13, 2018 1:52 PM, Junio C Hamano wrote: > Junio C Hamano writes: > > > "Randall S. Becker" writes: > > > >> The scenario is slightly different. > >> 1. Person A gives me a new binary file-1 with fingerprint A1. This > >> goes into git unchanged. > >> 2. Person B gives me binary

Re: [Question] Signature calculation ignoring parts of binary files

2018-09-13 Thread Junio C Hamano
Junio C Hamano writes: > "Randall S. Becker" writes: > >> The scenario is slightly different. >> 1. Person A gives me a new binary file-1 with fingerprint A1. This goes into >> git unchanged. >> 2. Person B gives me binary file-2 with fingerprint B2. This does not go >> into git yet. >> 3. We

RE: [Question] Signature calculation ignoring parts of binary files

2018-09-13 Thread Randall S. Becker
On September 13, 2018 11:03 AM, Junio C Hamano wrote: > "Randall S. Becker" writes: > > > The scenario is slightly different. > > 1. Person A gives me a new binary file-1 with fingerprint A1. This > > goes into git unchanged. > > 2. Person B gives me binary file-2 with fingerprint B2. This does

Re: [Question] Signature calculation ignoring parts of binary files

2018-09-13 Thread Junio C Hamano
"Randall S. Becker" writes: > The scenario is slightly different. > 1. Person A gives me a new binary file-1 with fingerprint A1. This goes into > git unchanged. > 2. Person B gives me binary file-2 with fingerprint B2. This does not go > into git yet. > 3. We attempt a git diff between the

RE: [Question] Signature calculation ignoring parts of binary files

2018-09-13 Thread Randall S. Becker
On September 12, 2018 7:00 PM, Junio C Hamano wrote: > "Randall S. Becker" writes: > > >> author is important to our process. My objective is to keep the > >> original file 100% exact as supplied and then ignore any changes to > >> the metadata that I don't care about (like Creator) if the

Re: [Question] Signature calculation ignoring parts of binary files

2018-09-12 Thread Junio C Hamano
"Randall S. Becker" writes: >> author is important to our process. My objective is to keep the original file >> 100% exact as supplied and then ignore any changes to the metadata that I >> don't care about (like Creator) if the remainder of the file is the same. That will *not* work. If person

RE: [Question] Signature calculation ignoring parts of binary files

2018-09-12 Thread Randall S. Becker
On September 12, 2018 4:54 PM, I wrote: > On September 12, 2018 4:48 PM, Johannes Sixt wrote: > > Am 12.09.18 um 21:16 schrieb Randall S. Becker: > > > I feel really bad asking this, and I should know the answer, and yet. > > > > > > I have a binary file that needs to go into a repo intact

RE: [Question] Signature calculation ignoring parts of binary files

2018-09-12 Thread Randall S. Becker
> -Original Message- > From: git-ow...@vger.kernel.org On Behalf > Of Johannes Sixt > Sent: September 12, 2018 4:48 PM > To: Randall S. Becker > Cc: git@vger.kernel.org > Subject: Re: [Question] Signature calculation ignoring parts of binary files > > A

Re: [Question] Signature calculation ignoring parts of binary files

2018-09-12 Thread Johannes Sixt
Am 12.09.18 um 21:16 schrieb Randall S. Becker: I feel really bad asking this, and I should know the answer, and yet. I have a binary file that needs to go into a repo intact (unchanged). I also have a program that interprets the contents, like a textconv, that can output the relevant portions

[Question] Signature calculation ignoring parts of binary files

2018-09-12 Thread Randall S. Becker
I feel really bad asking this, and I should know the answer, and yet. I have a binary file that needs to go into a repo intact (unchanged). I also have a program that interprets the contents, like a textconv, that can output the relevant portions of the file in whatever format I like - used for

Re: How to speedup git clone for big binary files (disable delta compression)

2018-07-18 Thread Jeff King
On Thu, Jul 19, 2018 at 12:05:00AM +0200, René Scheibe wrote: > Code: > - > #!/bin/bash > > # setup repository > git init --quiet repo > cd repo > > echo '*.bin binary -delta' > .gitattributes > git add .gitattributes > git

How to speedup git clone for big binary files (disable delta compression)

2018-07-18 Thread René Scheibe
Hi, I was wondering why "git clone" seems to not respect "-delta" in .gitattributes. *Reproduction* I prepared a test repository with: - git v2.17.1 - .gitattributes containing "*.bin binary -delta" - 10 commits with a 10 MB random binary file Code:

Re: Add option to git to ignore binary files unless force added

2018-05-18 Thread Anmol Sethi
<m...@anmol.io> wrote: >> This definitely works but it would be more clean to just have git ignore the >> binary files from the get go. >> > > Sure it'd be more convenient for you. But there are loads of possible > combinations, and the idea of what constitutes unwa

Re: Add option to git to ignore binary files unless force added

2018-05-18 Thread Jacob Keller
On Fri, May 18, 2018 at 4:31 AM, Anmol Sethi <m...@anmol.io> wrote: > This definitely works but it would be more clean to just have git ignore the > binary files from the get go. > Sure it'd be more convenient for you. But there are loads of possible combinations, and t

RE: Add option to git to ignore binary files unless force added

2018-05-18 Thread Randall S. Becker
6, 2018 11:18 PM, Jacob Keller > >> On Wed, May 16, 2018 at 5:45 PM, Anmol Sethi <m...@anmol.io> wrote: > >>> I think it’d be great to have an option to have git ignore binary > >>> files. My > >> repositories are always source only, committing a bina

Re: Add option to git to ignore binary files unless force added

2018-05-18 Thread Anmol Sethi
This definitely works but it would be more clean to just have git ignore the binary files from the get go. > On May 16, 2018, at 11:18 PM, Jacob Keller <jacob.kel...@gmail.com> wrote: > > On Wed, May 16, 2018 at 5:45 PM, Anmol Sethi <m...@anmol.io> wrote: >> I

Re: Add option to git to ignore binary files unless force added

2018-05-18 Thread Anmol Sethi
.@anmol.io> wrote: >>> I think it’d be great to have an option to have git ignore binary files. My >> repositories are always source only, committing a binary is always a mistake. >> At the moment, I have to configure the .gitignore to ignore every binary file >> and that

RE: Add option to git to ignore binary files unless force added

2018-05-17 Thread Randall S. Becker
On May 16, 2018 11:18 PM, Jacob Keller > On Wed, May 16, 2018 at 5:45 PM, Anmol Sethi <m...@anmol.io> wrote: > > I think it’d be great to have an option to have git ignore binary files. My > repositories are always source only, committing a binary is always a mistake. >

Re: Add option to git to ignore binary files unless force added

2018-05-16 Thread Jacob Keller
On Wed, May 16, 2018 at 5:45 PM, Anmol Sethi <m...@anmol.io> wrote: > I think it’d be great to have an option to have git ignore binary files. My > repositories are always source only, committing a binary is always a mistake. > At the moment, I have to configure the .gitignore

Add option to git to ignore binary files unless force added

2018-05-16 Thread Anmol Sethi
I think it’d be great to have an option to have git ignore binary files. My repositories are always source only, committing a binary is always a mistake. At the moment, I have to configure the .gitignore to ignore every binary file and that gets tedious. Having git ignore all binary files would

Re: Binary files

2017-07-21 Thread Igor Djordjevic
On 20/07/2017 22:40, Junio C Hamano wrote: > Igor Djordjevic <igor.d.djordje...@gmail.com> writes: >> On 20/07/2017 09:41, Volodymyr Sendetskyi wrote: >>> It is known, that git handles badly storing binary files in its >>> repositories at all. >>> This is

Re: Binary files

2017-07-20 Thread Junio C Hamano
Igor Djordjevic <igor.d.djordje...@gmail.com> writes: > On 20/07/2017 09:41, Volodymyr Sendetskyi wrote: >> It is known, that git handles badly storing binary files in its >> repositories at all. >> This is especially about large files: even without any changes to &

Re: Binary files

2017-07-20 Thread Igor Djordjevic
Hi Volodymyr, On 20/07/2017 09:41, Volodymyr Sendetskyi wrote: > It is known, that git handles badly storing binary files in its > repositories at all. > This is especially about large files: even without any changes to > these files, their copies are snapshotted on each com

Re: Binary files

2017-07-20 Thread Stefan Beller
On Thu, Jul 20, 2017 at 12:41 AM, Volodymyr Sendetskyi <volodymy...@devcom.com> wrote: > It is known, that git handles badly storing binary files in its > repositories at all. > This is especially about large files: even without any changes to > these files, their copies are s

Re: Binary files

2017-07-20 Thread Lars Schneider
> On 20 Jul 2017, at 09:41, Volodymyr Sendetskyi <volodymy...@devcom.com> wrote: > > It is known, that git handles badly storing binary files in its > repositories at all. > This is especially about large files: even without any changes to > these files, their copies

Re: Binary files

2017-07-20 Thread Konstantin Khomoutov
On Thu, Jul 20, 2017 at 10:41:48AM +0300, Volodymyr Sendetskyi wrote: > It is known, that git handles badly storing binary files in its > repositories at all. [...] > So the question is: why not implementing some feature, that would > somehow handle this problem? [...] Have you exam

Re: Binary files

2017-07-20 Thread Bryan Turner
On Thu, Jul 20, 2017 at 12:41 AM, Volodymyr Sendetskyi <volodymy...@devcom.com> wrote: > It is known, that git handles badly storing binary files in its > repositories at all. > This is especially about large files: even without any changes to > these files, their copies are s

Re: Binary files

2017-07-20 Thread Volodymyr Sendetskyi
It is known, that git handles badly storing binary files in its repositories at all. This is especially about large files: even without any changes to these files, their copies are snapshotted on each commit. So even repositories with a small amount of code can grove very fast in size

Re: log -S/-G (aka pickaxe) searches binary files by default

2017-03-03 Thread Thomas Braun
k I never even thought >>> about special casing binary >>> files from day one, it is unlikely that you would find _any_ old >>> version of Git that behaves >>> differently). >> >> The email focuses on "-G", and I think it is wrong to look i

Re: log -S/-G (aka pickaxe) searches binary files by default

2017-03-03 Thread Junio C Hamano
Jeff King <p...@peff.net> writes: > On Thu, Mar 02, 2017 at 05:36:17PM -0800, Junio C Hamano wrote: > ... >> > Is that on purpose? >> >> No, it's a mere oversight (as I do not think I never even thought >> about special casing binary >> files fro

Re: log -S/-G (aka pickaxe) searches binary files by default

2017-03-02 Thread Jeff King
On Thu, Mar 02, 2017 at 05:36:17PM -0800, Junio C Hamano wrote: > On Thu, Mar 2, 2017 at 4:52 PM, Thomas Braun > <thomas.br...@virtuell-zuhause.de> wrote: > > > > I happen to have quite large binary files in my repos. > > > > Today I realized that a line lik

Re: log -S/-G (aka pickaxe) searches binary files by default

2017-03-02 Thread Junio C Hamano
On Thu, Mar 2, 2017 at 4:52 PM, Thomas Braun <thomas.br...@virtuell-zuhause.de> wrote: > > I happen to have quite large binary files in my repos. > > Today I realized that a line like > git log -G a > searches also files found to be binary (or explicitly marked as binary)

log -S/-G (aka pickaxe) searches binary files by default

2017-03-02 Thread Thomas Braun
Hi, I happen to have quite large binary files in my repos. Today I realized that a line like git log -G a searches also files found to be binary (or explicitly marked as binary). Is that on purpose? The documentation of "-G" states "Look for differences whose patch text contain

Re: Bug with disabling compression and 'binary' files.

2016-11-15 Thread Junio C Hamano
Douglas Cox writes: >> This may or may not be related to the symptom >> you are observing (if it is, then you would see a packfile created >> in objects/pack/, not in loose objects in object/??/ directories). > > No, the file is loose (it's in .git/objects/eb in this case).

Re: Bug with disabling compression and 'binary' files.

2016-11-15 Thread Douglas Cox
t; specified in .gitattributes per wildcard similar to how -delta can be >> used. This way we would still be able to get compression for >> text/source files, while still getting the speed of skipping >> compression for binary files that do not compress well. >> >> H

Re: Bug with disabling compression and 'binary' files.

2016-11-15 Thread Junio C Hamano
e speed of skipping > compression for binary files that do not compress well. > > Has there been any discussion on having an attribute similar to this? Nope. I do not offhand think of a way for '-text' attribute (or any attribute for what matter) to interfere with compression level, but whi

Bug with disabling compression and 'binary' files.

2016-11-15 Thread Douglas Cox
I was doing some experiments today with large-ish (100-200MB) binary files and was trying to determine the best configuration for Git. Here are the steps and timings I saw: git init Test cp .../largemovie.mp4 . time git add largemovie.mp4 This took 6.5s for a 200MB file. This file compressed

Re: How to have EOL=LF and keep binary files auto-detection?

2016-04-26 Thread Nikolay Chashnikov
resource files. On Mon, Apr 25, 2016 at 7:46 PM, Torsten Bögershausen <tbo...@web.de> wrote: > On 25.04.16 16:11, Kirill Likhodedov wrote: >> Hi, >> >> I wonder if it is possible both to have LFs in all and only text files in >> working trees, and keep

Re: How to have EOL=LF and keep binary files auto-detection?

2016-04-25 Thread Torsten Bögershausen
On 25.04.16 16:11, Kirill Likhodedov wrote: > Hi, > > I wonder if it is possible both to have LFs in all and only text files in > working trees, and keep Git’s binary files auto-detection? > > To be more precise: > * we want all text files to be checked out in LF; &g

How to have EOL=LF and keep binary files auto-detection?

2016-04-25 Thread Kirill Likhodedov
Hi, I wonder if it is possible both to have LFs in all and only text files in working trees, and keep Git’s binary files auto-detection? To be more precise: * we want all text files to be checked out in LF; * we don’t want force people to set “core.autocrlf” to false, preferring to keep

Re: [git-for-windows] How is detected binary files?

2015-12-01 Thread Jeff King
On Fri, Nov 27, 2015 at 03:14:58PM +0100, Johannes Schindelin wrote: > On Wed, 25 Nov 2015, Andrzej Borucki wrote: > > > How git detects that file is binary? This must be safe because it not > > allowed to change line breaks in binary files. > > Binary files

Re: [git-for-windows] How is detected binary files?

2015-11-27 Thread Johannes Schindelin
Hi Andrzej, On Wed, 25 Nov 2015, Andrzej Borucki wrote: > How git detects that file is binary? This must be safe because it not > allowed to change line breaks in binary files. > Binary files can contain byte 0 (zero), but: > - 16 bit UTF also can contain zero > - short b

[PATCH] t9300: use cmp instead of test_cmp to compare binary files

2014-09-12 Thread Johannes Sixt
test_cmp is intended to produce diff output for human consumption. The input in one instance in t9300-fast-import.sh are binary files, however. Use cmp to compare the files. This was noticed because on Windows we have a special implementation of test_cmp in pure bash code (to ignore differences

Re: [PATCH] t9300: use cmp instead of test_cmp to compare binary files

2014-09-12 Thread Junio C Hamano
Johannes Sixt j...@kdbg.org writes: test_cmp is intended to produce diff output for human consumption. The input in one instance in t9300-fast-import.sh are binary files, however. Use cmp to compare the files. Thanks. This was noticed because on Windows we have a special implementation

Re: [PATCH] t9300: use cmp instead of test_cmp to compare binary files

2014-09-12 Thread Thomas Braun
Am 12.09.2014 um 19:58 schrieb Junio C Hamano: Johannes Sixt j...@kdbg.org writes: test_cmp is intended to produce diff output for human consumption. The input in one instance in t9300-fast-import.sh are binary files, however. Use cmp to compare the files. Thanks. This was noticed

[PATCH v2] t9300: use test_cmp_bin instead of test_cmp to compare binary files

2014-09-12 Thread Johannes Sixt
test_cmp is intended to produce diff output for human consumption. The input in one instance in t9300-fast-import.sh are binary files, however. Use test_cmp_bin to compare the files. This was noticed because on Windows we have a special implementation of test_cmp in pure bash code (to ignore

article: Using a rolling hash to break up binary files

2014-07-31 Thread Philip Oakley
I thought it worth bring to the list's attention a recent article on CodeProject that may be of interest to those looking at splitting binary files into deterministic hunks. http://www.codeproject.com/Articles/801608/Using-a-rolling-hash-to-break-up-binary-files It's based on Rabin

Re: article: Using a rolling hash to break up binary files

2014-07-31 Thread Shawn Pearce
On Thu, Jul 31, 2014 at 3:31 PM, Philip Oakley philipoak...@iee.org wrote: I thought it worth bring to the list's attention a recent article on CodeProject that may be of interest to those looking at splitting binary files into deterministic hunks. http://www.codeproject.com/Articles/801608

[PATCH] t5000, t5003: do not use test_cmp to compare binary files

2014-06-04 Thread Stepan Kasal
test_cmp() is primarily meant to compare text files (and display the difference for debug purposes). Raw cmp is better suited to compare binary files (tar, zip, etc.). On MinGW, test_cmp is a shell function mingw_test_cmp that tries to read both files into environment, stripping CR characters

Re: [PATCH] t5000, t5003: do not use test_cmp to compare binary files

2014-06-04 Thread Thomas Braun
Am 04.06.2014 13:42, schrieb Stepan Kasal: test_cmp() is primarily meant to compare text files (and display the difference for debug purposes). Raw cmp is better suited to compare binary files (tar, zip, etc.). On MinGW, test_cmp is a shell function mingw_test_cmp that tries to read both

Re: [PATCH] t5000, t5003: do not use test_cmp to compare binary files

2014-06-04 Thread Stepan Kasal
Hello Thomas, On Wed, Jun 04, 2014 at 02:13:44PM +0200, Thomas Braun wrote: Wouldn't a function like test_cmp_bin() be better suited for all? I also considered it. The advantage is that is shows that this intentionally differs from test_cmp. The windows folks can then use cmp inside

Re: [msysGit] Re: [PATCH] t5000, t5003: do not use test_cmp to compare binary files

2014-06-04 Thread Thomas Braun
Hi Stephan, Am 04.06.2014 14:42, schrieb Stepan Kasal: On Wed, Jun 04, 2014 at 02:13:44PM +0200, Thomas Braun wrote: Wouldn't a function like test_cmp_bin() be better suited for all? I also considered it. The advantage is that is shows that this intentionally differs from test_cmp. The

[PATCH v2] t5000, t5003: do not use test_cmp to compare binary files

2014-06-04 Thread Stepan Kasal
test_cmp() is primarily meant to compare text files (and display the difference for debug purposes). Raw cmp is better suited to compare binary files (tar, zip, etc.). On MinGW, test_cmp is a shell function mingw_test_cmp that tries to read both files into environment, stripping CR characters

Re: [PATCH v2] t5000, t5003: do not use test_cmp to compare binary files

2014-06-04 Thread Junio C Hamano
Stepan Kasal ka...@ucw.cz writes: test_cmp() is primarily meant to compare text files (and display the difference for debug purposes). Raw cmp is better suited to compare binary files (tar, zip, etc.). On MinGW, test_cmp is a shell function mingw_test_cmp that tries to read both files

Re: [msysGit] Re: [PATCH v2] t5000, t5003: do not use test_cmp to compare binary files

2014-06-04 Thread Michael Geddes
: Stepan Kasal ka...@ucw.cz writes: test_cmp() is primarily meant to compare text files (and display the difference for debug purposes). Raw cmp is better suited to compare binary files (tar, zip, etc.). On MinGW, test_cmp is a shell function mingw_test_cmp that tries to read both files

Re: [PATCH] grep -I: do not bother to read known-binary files

2014-05-16 Thread Stepan Kasal
Hello, On Thu, May 15, 2014 at 03:22:26PM -0400, Jeff King wrote: As the person who is proposing the patch for git.git, I would hope Stepan would follow up on such review and confirm whether or not it is still needed. well, I try to. (I verified that less -I works in msysGit before

Re: [PATCH] grep -I: do not bother to read known-binary files

2014-05-16 Thread Jeff King
On Fri, May 16, 2014 at 10:19:57AM +0200, Stepan Kasal wrote: On Thu, May 15, 2014 at 03:22:26PM -0400, Jeff King wrote: As the person who is proposing the patch for git.git, I would hope Stepan would follow up on such review and confirm whether or not it is still needed. well, I try

Re: [PATCH] grep -I: do not bother to read known-binary files

2014-05-16 Thread Stepan Kasal
Hi, On Fri, May 16, 2014 at 04:29:58AM -0400, Jeff King wrote: [..] I hope I did not sound like blame Stepan, he was screwed up. no, you did not, it was ok. From msysgit's perspective, they may or may not want to revert the patch that they already have. That is a _separate_ issue, and I

Re: [PATCH] grep -I: do not bother to read known-binary files

2014-05-15 Thread Johannes Schindelin
Hi Peff, On Wed, 14 May 2014, Jeff King wrote: On Wed, May 14, 2014 at 05:44:19PM +0200, Stepan Kasal wrote: From: Johannes Schindelin johannes.schinde...@gmx.de Date: Mon, 8 Nov 2010 16:10:43 +0100 Incidentally, this makes grep -I respect the binary attribute (actually, the -text

Re: [PATCH] grep -I: do not bother to read known-binary files

2014-05-15 Thread Jeff King
On Thu, May 15, 2014 at 07:42:00PM +0200, Johannes Schindelin wrote: Hrm. Is this patch still necessary? In the time since this patch was written, we did 0826579 (grep: load file data after checking binary-ness, 2012-02-02) I have no time to test this but I trust that you made sure that

[PATCH] grep -I: do not bother to read known-binary files

2014-05-14 Thread Stepan Kasal
From: Johannes Schindelin johannes.schinde...@gmx.de Date: Mon, 8 Nov 2010 16:10:43 +0100 Incidentally, this makes grep -I respect the binary attribute (actually, the -text attribute, but binary implies that). Since the attributes are not thread-safe, we now need to switch off threading if -I

Re: [PATCH] grep -I: do not bother to read known-binary files

2014-05-14 Thread Junio C Hamano
Stepan Kasal ka...@ucw.cz writes: From: Johannes Schindelin johannes.schinde...@gmx.de Date: Mon, 8 Nov 2010 16:10:43 +0100 Incidentally, this makes grep -I respect the binary attribute (actually, the -text attribute, but binary implies that). Since the attributes are not thread-safe, we

Re: [PATCH] grep -I: do not bother to read known-binary files

2014-05-14 Thread Jeff King
On Wed, May 14, 2014 at 05:44:19PM +0200, Stepan Kasal wrote: From: Johannes Schindelin johannes.schinde...@gmx.de Date: Mon, 8 Nov 2010 16:10:43 +0100 Incidentally, this makes grep -I respect the binary attribute (actually, the -text attribute, but binary implies that). Since the

Re: [PATCH] grep -I: do not bother to read known-binary files

2014-05-14 Thread Jeff King
On Wed, May 14, 2014 at 10:52:28AM -0700, Junio C Hamano wrote: I do not think checking 'text' is the right way to do this. The attribute controls the eof normalization, and people sometimes want to keep CRLF terminated files in the repository no matter what the platform is (an example I

Re: [PATCH] grep -I: do not bother to read known-binary files

2014-05-14 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Wed, May 14, 2014 at 05:44:19PM +0200, Stepan Kasal wrote: From: Johannes Schindelin johannes.schinde...@gmx.de Date: Mon, 8 Nov 2010 16:10:43 +0100 Incidentally, this makes grep -I respect the binary attribute (actually, the -text attribute, but binary

Rebase triggers git diff header lacks filename information on very large patch with binary files

2014-01-14 Thread demerphq
. If you prefer to skip this patch, run git rebase --skip instead. To check out the original branch and stop rebasing, run git rebase --abort. The patch is very large, 882453899 bytes. The patch also includes many binary files. Extracting the content around and before line 7330213 and up to the next

Re: Rebase triggers git diff header lacks filename information on very large patch with binary files

2014-01-14 Thread demerphq
-apply/patch When you have resolved this problem, run git rebase --continue. If you prefer to skip this patch, run git rebase --skip instead. To check out the original branch and stop rebasing, run git rebase --abort. The patch is very large, 882453899 bytes. The patch also includes many binary

Re: gitweb commitdiff page - binary files with ampersands in filename?

2013-04-15 Thread Jakub Narębski
Oj W wrote: Change a binary file whose filename contains an ampersand, then view the commitdiff page in gitweb. Git outputs a message like Binary files a/bw.dll and b/bw.dll differ Gitweb format_diff_from_to_header() doesn't notice anything in that output which needs escaping, and writes

gitweb commitdiff page - binary files with ampersands in filename?

2013-04-09 Thread Oj W
Change a binary file whose filename contains an ampersand, then view the commitdiff page in gitweb. Git outputs a message like Binary files a/bw.dll and b/bw.dll differ Gitweb format_diff_from_to_header() doesn't notice anything in that output which needs escaping, and writes it directly

gitdiffbinstat - git diff --shortstat -like output for changes in binary files

2013-03-29 Thread Matthias Krüger
I use git mostly for game-development which means I have to deal with a lot of binary files (images, sound files etc). When I came to a point where I had run image optimization on a branch, I wanted to know of course how much smaller the new branch was in comparison to master. Problem

Re: gitdiffbinstat - git diff --shortstat -like output for changes in binary files

2013-03-29 Thread Jeff King
On Fri, Mar 29, 2013 at 07:07:32PM +0100, Matthias Krüger wrote: I use git mostly for game-development which means I have to deal with a lot of binary files (images, sound files etc). When I came to a point where I had run image optimization on a branch, I wanted to know of course how much

Re: gitdiffbinstat - git diff --shortstat -like output for changes in binary files

2013-03-29 Thread Junio C Hamano
Jeff King p...@peff.net writes: I use git mostly for game-development which means I have to deal with a lot of binary files (images, sound files etc). When I came to a point where I had run image optimization on a branch, I wanted to know of course how much smaller the new branch

Re: Bug Report - Binary Files as plain files, line endings conversions

2012-07-15 Thread Jose Nobile
/internationalstudies.co (master) $ cat .gitattributes # Auto detect text files and perform LF normalization * eol=crlf JOSE@COMPAQ /d/wamp/www/internationalstudies.co (master) Binary files as an image not may perform any line ending operations, many binary files will be corrupt when