* [PATCH] git-add--interactive.perl: Remove two unused variables
@ 2012-06-24 21:37 Thomas "Enki" Badie
2012-06-25 5:41 ` Junio C Hamano
0 siblings, 1 reply; 7+ messages in thread
From: Thomas "Enki" Badie @ 2012-06-24 21:37 UTC (permalink / raw)
To: git
The patch 8f0bef6 refactors this script and leaves the `$fh' variable
unused in `diff_applies' and `patch_update_file'.
Signed-off-by: Thomas Badie <badie@lrde.epita.fr>
---
Hello,
This is my first patch. It introduces a really minor change, and I
also want to be sure the way I submit it is the right way. Thanks :)
git-add--interactive.perl | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index d948aa8..710764a 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -1067,7 +1067,6 @@ EOF
}
sub diff_applies {
- my $fh;
return run_git_apply($patch_mode_flavour{APPLY_CHECK} . '--check',
map { @{$_->{TEXT}} } @_);
}
@@ -1514,7 +1513,6 @@ sub patch_update_file {
}
if (@result) {
- my $fh;
my @patch = reassemble_patch($head->{TEXT}, @result);
my $apply_routine = $patch_mode_flavour{APPLY};
&$apply_routine(@patch);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] git-add--interactive.perl: Remove two unused variables
2012-06-24 21:37 [PATCH] git-add--interactive.perl: Remove two unused variables Thomas "Enki" Badie
@ 2012-06-25 5:41 ` Junio C Hamano
2012-06-25 9:12 ` Thomas Rast
2012-06-25 10:12 ` Thomas Badie
0 siblings, 2 replies; 7+ messages in thread
From: Junio C Hamano @ 2012-06-25 5:41 UTC (permalink / raw)
To: Thomas "Enki" Badie; +Cc: git, Thomas Rast
"Thomas \"Enki\" Badie" <thomas.badie@gmail.com> writes:
> The patch 8f0bef6 refactors this script and leaves the `$fh' variable
> unused in `diff_applies' and `patch_update_file'.
>
> Signed-off-by: Thomas Badie <badie@lrde.epita.fr>
> ---
> Hello,
> This is my first patch. It introduces a really minor change, and I
> also want to be sure the way I submit it is the right way. Thanks :)
The patch submission is almost perfect, except that:
(1) the patch seems to be whitespace damaged; and
(2) the author of the problematic commit should have been Cc'ed
(especially when he is still an active participant on the list)
to give him a chance to Ack it (I'm adding Thomas for this).
Thanks. I like that you identified why this is a good thing by
quoting the problematic change.
> git-add--interactive.perl | 2 --
> 1 files changed, 0 insertions(+), 2 deletions(-)
>
> diff --git a/git-add--interactive.perl b/git-add--interactive.perl
> index d948aa8..710764a 100755
> --- a/git-add--interactive.perl
> +++ b/git-add--interactive.perl
> @@ -1067,7 +1067,6 @@ EOF
> }
>
> sub diff_applies {
> - my $fh;
> return run_git_apply($patch_mode_flavour{APPLY_CHECK} . '--check',
> map { @{$_->{TEXT}} } @_);
> }
> @@ -1514,7 +1513,6 @@ sub patch_update_file {
> }
>
> if (@result) {
> - my $fh;
> my @patch = reassemble_patch($head->{TEXT}, @result);
> my $apply_routine = $patch_mode_flavour{APPLY};
> &$apply_routine(@patch);
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] git-add--interactive.perl: Remove two unused variables
2012-06-25 5:41 ` Junio C Hamano
@ 2012-06-25 9:12 ` Thomas Rast
2012-06-25 10:16 ` Thomas Badie
2012-06-25 10:12 ` Thomas Badie
1 sibling, 1 reply; 7+ messages in thread
From: Thomas Rast @ 2012-06-25 9:12 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Thomas "Enki" Badie, git, Thomas Rast
Junio C Hamano <gitster@pobox.com> writes:
> "Thomas \"Enki\" Badie" <thomas.badie@gmail.com> writes:
>
>> The patch 8f0bef6 refactors this script and leaves the `$fh' variable
>> unused in `diff_applies' and `patch_update_file'.
[...]
> (2) the author of the problematic commit should have been Cc'ed
> (especially when he is still an active participant on the list)
> to give him a chance to Ack it (I'm adding Thomas for this).
Indeed, my bad. It's easy to verify from 'git show 8f0bef6' that this
was an oversight in my patch.
Acked-by: Thomas Rast <trast@student.ethz.ch>
--
Thomas Rast
trast@{inf,student}.ethz.ch
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] git-add--interactive.perl: Remove two unused variables
2012-06-25 5:41 ` Junio C Hamano
2012-06-25 9:12 ` Thomas Rast
@ 2012-06-25 10:12 ` Thomas Badie
2012-06-25 18:06 ` Junio C Hamano
1 sibling, 1 reply; 7+ messages in thread
From: Thomas Badie @ 2012-06-25 10:12 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Thomas Rast
2012/6/25 Junio C Hamano <gitster@pobox.com>:
> "Thomas \"Enki\" Badie" <thomas.badie@gmail.com> writes:
>
>> The patch 8f0bef6 refactors this script and leaves the `$fh' variable
>> unused in `diff_applies' and `patch_update_file'.
>>
>> Signed-off-by: Thomas Badie <badie@lrde.epita.fr>
>> ---
>> Hello,
>> This is my first patch. It introduces a really minor change, and I
>> also want to be sure the way I submit it is the right way. Thanks :)
>
> The patch submission is almost perfect, except that:
>
> (1) the patch seems to be whitespace damaged; and
>
The only damage I see is a space on the deleted lines which doesn't
exist in the patch. Is that you're talking about ?
I need to investigate why it appears...
> (2) the author of the problematic commit should have been Cc'ed
> (especially when he is still an active participant on the list)
> to give him a chance to Ack it (I'm adding Thomas for this).
My bad, I forgot to check if the commiter were still active. I'll check it
for the next time.
> Thanks. I like that you identified why this is a good thing by
> quoting the problematic change.
Thanks :)
>> git-add--interactive.perl | 2 --
>> 1 files changed, 0 insertions(+), 2 deletions(-)
>>
>> diff --git a/git-add--interactive.perl b/git-add--interactive.perl
>> index d948aa8..710764a 100755
>> --- a/git-add--interactive.perl
>> +++ b/git-add--interactive.perl
>> @@ -1067,7 +1067,6 @@ EOF
>> }
>>
>> sub diff_applies {
>> - my $fh;
>> return run_git_apply($patch_mode_flavour{APPLY_CHECK} . '--check',
>> map { @{$_->{TEXT}} } @_);
>> }
>> @@ -1514,7 +1513,6 @@ sub patch_update_file {
>> }
>>
>> if (@result) {
>> - my $fh;
>> my @patch = reassemble_patch($head->{TEXT}, @result);
>> my $apply_routine = $patch_mode_flavour{APPLY};
>> &$apply_routine(@patch);
--
Thomas "Enki" Badie
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] git-add--interactive.perl: Remove two unused variables
2012-06-25 9:12 ` Thomas Rast
@ 2012-06-25 10:16 ` Thomas Badie
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Badie @ 2012-06-25 10:16 UTC (permalink / raw)
To: Thomas Rast; +Cc: Junio C Hamano, git, Thomas Rast
2012/6/25 Thomas Rast <trast@inf.ethz.ch>:
> Junio C Hamano <gitster@pobox.com> writes:
>
>> "Thomas \"Enki\" Badie" <thomas.badie@gmail.com> writes:
>>
>>> The patch 8f0bef6 refactors this script and leaves the `$fh' variable
>>> unused in `diff_applies' and `patch_update_file'.
> [...]
>> (2) the author of the problematic commit should have been Cc'ed
>> (especially when he is still an active participant on the list)
>> to give him a chance to Ack it (I'm adding Thomas for this).
>
> Indeed, my bad. It's easy to verify from 'git show 8f0bef6' that this
> was an oversight in my patch.
>
> Acked-by: Thomas Rast <trast@student.ethz.ch>
It happens to everyone^^ Thanks for your answer.
Should I repost a patch V2 or it is okay like this?
Thanks
--
Thomas "Enki" Badie
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] git-add--interactive.perl: Remove two unused variables
2012-06-25 10:12 ` Thomas Badie
@ 2012-06-25 18:06 ` Junio C Hamano
2012-06-25 22:41 ` Thomas Badie
0 siblings, 1 reply; 7+ messages in thread
From: Junio C Hamano @ 2012-06-25 18:06 UTC (permalink / raw)
To: Thomas Badie; +Cc: git, Thomas Rast
Thomas Badie <thomas.badie@gmail.com> writes:
> 2012/6/25 Junio C Hamano <gitster@pobox.com>:
>> "Thomas \"Enki\" Badie" <thomas.badie@gmail.com> writes:
>>
>>> The patch 8f0bef6 refactors this script and leaves the `$fh' variable
>>> unused in `diff_applies' and `patch_update_file'.
>>>
>>> Signed-off-by: Thomas Badie <badie@lrde.epita.fr>
>>> ---
>>> Hello,
>>> This is my first patch. It introduces a really minor change, and I
>>> also want to be sure the way I submit it is the right way. Thanks :)
>>
>> The patch submission is almost perfect, except that:
>>
>> (1) the patch seems to be whitespace damaged; and
>>
>
> The only damage I see is a space on the deleted lines which doesn't
> exist in the patch. Is that you're talking about ?
> I need to investigate why it appears...
A typical context line would begin with SP and typically then tab
(because our code is indented with leading tabs) but your context
lines all have two SPs in front and indented with more SPs. This is
a symptom of your MUA mangling your patch, and the reason can be seen
in the "Content-Type: text/plain; charset=ISO-8859-1; format=flowed"
header.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] git-add--interactive.perl: Remove two unused variables
2012-06-25 18:06 ` Junio C Hamano
@ 2012-06-25 22:41 ` Thomas Badie
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Badie @ 2012-06-25 22:41 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Thomas Rast
On 25/06/2012 20:06, Junio C Hamano wrote:
> Thomas Badie <thomas.badie@gmail.com> writes:
>
>> 2012/6/25 Junio C Hamano <gitster@pobox.com>:
>>> "Thomas \"Enki\" Badie" <thomas.badie@gmail.com> writes:
>>>
>>>> The patch 8f0bef6 refactors this script and leaves the `$fh' variable
>>>> unused in `diff_applies' and `patch_update_file'.
>>>>
>>>> Signed-off-by: Thomas Badie <badie@lrde.epita.fr>
>>>> ---
>>>> Hello,
>>>> This is my first patch. It introduces a really minor change, and I
>>>> also want to be sure the way I submit it is the right way. Thanks :)
>>>
>>> The patch submission is almost perfect, except that:
>>>
>>> (1) the patch seems to be whitespace damaged; and
>>>
>>
>> The only damage I see is a space on the deleted lines which doesn't
>> exist in the patch. Is that you're talking about ?
>> I need to investigate why it appears...
>
> A typical context line would begin with SP and typically then tab
> (because our code is indented with leading tabs) but your context
> lines all have two SPs in front and indented with more SPs. This is
> a symptom of your MUA mangling your patch, and the reason can be seen
> in the "Content-Type: text/plain; charset=ISO-8859-1; format=flowed"
> header.
>
I follow the first approach in the tutorial in
`git format-patch --help`, and I hope it works as expected :)
I wonder what is the next step, should I repost the previous patch with
the line "Acked-by: Thomas Rast <trast@student.ethz.ch>" or it is okay
right now?
Thanks a lot for your help on this first patch,
--
Thomas "Enki" Badie
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-06-25 22:42 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-24 21:37 [PATCH] git-add--interactive.perl: Remove two unused variables Thomas "Enki" Badie
2012-06-25 5:41 ` Junio C Hamano
2012-06-25 9:12 ` Thomas Rast
2012-06-25 10:16 ` Thomas Badie
2012-06-25 10:12 ` Thomas Badie
2012-06-25 18:06 ` Junio C Hamano
2012-06-25 22:41 ` Thomas Badie
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).