Bug 38724 - svn-apply: Refactor VCSUtil.pm's parse methods to use "not set" rather than "undef"
Summary: svn-apply: Refactor VCSUtil.pm's parse methods to use "not set" rather than "...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Chris Jerdonek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-06 22:47 PDT by Chris Jerdonek
Modified: 2010-05-07 08:55 PDT (History)
3 users (show)

See Also:


Attachments
Proposed patch (18.07 KB, patch)
2010-05-07 07:55 PDT, Chris Jerdonek
dbates: review+
cjerdonek: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Jerdonek 2010-05-06 22:47:21 PDT
This report is to address the FIXME to use "not set" rather than "undef" in the various hash objects returned by the parse() methods.
Comment 1 Chris Jerdonek 2010-05-07 07:55:29 PDT
Created attachment 55373 [details]
Proposed patch
Comment 2 Daniel Bates 2010-05-07 08:38:14 PDT
Comment on attachment 55373 [details]
Proposed patch

> @@ -456,7 +457,7 @@ sub parseGitDiffHeader($$)
>  
>      my $copiedFromPath;
>      my $foundHeaderEnding;
> -    my $isBinary;
> +    my $isBinary = 0;

From my understanding, we can leave this as "my $isBinary;" based on your usage in:

$header{isBinary} = $isBinary if $isBinary;

> @@ -550,7 +552,7 @@ sub parseSvnDiffHeader($$)
>      my $copiedFromPath;
>      my $foundHeaderEnding;
>      my $indexPath;
> -    my $isBinary;
> +    my $isBinary = 0;

Similarly, we can leave this as "my $isBinary;";

> @@ -640,8 +642,8 @@ sub parseDiffHeader($$)
>      my ($fileHandle, $line) = @_;
>  
>      my $header;  # This is a hash ref.
> -    my $isGit;
> -    my $isSvn;
> +    my $isGit = 0;
> +    my $isSvn = 0;

Similarly, we can leave these as:

my $isGit;
my $isSvn;

r=me.
Comment 3 Chris Jerdonek 2010-05-07 08:51:50 PDT
(In reply to comment #2)
> r=me.

Thanks!  Will update.
Comment 4 Chris Jerdonek 2010-05-07 08:55:10 PDT
Committed:

http://trac.webkit.org/changeset/58951