git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-add--interactive.perl: Remove two unused variables

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 25, 2012, 05:41 UTC
Message-ID
<7vfw9khrrt.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4FE7889E.2020009@gmail.com>
"Thomas \"Enki\" Badie" <thomas.badie@gmail.com> writes:
Show 8 quoted lines
> 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.

Show 23 quoted lines
>  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);
Previous: Thomas "Enki" BadieNext: Thomas Rast
Message 2 of 7 in “git-add--interactive.perl: Remove two unused variables”
  1. git-add--interactive.perl: Remove two unused variablesThomas "Enki" Badie, Jun 24, 2012
  2. Junio C HamanoJun 25, 2012
  3. Thomas RastJun 25, 2012
  4. Thomas BadieJun 25, 2012
  5. Thomas BadieJun 25, 2012
  6. Junio C HamanoJun 25, 2012
  7. Thomas BadieJun 25, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.