Skip to content

UjjwalAggarwal-1/diff-finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Attempt to recreate git diff functionality.

Used LCS to find LCS line-by-line from each code. then find difference in the intermediate lines.

REFERENCE

diff from git diff attached

git diff terminal output

  • git diff does not print the whole file, only the changes portion
  • does not display that i have deleted a space
  • does display if a space is added

vs code extension

vs code output

  • vs code goes even further, shows the change in each line

ATTEMPTS

diff.py

  • uses LCS to find Longest matching code, line by line, and then print diff.
  • other notes in the file

my output

my outputj

diff2.py

  • applied the same logic of LCS to each character in the modified lines to get what is modified.

my output

alt text

About

Exploring 'Hunt and Mcllroy's' and 'Myers Algorithm' for finding diff between 2 files

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages