Comments (10)
Andrew and I were poking around in git today. The places you will want to look are the diff*
src files (e.g., diffcore-pickaxe.c
, diff.c
, and so on). Particularly useful as a place to start may be delta.h
, as this houses the comments for the functions that occur in these diff*
files. The function create_delta()
seems promising, and is declared in delta.h
and implemented in diff-delta.h
.
What seems to be happening here is that files and commits are stored in the index
-- note that this is not a number, but a struct, and appears to be very similar, if not the same thing as the index
that you add files to when you run git add [filename]
(i.e., this command puts a file in git's index).
Hope this helps!
from libgit2.
Yep, we'll look through that stuff. Landon and will probably get together this weekend -- I have a physics midterm and non-school stuff to do until Friday afternoon or so, so I won't be able to dedicate much time to this until then.
from libgit2.
We found where you guys should start looking. It is in the git repo, "git/builtin/diff.c".
This contains all of the methods that can be called when a 'git diff ...' command is issued and should be the primary reference source of what you guys will be supplying for third party interaction between our diff implementation(s) and the user linking libgit2.
from libgit2.
Alright, guys. Here is the KEY to your implementation... in
builtin/diff.cthe function
cmd_diff(the last function) contains the comment of how the command-line options correspond to specific function calls.
from libgit2.
You may have noticed that comments are sparse in the git source. Here is the cure:
Documentation/technical
Inside is a shit-ton of API .txt files that explain everything. Diff, merge, whatever. This is what you guys need to do your job.
from libgit2.
Morning yet again, gentlemen. In today's exciting installment of "Andrew and Alex do your jobs for you", we will point you to a specific file that is (we think) the crux of your problem:
xdiff-interface.c
So remember, the goal here is to implement all the features needed to diff. Please call me if you have any questions about how that works.
from libgit2.
Dear sweethearts,
If you were wondering, the diff function call patterns goes roughly as so, starting with the more general interface methods, and getting more specific (i.e., closer to the actual diff) as you go down the list.
xdiff-interface.c -> xdi_diff()
-- the interface method used by git to interact with xdiff's diffing functionalityxdiff/xdiff.c -> xdl_diff()
-- sets up initial diff requirements, decides whether or not to use patiencexdiff/xdiff.c -> xdl_do_diff()
-- sets up more specific requirements for diff stuffxdiff/xdiff.c -> xdl_recs_cmp()
-- diffs and passes diff into thediffdata_t
parameters, method name means "recursively compare" FYI
Love,
Alex and Andrew
from libgit2.
@kyeana, you were talking about windows/unix interface. Just FYI, the win32/
folder I think houses the official windows interface, while the unix/
folder houses the unix stuff.
from libgit2.
Addendum: they both appear to implement the map.h
file from src/
. So my guess is you can just access the windows or unix API through the interface defined in map.h
and let a #define
or something handle which file it is that you compile that for. Or maybe that's actually handled by waf. I dunno.
from libgit2.
Also, it appears that you can access this functionality via src/dir.h
.
from libgit2.
Related Issues (20)
- Patience diff HOT 18
- xdlclassifier and xdlclass do not appear to have any function whatsoever HOT 2
- Explore bogosqrt vs q3sqrt HOT 16
- Style compliancy problems HOT 5
- Use or define the libdiff malloc HOT 7
- Implement diff unit tests for libgit2 HOT 35
- We need to rehearse the final presentation and what-not. HOT 3
- Function Declarations HOT 2
- patience: insert_record possible improvements
- patience: fillhashmap possible improvements
- patience: find_longest_common_sequence possible improvements
- merge dev-algo-[patience core] HOT 3
- extraneous spaces in libdiff.c HOT 9
- diff_no_index() fails to read files HOT 46
- use c89 style comments HOT 3
- Create diff error codes HOT 1
- git diff with newly added files. HOT 1
- Figure out Git's diff unit tests, implement for libgit2 HOT 2
- Flags variable is getting passed in uninitialized (full 'o garbage)
- Get Alex's private branch merged HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libgit2.