{"thread":{"id":"8238","subject":"[PATCH 4/6] Remove whitespace breakage from perl, tcl and python files","startedAt":"2007-05-20T10:28:44Z","lastAt":"2007-05-20T10:28:44Z","messageCount":1,"participants":["Marco Costalba"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"42692","messageId":"465022DC.6070900@gmail.com","threadId":"8238","inReplyTo":null,"subject":"[PATCH 4/6] Remove whitespace breakage from perl, tcl and python files","fromName":"Marco Costalba","fromEmail":"mcostalba@gmail.com","sentAt":"2007-05-20T10:28:44Z","receivedAt":"2007-05-20T10:28:44Z","isPatch":true,"sender":{"key":"mcostalba@gmail.com","avatar":null},"body":"Using 'git apply --whitespace=strip'\n\nSigned-off-by: Marco Costalba <mcostalba@gmail.com>\n---\n  contrib/gitview/gitview  |    2 -\n  git-archimport.perl      |  175 +++++++++++++++++++++++-----------------------\n  git-cvsexportcommit.perl |    2 +-\n  git-cvsimport.perl       |   12 ++--\n  git-gui/lib/class.tcl    |    1 -\n  git-p4import.py          |    1 -\n  git-svnimport.perl       |    4 +-\n  gitk                     |    2 +-\n  8 files changed, 97 insertions(+), 102 deletions(-)\n\ndiff --git a/contrib/gitview/gitview b/contrib/gitview/gitview\nindex 2d80e2b..3dc1ef5 100755\n--- a/contrib/gitview/gitview\n+++ b/contrib/gitview/gitview\n@@ -1277,5 +1277,3 @@ if __name__ == \"__main__\":\n\n  \tview = GitView( without_diff != 1)\n  \tview.run(sys.argv[without_diff:])\n-\n-\ndiff --git a/git-archimport.perl b/git-archimport.perl\nindex c1e7c1d..b210772 100755\n--- a/git-archimport.perl\n+++ b/git-archimport.perl\n@@ -3,19 +3,19 @@\n  # This tool is copyright (c) 2005, Martin Langhoff.\n  # It is released under the Gnu Public License, version 2.\n  #\n-# The basic idea is to walk the output of tla abrowse,\n-# fetch the changesets and apply them.\n+# The basic idea is to walk the output of tla abrowse,\n+# fetch the changesets and apply them.\n  #\n\n  =head1 Invocation\n\n-    git-archimport [ -h ] [ -v ] [ -o ] [ -a ] [ -f ] [ -T ]\n-    \t[ -D depth] [ -t tempdir ] <archive>/<branch> [ <archive>/<branch> ]\n+    git-archimport [ -h ] [ -v ] [ -o ] [ -a ] [ -f ] [ -T ]\n+\t[ -D depth] [ -t tempdir ] <archive>/<branch> [ <archive>/<branch> ]\n\n  Imports a project from one or more Arch repositories. It will follow branches\n  and repositories within the namespaces defined by the <archive/branch>\n  parameters supplied. If it cannot find the remote branch a merge comes from\n-it will just import it as a regular commit. If it can find it, it will mark it\n+it will just import it as a regular commit. If it can find it, it will mark it\n  as a merge whenever possible.\n\n  See man (1) git-archimport for more details.\n@@ -25,14 +25,14 @@ See man (1) git-archimport for more details.\n   - create tag objects instead of ref tags\n   - audit shell-escaping of filenames\n   - hide our private tags somewhere smarter\n- - find a way to make \"cat *patches | patch\" safe even when patchfiles are missing newlines\n+ - find a way to make \"cat *patches | patch\" safe even when patchfiles are missing newlines\n   - sort and apply patches by graphing ancestry relations instead of just\n     relying in dates supplied in the changeset itself.\n     tla ancestry-graph -m could be helpful here...\n\n  =head1 Devel tricks\n\n-Add print in front of the shell commands invoked via backticks.\n+Add print in front of the shell commands invoked via backticks.\n\n  =head1 Devel Notes\n\n@@ -126,16 +126,16 @@ sub do_abrowse {\n      my $stage = shift;\n      while (my ($limit, $level) = each %arch_branches) {\n          next unless $level == $stage;\n-\n-\topen ABROWSE, \"$TLA abrowse -fkD --merges $limit |\"\n+\n+\topen ABROWSE, \"$TLA abrowse -fkD --merges $limit |\"\n                                  or die \"Problems with tla abrowse: $!\";\n-\n+\n          my %ps        = ();         # the current one\n          my $lastseen  = '';\n-\n+\n          while (<ABROWSE>) {\n              chomp;\n-\n+\n              # first record padded w 8 spaces\n              if (s/^\\s{8}\\b//) {\n                  my ($id, $type) = split(m/\\s+/, $_, 2);\n@@ -147,13 +147,13 @@ sub do_abrowse {\n                      push (@psets, \\%last_ps);\n                      $psets{ $last_ps{id} } = \\%last_ps;\n                  }\n-\n+\n                  my $branch = extract_versionname($id);\n                  %ps = ( id => $id, branch => $branch );\n                  if (%last_ps && ($last_ps{branch} eq $branch)) {\n                      $ps{parent_id} = $last_ps{id};\n                  }\n-\n+\n                  $arch_branches{$branch} = 1;\n                  $lastseen = 'id';\n\n@@ -166,16 +166,16 @@ sub do_abrowse {\n                      $ps{type} = 't';\n                      # read which revision we've tagged when we parse the log\n                      $ps{tag}  = $1;\n-                } else {\n+                } else {\n                      warn \"Unknown type $type\";\n                  }\n\n                  $arch_branches{$branch} = 1;\n                  $lastseen = 'id';\n-            } elsif (s/^\\s{10}//) {\n-                # 10 leading spaces or more\n+            } elsif (s/^\\s{10}//) {\n+                # 10 leading spaces or more\n                  # indicate commit metadata\n-\n+\n                  # date\n                  if ($lastseen eq 'id' && m/^(\\d{4}-\\d\\d-\\d\\d \\d\\d:\\d\\d:\\d\\d)/){\n                      $ps{date}   = $1;\n@@ -186,12 +186,12 @@ sub do_abrowse {\n                  } elsif ($lastseen eq 'merges' && s/^\\s{2}//) {\n                      my $id = $_;\n                      push (@{$ps{merges}}, $id);\n-\n+\n                      # aggressive branch finding:\n                      if ($opt_D) {\n                          my $branch = extract_versionname($id);\n                          my $repo = extract_reponame($branch);\n-\n+\n                          if (archive_reachable($repo) &&\n                                  !defined $arch_branches{$branch}) {\n                              $arch_branches{$branch} = $stage + 1;\n@@ -208,10 +208,10 @@ sub do_abrowse {\n              if (@psets && $psets[$#psets]{branch} eq $ps{branch}) {\n                  $temp{parent_id} = $psets[$#psets]{id};\n              }\n-            push (@psets, \\%temp);\n+            push (@psets, \\%temp);\n              $psets{ $temp{id} } = \\%temp;\n-        }\n-\n+        }\n+\n          close ABROWSE or die \"$TLA abrowse failed on $limit\\n\";\n      }\n  }                               # end foreach $root\n@@ -253,7 +253,7 @@ unless (-d $git_dir) { # initial import\n      while (my $file = readdir(DIR)) {\n          # skip non-interesting-files\n          next unless -f \"$ptag_dir/$file\";\n-\n+\n          # convert first '--' to '/' from old git-archimport to use\n          # as an archivename/c--b--v private tag\n          if ($file !~ m!,!) {\n@@ -275,7 +275,7 @@ sub extract_reponame {\n      my $fq_cvbr = shift; # archivename/[[[[category]branch]version]revision]\n      return (split(/\\//, $fq_cvbr))[0];\n  }\n-\n+\n  sub extract_versionname {\n      my $name = shift;\n      $name =~ s/--(?:patch|version(?:fix)?|base)-\\d+$//;\n@@ -283,7 +283,7 @@ sub extract_versionname {\n  }\n\n  # convert a fully-qualified revision or version to a unique dirname:\n-#   normalperson@yhbt.net-05/mpd--uclinux--1--patch-2\n+#   normalperson@yhbt.net-05/mpd--uclinux--1--patch-2\n  # becomes: normalperson@yhbt.net-05,mpd--uclinux--1\n  #\n  # the git notion of a branch is closer to\n@@ -339,7 +339,7 @@ sub git_branchname {\n\n  sub process_patchset_accurate {\n      my $ps = shift;\n-\n+\n      # switch to that branch if we're not already in that branch:\n      if (-e \"$git_dir/refs/heads/$ps->{branch}\") {\n         system('git-checkout','-f',$ps->{branch}) == 0 or die \"$! $?\\n\";\n@@ -348,7 +348,7 @@ sub process_patchset_accurate {\n         my $rm = safe_pipe_capture('git-ls-files','--others','-z');\n         rmtree(split(/\\0/,$rm)) if $rm;\n      }\n-\n+\n      # Apply the import/changeset/merge into the working tree\n      my $dir = sync_to_ps($ps);\n      # read the new log entry:\n@@ -361,9 +361,9 @@ sub process_patchset_accurate {\n      parselog($ps, \\@commitlog);\n\n      if ($ps->{id} =~ /--base-0$/ && $ps->{id} ne $psets[0]{id}) {\n-        # this should work when importing continuations\n+        # this should work when importing continuations\n          if ($ps->{tag} && (my $branchpoint = eval { ptag($ps->{tag}) })) {\n-\n+\n              # find where we are supposed to branch from\n  \t    if (! -e \"$git_dir/refs/heads/$ps->{branch}\") {\n  \t\tsystem('git-branch',$ps->{branch},$branchpoint) == 0 or die \"$! $?\\n\";\n@@ -388,8 +388,8 @@ sub process_patchset_accurate {\n          }\n          # allow multiple bases/imports here since Arch supports cherry-picks\n          # from unrelated trees\n-    }\n-\n+    }\n+\n      # update the index with all the changes we got\n      system('git-diff-files --name-only -z | '.\n              'git-update-index --remove -z --stdin') == 0 or die \"$! $?\\n\";\n@@ -402,7 +402,7 @@ sub process_patchset_accurate {\n  # does not handle permissions or any renames involving directories\n  sub process_patchset_fast {\n      my $ps = shift;\n-    #\n+    #\n      # create the branch if needed\n      #\n      if ($ps->{type} eq 'i' && !$import) {\n@@ -417,9 +417,9 @@ sub process_patchset_fast {\n              # new branch! we need to verify a few things\n              die \"Branch on a non-tag!\" unless $ps->{type} eq 't';\n              my $branchpoint = ptag($ps->{tag});\n-            die \"Tagging from unknown id unsupported: $ps->{tag}\"\n+            die \"Tagging from unknown id unsupported: $ps->{tag}\"\n                  unless $branchpoint;\n-\n+\n              # find where we are supposed to branch from\n  \t    if (! -e \"$git_dir/refs/heads/$ps->{branch}\") {\n  \t\tsystem('git-branch',$ps->{branch},$branchpoint) == 0 or die \"$! $?\\n\";\n@@ -435,13 +435,13 @@ sub process_patchset_fast {\n              }\n              system('git-checkout',$ps->{branch}) == 0 or die \"$! $?\\n\";\n              return 0;\n-        }\n+        }\n          die $! if $?;\n-    }\n+    }\n\n      #\n      # Apply the import/changeset/merge into the working tree\n-    #\n+    #\n      if ($ps->{type} eq 'i' || $ps->{type} eq 't') {\n          apply_import($ps) or die $!;\n          $stats{import_or_tag}++;\n@@ -455,10 +455,10 @@ sub process_patchset_fast {\n      # prepare update git's index, based on what arch knows\n      # about the pset, resolve parents, etc\n      #\n-\n-    my @commitlog = safe_pipe_capture($TLA,'cat-archive-log',$ps->{id});\n+\n+    my @commitlog = safe_pipe_capture($TLA,'cat-archive-log',$ps->{id});\n      die \"Error in cat-archive-log: $!\" if $?;\n-\n+\n      parselog($ps,\\@commitlog);\n\n      # imports don't give us good info\n@@ -485,10 +485,10 @@ sub process_patchset_fast {\n          if (@$ren % 2) {\n              die \"Odd number of entries in rename!?\";\n          }\n-\n+\n          while (@$ren) {\n              my $from = shift @$ren;\n-            my $to   = shift @$ren;\n+            my $to   = shift @$ren;\n\n              unless (-d dirname($to)) {\n                  mkpath(dirname($to)); # will die on err\n@@ -529,20 +529,20 @@ if ($opt_f) {\n              \"Things may be a bit slow\\n\";\n      *process_patchset = *process_patchset_accurate;\n  }\n-\n+\n  foreach my $ps (@psets) {\n      # process patchsets\n      $ps->{branch} = git_branchname($ps->{id});\n\n      #\n-    # ensure we have a clean state\n-    #\n+    # ensure we have a clean state\n+    #\n      if (my $dirty = `git-diff-files`) {\n          die \"Unclean tree when about to process $ps->{id} \" .\n              \" - did we fail to commit cleanly before?\\n$dirty\";\n      }\n      die $! if $?;\n-\n+\n      #\n      # skip commits already in repo\n      #\n@@ -559,7 +559,7 @@ foreach my $ps (@psets) {\n      my $tree = `git-write-tree`;\n      die \"cannot write tree $!\" if $?;\n      chomp $tree;\n-\n+\n      #\n      # Who's your daddy?\n      #\n@@ -570,18 +570,18 @@ foreach my $ps (@psets) {\n              close HEAD;\n              chomp $p;\n              push @par, '-p', $p;\n-        } else {\n+        } else {\n              if ($ps->{type} eq 's') {\n                  warn \"Could not find the right head for the branch $ps->{branch}\";\n              }\n          }\n      }\n-\n+\n      if ($ps->{merges}) {\n          push @par, find_parents($ps);\n      }\n\n-    #\n+    #\n      # Commit, tag and clean state\n      #\n      $ENV{TZ}                  = 'GMT';\n@@ -592,14 +592,14 @@ foreach my $ps (@psets) {\n      $ENV{GIT_COMMITTER_EMAIL} = $ps->{email};\n      $ENV{GIT_COMMITTER_DATE}  = $ps->{date};\n\n-    my $pid = open2(*READER, *WRITER,'git-commit-tree',$tree,@par)\n+    my $pid = open2(*READER, *WRITER,'git-commit-tree',$tree,@par)\n          or die $!;\n      print WRITER $ps->{summary},\"\\n\\n\";\n      print WRITER $ps->{message},\"\\n\";\n-\n+\n      # make it easy to backtrack and figure out which Arch revision this was:\n      print WRITER 'git-archimport-id: ',$ps->{id},\"\\n\";\n-\n+\n      close WRITER;\n      my $commitid = <READER>;    # read\n      chomp $commitid;\n@@ -611,7 +611,7 @@ foreach my $ps (@psets) {\n      }\n      #\n      # Update the branch\n-    #\n+    #\n      open  HEAD, \">\",\"$git_dir/refs/heads/$ps->{branch}\";\n      print HEAD $commitid;\n      close HEAD;\n@@ -640,7 +640,7 @@ exit 0;\n  sub sync_to_ps {\n      my $ps = shift;\n      my $tree_dir = $tmp.'/'.tree_dirname($ps->{id});\n-\n+\n      $opt_v && print \"sync_to_ps($ps->{id}) method: \";\n\n      if (-d $tree_dir) {\n@@ -674,7 +674,7 @@ sub sync_to_ps {\n          safe_pipe_capture($TLA,'get','--no-pristine',$ps->{id},$tree_dir);\n          $stats{get_new}++;\n      }\n-\n+\n      # added -I flag to rsync since we're going to fast! AIEEEEE!!!!\n      system('rsync','-aI','--delete','--exclude',$git_dir,\n  #               '--exclude','.arch-inventory',\n@@ -691,15 +691,15 @@ sub apply_import {\n      mkpath($tmp);\n\n      safe_pipe_capture($TLA,'get','-s','--no-pristine',$ps->{id},\"$tmp/import\");\n-    die \"Cannot get import: $!\" if $?;\n+    die \"Cannot get import: $!\" if $?;\n      system('rsync','-aI','--delete', '--exclude',$git_dir,\n  \t\t'--exclude','.arch-ids','--exclude','{arch}',\n  \t\t\"$tmp/import/\", './');\n      die \"Cannot rsync import:$!\" if $?;\n-\n+\n      rmtree(\"$tmp/import\");\n      die \"Cannot remove tempdir: $!\" if $?;\n-\n+\n\n      return 1;\n  }\n@@ -712,13 +712,13 @@ sub apply_cset {\n      # get the changeset\n      safe_pipe_capture($TLA,'get-changeset',$ps->{id},\"$tmp/changeset\");\n      die \"Cannot get changeset: $!\" if $?;\n-\n+\n      # apply patches\n      if (`find $tmp/changeset/patches -type f -name '*.patch'`) {\n          # this can be sped up considerably by doing\n          #    (find | xargs cat) | patch\n          # but that can get mucked up by patches\n-        # with missing trailing newlines or the standard\n+        # with missing trailing newlines or the standard\n          # 'missing newline' flag in the patch - possibly\n          # produced with an old/buggy diff.\n          # slow and safe, we invoke patch once per patchfile\n@@ -741,7 +741,7 @@ sub apply_cset {\n\n      # bring in new files\n      system('rsync','-aI','--exclude',$git_dir,\n-    \t\t'--exclude','.arch-ids',\n+\t\t'--exclude','.arch-ids',\n  \t\t'--exclude', '{arch}',\n  \t\t\"$tmp/changeset/new-files-archive/\",'./');\n\n@@ -789,7 +789,7 @@ sub parselog {\n          removed_files => 1,\n          removed_directories => 1,\n      );\n-\n+\n      chomp (@$log);\n      while ($_ = shift @$log) {\n          if (/^Continuation-of:\\s*(.*)/) {\n@@ -828,7 +828,7 @@ sub parselog {\n              }\n          }\n      }\n-\n+\n      # drop leading empty lines from the log message\n      while (@$log && $log->[0] eq '') {\n  \tshift @$log;\n@@ -842,7 +842,7 @@ sub parselog {\n  \t$ps->{summary} = $log->[0] . '...';\n      }\n      $ps->{message} = join(\"\\n\",@$log);\n-\n+\n      # skip Arch control files, unescape pika-escaped files\n      foreach my $k (keys %want_headers) {\n          next unless (defined $ps->{$k});\n@@ -867,7 +867,7 @@ sub parselog {\n  # write/read a tag\n  sub tag {\n      my ($tag, $commit) = @_;\n-\n+\n      if ($opt_o) {\n          $tag =~ s|/|--|g;\n      } else {\n@@ -875,7 +875,7 @@ sub tag {\n  \t$patchname =~ s/.*--//;\n          $tag = git_branchname ($tag) . '--' . $patchname;\n      }\n-\n+\n      if ($commit) {\n          open(C,\">\",\"$git_dir/refs/tags/$tag\")\n              or die \"Cannot create tag $tag: $!\\n\";\n@@ -902,8 +902,8 @@ sub ptag {\n      my ($tag, $commit) = @_;\n\n      # don't use subdirs for tags yet, it could screw up other porcelains\n-    $tag =~ s|/|,|g;\n-\n+    $tag =~ s|/|,|g;\n+\n      my $tag_file = \"$ptag_dir/$tag\";\n      my $tag_branch_dir = dirname($tag_file);\n      mkpath($tag_branch_dir) unless (-d $tag_branch_dir);\n@@ -915,7 +915,7 @@ sub ptag {\n              or die \"Cannot write tag $tag: $!\\n\";\n          close(C)\n              or die \"Cannot write tag $tag: $!\\n\";\n-\t$rptags{$commit} = $tag\n+\t$rptags{$commit} = $tag\n  \t    unless $tag =~ m/--base-0$/;\n      } else {                    # read\n          # if the tag isn't there, return 0\n@@ -941,7 +941,7 @@ sub find_parents {\n      # Identify what branches are merging into me\n      # and whether we are fully merged\n      # git-merge-base <headsha> <headsha> should tell\n-    # me what the base of the merge should be\n+    # me what the base of the merge should be\n      #\n      my $ps = shift;\n\n@@ -963,14 +963,14 @@ sub find_parents {\n      }\n\n      #\n-    # foreach branch find a merge base and walk it to the\n+    # foreach branch find a merge base and walk it to the\n      # head where we are, collecting the merged patchsets that\n      # Arch has recorded. Keep that in @have\n      # Compare that with the commits on the other branch\n      # between merge-base and the tip of the branch (@need)\n      # and see if we have a series of consecutive patches\n      # starting from the merge base. The tip of the series\n-    # of consecutive patches merged is our new parent for\n+    # of consecutive patches merged is our new parent for\n      # that branch.\n      #\n      foreach my $branch (keys %branches) {\n@@ -979,13 +979,13 @@ sub find_parents {\n  \tnext unless -e \"$git_dir/refs/heads/$branch\";\n\n  \tmy $mergebase = `git-merge-base $branch $ps->{branch}`;\n- \tif ($?) {\n- \t    # Don't die here, Arch supports one-way cherry-picking\n- \t    # between branches with no common base (or any relationship\n- \t    # at all beforehand)\n- \t    warn \"Cannot find merge base for $branch and $ps->{branch}\";\n- \t    next;\n- \t}\n+\tif ($?) {\n+\t    # Don't die here, Arch supports one-way cherry-picking\n+\t    # between branches with no common base (or any relationship\n+\t    # at all beforehand)\n+\t    warn \"Cannot find merge base for $branch and $ps->{branch}\";\n+\t    next;\n+\t}\n  \tchomp $mergebase;\n\n  \t# now walk up to the mergepoint collecting what patches we have\n@@ -1010,7 +1010,7 @@ sub find_parents {\n  \t# merge what we have with what ancestors have\n  \t%have = (%have, %ancestorshave);\n\n-\t# see what the remote branch has - these are the merges we\n+\t# see what the remote branch has - these are the merges we\n  \t# will want to have in a consecutive series from the mergebase\n  \tmy $otherbranchtip = git_rev_parse($branch);\n  \tmy @needraw = `git-rev-list --topo-order $otherbranchtip ^$mergebase`;\n@@ -1018,7 +1018,7 @@ sub find_parents {\n  \tforeach my $needps (@needraw) { \t# get the psets\n  \t    $needps = commitid2pset($needps);\n  \t    # git-rev-list will also\n-\t    # list commits merged in via earlier\n+\t    # list commits merged in via earlier\n  \t    # merges. we are only interested in commits\n  \t    # from the branch we're looking at\n  \t    if ($branch eq $needps->{branch}) {\n@@ -1054,7 +1054,7 @@ sub find_parents {\n  \tnext unless ref    $psets{$p}{merges};\n  \tmy @merges = @{$psets{$p}{merges}};\n  \tforeach my $merge (@merges) {\n-\t    if ($parents{$merge}) {\n+\t    if ($parents{$merge}) {\n  \t\tdelete $parents{$merge};\n  \t    }\n  \t}\n@@ -1079,10 +1079,10 @@ sub git_rev_parse {\n  sub commitid2pset {\n      my $commitid = shift;\n      chomp $commitid;\n-    my $name = $rptags{$commitid}\n+    my $name = $rptags{$commitid}\n  \t|| die \"Cannot find reverse tag mapping for $commitid\";\n      $name =~ s|,|/|;\n-    my $ps   = $psets{$name}\n+    my $ps   = $psets{$name}\n  \t|| (print Dumper(sort keys %psets)) && die \"Cannot find patchset for $name\";\n      return $ps;\n  }\n@@ -1112,7 +1112,7 @@ sub archive_reachable {\n      my $archive = shift;\n      return 1 if $reachable{$archive};\n      return 0 if $unreachable{$archive};\n-\n+\n      if (system \"$TLA whereis-archive $archive >/dev/null\") {\n          if ($opt_a && (system($TLA,'register-archive',\n                        \"http://mirrors.sourcecontrol.net/$archive\") == 0)) {\n@@ -1127,4 +1127,3 @@ sub archive_reachable {\n          return 1;\n      }\n  }\n-\ndiff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl\nindex d6ae99b..f95e369 100755\n--- a/git-cvsexportcommit.perl\n+++ b/git-cvsexportcommit.perl\n@@ -193,7 +193,7 @@ if (@canstatusfiles) {\n  # ... validate new files,\n  foreach my $f (@afiles) {\n      if (defined ($cvsstat{$f}) and $cvsstat{$f} ne \"Unknown\") {\n- \t$dirty = 1;\n+\t$dirty = 1;\n  \twarn \"File $f is already known in your CVS checkout -- perhaps it has been added by another user. Or this may \nindicate that it exists on a different branch. If this is the case, use -f to force the merge.\\n\";\n  \twarn \"Status was: $cvsstat{$f}\\n\";\n      }\ndiff --git a/git-cvsimport.perl b/git-cvsimport.perl\nindex ac74bc5..d41eace 100755\n--- a/git-cvsimport.perl\n+++ b/git-cvsimport.perl\n@@ -145,7 +145,7 @@ my $cvs_tree;\n  if ($#ARGV == 0) {\n  \t$cvs_tree = $ARGV[0];\n  } elsif (-f 'CVS/Repository') {\n-\topen my $f, '<', 'CVS/Repository' or\n+\topen my $f, '<', 'CVS/Repository' or\n  \t    die 'Failed to open CVS/Repository';\n  \t$cvs_tree = <$f>;\n  \tchomp $cvs_tree;\n@@ -434,7 +434,7 @@ sub file {\n  \tmy ($self,$fn,$rev) = @_;\n  \tmy $res;\n\n-\tmy ($fh, $name) = tempfile('gitcvs.XXXXXX',\n+\tmy ($fh, $name) = tempfile('gitcvs.XXXXXX',\n  \t\t    DIR => File::Spec->tmpdir(), UNLINK => 1);\n\n  \t$self->_file($fn,$rev) and $res = $self->_line($fh);\n@@ -520,8 +520,8 @@ sub is_sha1 {\n\n  sub get_headref ($$) {\n      my $name    = shift;\n-    my $git_dir = shift;\n-\n+    my $git_dir = shift;\n+\n      my $f = \"$git_dir/refs/heads/$name\";\n      if (open(my $fh, $f)) {\n  \t    chomp(my $r = <$fh>);\n@@ -771,7 +771,7 @@ sub commit {\n  \t\t$xtag =~ s/\\s+\\*\\*.*$//; # Remove stuff like ** INVALID ** and ** FUNKY **\n  \t\t$xtag =~ tr/_/\\./ if ( $opt_u );\n  \t\t$xtag =~ s/[\\/]/$opt_s/g;\n-\t\t\n+\n  \t\tmy $pid = open2($in, $out, 'git-mktag');\n  \t\tprint $out \"object $cid\\n\".\n  \t\t    \"type commit\\n\".\n@@ -788,7 +788,7 @@ sub commit {\n  \t\t     $? != 0 or $tagobj !~ /^[0123456789abcdef]{40}$/ ) {\n  \t\t    die \"Cannot create tag object $xtag: $!\\n\";\n  \t        }\n-\t\t\n+\n\n  \t\topen(C,\">$git_dir/refs/tags/$xtag\")\n  \t\t\tor die \"Cannot create tag $xtag: $!\\n\";\ndiff --git a/git-gui/lib/class.tcl b/git-gui/lib/class.tcl\nindex 88b0565..72494c1 100644\n--- a/git-gui/lib/class.tcl\n+++ b/git-gui/lib/class.tcl\n@@ -151,4 +151,3 @@ auto_mkindex_parser::command constructor {name args} {\n  \t\t[format { [list source [file join $dir %s]]} \\\n  \t\t[file split $scriptFile]] \"\\n\"\n  }\n-\ndiff --git a/git-p4import.py b/git-p4import.py\nindex 60a758b..0f3d97b 100644\n--- a/git-p4import.py\n+++ b/git-p4import.py\n@@ -358,4 +358,3 @@ for id in changes:\n      if stitch == 1:\n          git.clean_directories()\n          stitch = 0\n-\ndiff --git a/git-svnimport.perl b/git-svnimport.perl\nindex 3af8c7e..f459762 100755\n--- a/git-svnimport.perl\n+++ b/git-svnimport.perl\n@@ -542,7 +542,7 @@ sub copy_path($$$$$$$$) {\n  \tif ($node_kind eq $SVN::Node::dir) {\n  \t\t$srcpath =~ s#/*$#/#;\n  \t}\n-\t\n+\n  \tmy $pid = open my $f,'-|';\n  \tdie $! unless defined $pid;\n  \tif (!$pid) {\n@@ -560,7 +560,7 @@ sub copy_path($$$$$$$$) {\n  \t\t} else {\n  \t\t\t$p = $path;\n  \t\t}\n-\t\tpush(@$new,[$mode,$sha1,$p]);\t\n+\t\tpush(@$new,[$mode,$sha1,$p]);\n  \t}\n  \tclose($f) or\n  \t\tprint STDERR \"$newrev:$newbranch: could not list files in $oldpath \\@ $rev\\n\";\ndiff --git a/gitk b/gitk\nindex a57e84c..87c3690 100755\n--- a/gitk\n+++ b/gitk\n@@ -337,7 +337,7 @@ proc readrefs {} {\n  \t\t    set tagids($name) $commit\n  \t\t    lappend idtags($commit) $name\n  \t\t}\n-\t    }\t\t\n+\t    }\n  \t    catch {\n  \t        set tagcontents($name) [exec git cat-file tag $id]\n  \t    }\n-- \n1.5.2.rc3.90.gf33e-dirty\n"}]}