示例#1
0
 /// <param name="args">two filenames specifying the contents to be diffed</param>
 public static void Main(string[] args)
 {
     if (args.Length != 2)
     {
         System.Console.Error.WriteLine(JGitText.Get().need2Arguments);
         System.Environment.Exit(1);
     }
     try
     {
         RawText  a = new RawText(new FilePath(args[0]));
         RawText  b = new RawText(new FilePath(args[1]));
         EditList r = INSTANCE.Diff(RawTextComparator.DEFAULT, a, b);
         System.Console.Out.WriteLine(r.ToString());
     }
     catch (Exception e)
     {
         Sharpen.Runtime.PrintStackTrace(e);
     }
 }
示例#2
0
 private EditList Diff(RawText a, RawText b)
 {
     return(diffAlgorithm.Diff(comparator, a, b));
 }