Skip to content

Latest commit

 

History

History
35 lines (21 loc) · 844 Bytes

Readme.md

File metadata and controls

35 lines (21 loc) · 844 Bytes

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