version control - Accurate git commits -
if have code like
/** * blah blah blah */ ...some codes... /** * yadda yadda
and add
/** * blah blah blah */ ...some codes... /** * blah blah blah */ ...some codes...
before "yadda yadda" commanet, git diff show added:
+ * blah blah blah + */ + ...some codes... + /**
is there way tell git, "hey, that's not right. try again."? know of --patience
seems git diff , life of me never works correctly. know it's no super important, makes diffs , commit logs, on github, more clean.
the way git stores files in repository on whole-file basis. when ask difference between 2 versions, git retrieves both complete files repository1, , runs diff algorithm between them. unlike other source control systems, git not calculate or store differences between files @ time of commit.
this method has advantage of changing behaviour of diff @ time ask it. example, have seen --patience
flag uses different diff algorithm determine (possibly) better patch between 2 files.
because of way files stored in git repository, not possible tell git somehow keep track of custom diff alignment.
- deep down in git repository, inside
.pack
files, git uses various delta encoding methods store differences between similar objects , reduce size of repository. however, on lower level file storage , not actual diffs between source files.
Comments
Post a Comment