Re: [PATCH v3] log -G: ignore binary files

2018-12-28 Thread Junio C Hamano
Thomas Braun writes: > - The internally used algorithm for generating patch text is based on > xdiff and its states in [1] > > > The output format of the binary patch file is proprietary > > (and binary) and it is basically a collection of copy and insert > > commands [..] > > which mea

[PATCH v3] log -G: ignore binary files

2018-12-14 Thread Thomas Braun
The -G option of log looks for the differences whose patch text contains added/removed lines that match regex. Currently -G looks also into patches of binary files (which according to [1]) is binary as well. This has a couple of issues: - It makes the pickaxe search slow. In a proprietary

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

2018-12-14 Thread Thomas Braun
> Junio C Hamano hat am 29. November 2018 um 08:22 > geschrieben: > > > Junio C Hamano writes: > > >> +test_expect_success 'log -G ignores binary files' ' > >> + git checkout --orphan orphan1 && > >> + printf "a\0a

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

2018-12-14 Thread Thomas Braun
> Junio C Hamano hat am 29. November 2018 um 08:10 > geschrieben: > > > 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). Done. > The code changes looked s

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

2018-12-14 Thread Thomas Braun
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 > > the number of occu

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 "me

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 the

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.b

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
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 

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.b

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 files w

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 cha

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" >

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. &

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

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. &g

[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 Bra

[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 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/ PS: This i

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 file

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 at

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 n

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 commi

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 remain

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 (unchang

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 o

[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 di

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 comm

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
ly 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 unwanted files is > hugely variable

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 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 consti

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

2018-05-18 Thread Randall S. Becker
d, May 16, 2018 at 5:45 PM, Anmol Sethi 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 configu

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 wrote: > > On Wed, May 16, 2018 at 5:45 PM, Anmol Sethi wrote: >> I think it’d be great to have an option to have git ignore b

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

2018-05-18 Thread Anmol Sethi
eat 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 fi

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 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 t

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 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 bi

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 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: e

Re: Binary files

2017-07-20 Thread Junio C Hamano
Igor Djordjevic 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 >> these files, their copies are

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 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 Lars Schneider
> On 20 Jul 2017, at 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 ea

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 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 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 if they

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

2017-03-03 Thread Thomas Braun
Am 03.03.2017 um 17:07 schrieb Junio C Hamano: > Jeff King 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 &

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

2017-03-03 Thread Junio C Hamano
Jeff King 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 from day one,

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 > wrote: > > > > I happen to have quite large binary files in my repos. > > > > Today I realized that a line like > > git log -G a > >

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 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). > > Is that on purpose? No, it&

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). This is > seen immedia

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

2016-11-15 Thread Douglas Cox
fied 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. >> >> Has there

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

2016-11-15 Thread Junio C Hamano
is also global. Ideally it would be > great if there was a separate 'compression' attribute that could be > 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

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 a

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 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 Git’s binary files auto-detectio

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 this

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 can co

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 binar

[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

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 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. > > Tha

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

2014-09-12 Thread Junio C Hamano
Johannes Sixt 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 im

[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: 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 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/80

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

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

2014-06-04 Thread Michael Geddes
wrote: > Stepan Kasal 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 she

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

2014-06-04 Thread Junio C Hamano
Stepan Kasal 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 tri

[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

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. > >

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 test_cm

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

[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

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-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,

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 submi

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 sur

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 > > Date: Mon, 8 Nov 2010 16:10:43 +0100 > > > > Incidentally, this makes grep -I respect the "binary" attribute (actually, > > the "-text" attribute,

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

2014-05-14 Thread Junio C Hamano
Jeff King writes: > On Wed, May 14, 2014 at 05:44:19PM +0200, Stepan Kasal wrote: > >> From: Johannes Schindelin >> 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). >> >>

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 Jeff King
On Wed, May 14, 2014 at 05:44:19PM +0200, Stepan Kasal wrote: > From: Johannes Schindelin > 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 t

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

2014-05-14 Thread Junio C Hamano
Stepan Kasal writes: > From: Johannes Schindelin > 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 > th

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

2014-05-14 Thread Stepan Kasal
From: Johannes Schindelin 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 was passed. Signed-off

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

2014-01-14 Thread demerphq
e --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 diff header in the patch I see this: > > perl -lne'print "$.\t$_" i

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

2014-01-14 Thread demerphq
tinue". 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

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/b&w.dll and b/b&w.dll differ" > > Gitweb format_diff_from_to_header() doesn't notice anyth

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/b&w.dll and b/b&w.dll differ" Gitweb format_diff_from_to_header() doesn't notice anything in that output which needs escaping, an

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

2013-03-29 Thread Junio C Hamano
Jeff King 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 sm

  1   2   >