more efficient git-cur-branch.sh
[cmccabe-bin] / names_to_numbers.rb
index 9439fd1..0fac484 100755 (executable)
@@ -76,8 +76,10 @@ def get_file_name(num)
 end
 
 def rename_files(file)
-  FileUtils.mv(file, "#{get_file_name(1 + $total_files)}.#{$opts.extension}",
-               $fu_args)
+  dst="#{get_file_name(1 + $total_files)}.#{$opts.extension}"
+  if (file != dst) then
+    FileUtils.mv(file, dst, $fu_args)
+  end
   $total_files = $total_files + 1
 end