git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Textconv
@ 2013-03-11  9:46 Dmitry Ilin
  2013-03-11 10:00 ` Textconv Matthieu Moy
  0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Ilin @ 2013-03-11  9:46 UTC (permalink / raw)
  To: git

Hello!

Most of GUI for Git using 'git show' command to show differences between 
versions. For example: WebStorm IDE. But for now there is no way to 
specify text conversion command in git config for 'show' as it done for 
'diff'. It makes problems when we dealing with encrypted repositories.

Is there any alternative way to configure git repository? Or if it 
impossible will you implement such kind of feature?

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

* Re: Textconv
  2013-03-11  9:46 Textconv Dmitry Ilin
@ 2013-03-11 10:00 ` Matthieu Moy
  2013-03-11 10:31   ` Textconv Dmitry Ilin
  0 siblings, 1 reply; 6+ messages in thread
From: Matthieu Moy @ 2013-03-11 10:00 UTC (permalink / raw)
  To: Dmitry Ilin; +Cc: git

Dmitry Ilin <dmitry@mylovecompany.com> writes:

> Hello!
>
> Most of GUI for Git using 'git show' command to show differences
> between versions. For example: WebStorm IDE. But for now there is no
> way to specify text conversion command in git config for 'show' as it
> done for 'diff'.

Do you mean, to enable it, or to disable it?

By default, "git show" does use the textconv filter to compute the diff,
at least if you specified the textconv driver in your .gitattributes
file.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

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

* Re: Textconv
  2013-03-11 10:00 ` Textconv Matthieu Moy
@ 2013-03-11 10:31   ` Dmitry Ilin
  2013-03-11 10:41     ` Textconv Matthieu Moy
  0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Ilin @ 2013-03-11 10:31 UTC (permalink / raw)
  To: Matthieu Moy; +Cc: git

I mean that our filter doesn't work with 'git show' and I need to enable 
it for this command.

This is part of my git config file:

[filter "openssl"]
    smudge = openssl enc -d -base64 -aes-256-ecb -k 'abcde' 2> /dev/null 
|| cat
    clean = openssl enc -base64 -aes-256-ecb -S '12345' -k 'abcde'
[diff "openssl"]
    textconv = openssl enc -d -base64 -aes-256-ecb -k 'abcde' -in "$1" 
2> /dev/null || cat "$1"
[merge]
    renormalize = true


And content of '.git/info/attributes':

* filter=openssl diff=openssl


How can I deal with it?


On 03/11/2013 02:00 PM, Matthieu Moy wrote:
> Dmitry Ilin <dmitry@mylovecompany.com> writes:
>
>> Hello!
>>
>> Most of GUI for Git using 'git show' command to show differences
>> between versions. For example: WebStorm IDE. But for now there is no
>> way to specify text conversion command in git config for 'show' as it
>> done for 'diff'.
> Do you mean, to enable it, or to disable it?
>
> By default, "git show" does use the textconv filter to compute the diff,
> at least if you specified the textconv driver in your .gitattributes
> file.
>

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

* Re: Textconv
  2013-03-11 10:31   ` Textconv Dmitry Ilin
@ 2013-03-11 10:41     ` Matthieu Moy
  2013-03-11 11:30       ` Textconv Dmitry Ilin
  0 siblings, 1 reply; 6+ messages in thread
From: Matthieu Moy @ 2013-03-11 10:41 UTC (permalink / raw)
  To: Dmitry Ilin; +Cc: git

Dmitry Ilin <dmitry@mylovecompany.com> writes:

> I mean that our filter doesn't work with 'git show' and I need to
> enable it for this command.
>
> This is part of my git config file:
>
> [filter "openssl"]
>    smudge = openssl enc -d -base64 -aes-256-ecb -k 'abcde' 2>
> /dev/null || cat
>    clean = openssl enc -base64 -aes-256-ecb -S '12345' -k 'abcde'
> [diff "openssl"]
>    textconv = openssl enc -d -base64 -aes-256-ecb -k 'abcde' -in "$1"
> 2> /dev/null || cat "$1"
> [merge]
>    renormalize = true

Maybe a bad interaction between the [filter ...] section and the
[textconv ...] one. Can you run:

GIT_TRACE=true git show <some-relevant-commit>

to see what's going on?

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

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

* Re: Textconv
  2013-03-11 10:41     ` Textconv Matthieu Moy
@ 2013-03-11 11:30       ` Dmitry Ilin
  2013-03-11 14:40         ` Textconv Michael J Gruber
  0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Ilin @ 2013-03-11 11:30 UTC (permalink / raw)
  To: Matthieu Moy; +Cc: git

I tried this command and I got following result:

trace: built-in: git 'show' 'a1bffde'
trace: run_command: 'openssl enc -d -base64 -aes-256-ecb -k 
'\''abcde'\'' 2> /dev/null || cat'
trace: exec: 'sh' '-c' 'openssl enc -d -base64 -aes-256-ecb -k 
'\''abcde'\'' 2> /dev/null || cat' 'openssl enc -d -base64 -aes-256-ecb 
-k '\''abcde'\'' 2> /dev/null || cat'
trace: run_command: 'openssl enc -d -base64 -aes-256-ecb -k 
'\''abcde'\'' -in $1 2> /dev/null || cat $1' '/tmp/CLPGPk_config.js'
trace: exec: 'sh' '-c' 'openssl enc -d -base64 -aes-256-ecb -k 
'\''abcde'\'' -in $1 2> /dev/null || cat $1 "$@"' 'openssl enc -d 
-base64 -aes-256-ecb -k '\''abcde'\'' -in $1 2> /dev/null || cat $1' 
'/tmp/CLPGPk_config.js'
trace: run_command: 'openssl enc -d -base64 -aes-256-ecb -k 
'\''abcde'\'' 2> /dev/null || cat'
trace: exec: 'sh' '-c' 'openssl enc -d -base64 -aes-256-ecb -k 
'\''abcde'\'' 2> /dev/null || cat' 'openssl enc -d -base64 -aes-256-ecb 
-k '\''abcde'\'' 2> /dev/null || cat'
trace: run_command: 'openssl enc -d -base64 -aes-256-ecb -k 
'\''abcde'\'' -in $1 2> /dev/null || cat $1' '/tmp/Uyc2Dj_config.js'
trace: exec: 'sh' '-c' 'openssl enc -d -base64 -aes-256-ecb -k 
'\''abcde'\'' -in $1 2> /dev/null || cat $1 "$@"' 'openssl enc -d 
-base64 -aes-256-ecb -k '\''abcde'\'' -in $1 2> /dev/null || cat $1' 
'/tmp/Uyc2Dj_config.js'
diff --git a/path/config.js b/path/config.js
index c4ad2d4..a67d13f 100644
--- a/path/config.js
+++ b/path/config.js


And also not encrypted data of my commit.


On 03/11/2013 02:41 PM, Matthieu Moy wrote:
> Dmitry Ilin <dmitry@mylovecompany.com> writes:
>
>> I mean that our filter doesn't work with 'git show' and I need to
>> enable it for this command.
>>
>> This is part of my git config file:
>>
>> [filter "openssl"]
>>     smudge = openssl enc -d -base64 -aes-256-ecb -k 'abcde' 2>
>> /dev/null || cat
>>     clean = openssl enc -base64 -aes-256-ecb -S '12345' -k 'abcde'
>> [diff "openssl"]
>>     textconv = openssl enc -d -base64 -aes-256-ecb -k 'abcde' -in "$1"
>> 2> /dev/null || cat "$1"
>> [merge]
>>     renormalize = true
> Maybe a bad interaction between the [filter ...] section and the
> [textconv ...] one. Can you run:
>
> GIT_TRACE=true git show <some-relevant-commit>
>
> to see what's going on?
>

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

* Re: Textconv
  2013-03-11 11:30       ` Textconv Dmitry Ilin
@ 2013-03-11 14:40         ` Michael J Gruber
  0 siblings, 0 replies; 6+ messages in thread
From: Michael J Gruber @ 2013-03-11 14:40 UTC (permalink / raw)
  To: Dmitry Ilin; +Cc: Matthieu Moy, git

Dmitry Ilin venit, vidit, dixit 11.03.2013 12:30:
> I tried this command and I got following result:
> 
> trace: built-in: git 'show' 'a1bffde'
> trace: run_command: 'openssl enc -d -base64 -aes-256-ecb -k 
> '\''abcde'\'' 2> /dev/null || cat'
> trace: exec: 'sh' '-c' 'openssl enc -d -base64 -aes-256-ecb -k 
> '\''abcde'\'' 2> /dev/null || cat' 'openssl enc -d -base64 -aes-256-ecb 
> -k '\''abcde'\'' 2> /dev/null || cat'
> trace: run_command: 'openssl enc -d -base64 -aes-256-ecb -k 
> '\''abcde'\'' -in $1 2> /dev/null || cat $1' '/tmp/CLPGPk_config.js'
> trace: exec: 'sh' '-c' 'openssl enc -d -base64 -aes-256-ecb -k 
> '\''abcde'\'' -in $1 2> /dev/null || cat $1 "$@"' 'openssl enc -d 
> -base64 -aes-256-ecb -k '\''abcde'\'' -in $1 2> /dev/null || cat $1' 
> '/tmp/CLPGPk_config.js'
> trace: run_command: 'openssl enc -d -base64 -aes-256-ecb -k 
> '\''abcde'\'' 2> /dev/null || cat'
> trace: exec: 'sh' '-c' 'openssl enc -d -base64 -aes-256-ecb -k 
> '\''abcde'\'' 2> /dev/null || cat' 'openssl enc -d -base64 -aes-256-ecb 
> -k '\''abcde'\'' 2> /dev/null || cat'
> trace: run_command: 'openssl enc -d -base64 -aes-256-ecb -k 
> '\''abcde'\'' -in $1 2> /dev/null || cat $1' '/tmp/Uyc2Dj_config.js'
> trace: exec: 'sh' '-c' 'openssl enc -d -base64 -aes-256-ecb -k 
> '\''abcde'\'' -in $1 2> /dev/null || cat $1 "$@"' 'openssl enc -d 
> -base64 -aes-256-ecb -k '\''abcde'\'' -in $1 2> /dev/null || cat $1' 
> '/tmp/Uyc2Dj_config.js'
> diff --git a/path/config.js b/path/config.js
> index c4ad2d4..a67d13f 100644
> --- a/path/config.js
> +++ b/path/config.js
> 
> 
> And also not encrypted data of my commit.
> 
> 
> On 03/11/2013 02:41 PM, Matthieu Moy wrote:
>> Dmitry Ilin <dmitry@mylovecompany.com> writes:
>>
>>> I mean that our filter doesn't work with 'git show' and I need to
>>> enable it for this command.
>>>
>>> This is part of my git config file:
>>>
>>> [filter "openssl"]
>>>     smudge = openssl enc -d -base64 -aes-256-ecb -k 'abcde' 2>
>>> /dev/null || cat
>>>     clean = openssl enc -base64 -aes-256-ecb -S '12345' -k 'abcde'
>>> [diff "openssl"]
>>>     textconv = openssl enc -d -base64 -aes-256-ecb -k 'abcde' -in "$1"
>>> 2> /dev/null || cat "$1"
>>> [merge]
>>>     renormalize = true
>> Maybe a bad interaction between the [filter ...] section and the
>> [textconv ...] one. Can you run:
>>
>> GIT_TRACE=true git show <some-relevant-commit>
>>
>> to see what's going on?
>>
> 

"git show commit" uses textconv by default for the patch, but "git show
blob" does not. There's a series on the list which deals with textconv
for "grep" and "show blob", but I haven't had the time to polish it up.
I don't think it's cooking in pu yet, but I've been running with it
since. "running git with it", that is, not "running away with it" ;)

Michael

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

end of thread, other threads:[~2013-03-11 14:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-11  9:46 Textconv Dmitry Ilin
2013-03-11 10:00 ` Textconv Matthieu Moy
2013-03-11 10:31   ` Textconv Dmitry Ilin
2013-03-11 10:41     ` Textconv Matthieu Moy
2013-03-11 11:30       ` Textconv Dmitry Ilin
2013-03-11 14:40         ` Textconv Michael J Gruber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).