aboutsummaryrefslogtreecommitdiff
path: root/Makefile
Commit message (Collapse)AuthorAge
* tree/diff header cleanup.Junio C Hamano2006-03-29
| | | | | | | | | | | | | | | Introduce tree-walk.[ch] and move "struct tree_desc" and associated functions from various places. Rename DIFF_FILE_CANON_MODE(mode) macro to canon_mode(mode) and move it to cache.h. This macro returns the canonicalized st_mode value in the host byte order for files, symlinks and directories -- to be compared with a tree_desc entry. create_ce_mode(mode) in cache.h is similar but is intended to be used for index entries (so it does not work for directories) and returns the value in the network byte order. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add ALL_LDFLAGS to the git target.Jason Riedy2006-03-27
| | | | | | | | | | For some reason, I need ALL_LDFLAGS in the git target only on AIX. Once it builds, only one test "fails" on AIX 5.1 with 1.3.0.rc1, t5500-fetch-pack.sh, but it looks like it's some odd tool problem in the tester + my setup and not a real bug. Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'lt/diffgen' into nextJunio C Hamano2006-03-26
|\ | | | | | | | | | | * lt/diffgen: add clean and ignore rules for xdiff/ Remove dependency on a file named "-lz"
| * add clean and ignore rules for xdiff/Junio C Hamano2006-03-26
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Remove dependency on a file named "-lz"Johannes Schindelin2006-03-26
| | | | | | | | | | | | | | | | By changing the dependency "$(LIB_H)" to "$(LIBS)", at least one version of make thought that a file named "-lz" would be needed. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'lt/diffgen' into nextJunio C Hamano2006-03-25
|\ \ | |/ | | | | | | | | | | * lt/diffgen: built-in diff: minimum tweaks builtin-diff: \No newline at end of file. Use a *real* built-in diff generator
| * Use a *real* built-in diff generatorLinus Torvalds2006-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses a simplified libxdiff setup to generate unified diffs _without_ doing fork/execve of GNU "diff". This has several huge advantages, for example: Before: [torvalds@g5 linux]$ time git diff v2.6.16.. > /dev/null real 0m24.818s user 0m13.332s sys 0m8.664s After: [torvalds@g5 linux]$ time git diff v2.6.16.. > /dev/null real 0m4.563s user 0m2.944s sys 0m1.580s and the fact that this should be a lot more portable (ie we can ignore all the issues with doing fork/execve under Windows). Perhaps even more importantly, this allows us to do diffs without actually ever writing out the git file contents to a temporary file (and without any of the shell quoting issues on filenames etc etc). NOTE! THIS PATCH DOES NOT DO THAT OPTIMIZATION YET! I was lazy, and the current "diff-core" code actually will always write the temp-files, because it used to be something that you simply had to do. So this current one actually writes a temp-file like before, and then reads it into memory again just to do the diff. Stupid. But if this basic infrastructure is accepted, we can start switching over diff-core to not write temp-files, which should speed things up even further, especially when doing big tree-to-tree diffs. Now, in the interest of full disclosure, I should also point out a few downsides: - the libxdiff algorithm is different, and I bet GNU diff has gotten a lot more testing. And the thing is, generating a diff is not an exact science - you can get two different diffs (and you will), and they can both be perfectly valid. So it's not possible to "validate" the libxdiff output by just comparing it against GNU diff. - GNU diff does some nice eye-candy, like trying to figure out what the last function was, and adding that information to the "@@ .." line. libxdiff doesn't do that. - The libxdiff thing has some known deficiencies. In particular, it gets the "\No newline at end of file" case wrong. So this is currently for the experimental branch only. I hope Davide will help fix it. That said, I think the huge performance advantage, and the fact that it integrates better is definitely worth it. But it should go into a development branch at least due to the missing newline issue. Technical note: this is based on libxdiff-0.17, but I did some surgery to get rid of the extraneous fat - stuff that git doesn't need, and seriously cutting down on mmfile_t, which had much more capabilities than the diff algorithm either needed or used. In this version, "mmfile_t" is just a trivial <pointer,length> tuple. That said, I tried to keep the differences to simple removals, so that you can do a diff between this and the libxdiff origin, and you'll basically see just things getting deleted. Even the mmfile_t simplifications are left in a state where the diffs should be readable. Apologies to Davide, whom I'd love to get feedback on this all from (I wrote my own "fill_mmfile()" for the new simpler mmfile_t format: the old complex format had a helper function for that, but I did my surgery with the goal in mind that eventually we _should_ just do mmfile_t mf; buf = read_sha1_file(sha1, type, &size); mf->ptr = buf; mf->size = size; .. use "mf" directly .. which was really a nightmare with the old "helpful" mmfile_t, and really is that easy with the new cut-down interfaces). [ Btw, as any hawk-eye can see from the diff, this was actually generated with itself, so it is "self-hosting". That's about all the testing it has gotten, along with the above kernel diff, which eye-balls correctly, but shows the newline issue when you double-check it with "git-apply" ] Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'master' into nextJunio C Hamano2006-03-18
|\ \ | |/ | | | | | | | | * master: Makefile: Add TAGS and tags targets ls-files: Don't require exclude files to end with a newline.
| * Makefile: Add TAGS and tags targetsFredrik Kuivinen2006-03-18
| | | | | | | | | | Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'fk/blame' into nextJunio C Hamano2006-03-10
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | * fk/blame: blame: Rename detection (take 2) rev-lib: Make it easy to do rename tracking (take 2) Make it possible to not clobber object.util in sort_in_topological_order (take 2) Add git-imap-send, derived from isync 1.0.1. repack: prune loose objects when -d is given try_to_simplify_commit(): do not skip inspecting tree change at boundary. Fix t1200 test for breakage caused by removal of full-stop at the end of fast-forward message. Describe how to add extra mail header lines in mail generated by git-format-patch. Document the --attach flag. allow double click on current HEAD id after git-pull
| * Add git-imap-send, derived from isync 1.0.1.Mike McCormack2006-03-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git-imap-send drops a patch series generated by git-format-patch into an IMAP folder. This allows patch submitters to send patches through their own mail program. git-imap-send uses the following values from the GIT repository configuration: The target IMAP folder: [imap] Folder = "INBOX.Drafts" A command to open an ssh tunnel to the imap mail server. [imap] Tunnel = "ssh -q user@imap.server.com /usr/bin/imapd ./Maildir 2> /dev/null" [imap] Host = imap.server.com User = bob Password = pwd Port = 143
* | Merge branch 'jc/fsck' into nextJunio C Hamano2006-03-09
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/fsck: fsck-objects: Remove --standalone refs.c::do_for_each_ref(): Finish error message lines with "\n" Nicer output from 'git' Use #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) Remove trailing dot after short description Fix some inconsistencies in the docs contrib/git-svn: fix a harmless warning on rebuild (with old repos) contrib/git-svn: remove the --no-stop-on-copy flag contrib/git-svn: fix svn compat and fetch args Don't recurse into parents marked uninteresting. diff-delta: bound hash list length to avoid O(m*n) behavior test-delta needs zlib to compile git-fmt-merge-msg cleanup
| * Nicer output from 'git'Fredrik Kuivinen2006-03-09
| | | | | | | | | | | | | | [jc: with suggestions by Jan-Benedict Glaw] Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * test-delta needs zlib to compileNicolas Pitre2006-03-09
| | | | | | | | | | Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'master' into nextJunio C Hamano2006-03-07
|\ \ | |/ | | | | | | | | | | * master: repo-config: give value_ a sane default so regexec won't segfault Update http-push functionality cvsimport: Remove master-updating code
| * Update http-push functionalityNick Hengeveld2006-03-07
| | | | | | | | | | | | | | | | | | | | | | | | This brings http-push functionality more in line with the ssh/git version, by borrowing bits from send-pack and rev-list to process refspecs and revision history in more standard ways. Also, the status of remote objects is determined using PROPFIND requests for the object directory rather than HEAD requests for each object - while it may be less efficient for small numbers of objects, this approach is able to get the status of all remote loose objects in a maximum of 256 requests. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * blame: avoid -lm by not using log().Junio C Hamano2006-03-05
| | | | | | | | | | | | ... as suggested on the list. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * git-blame: Make the output human readableFredrik Kuivinen2006-03-05
| | | | | | | | | | | | | | | | | | The default output mode is slightly different from git-annotate's. However, git-annotate's output mode can be obtained by using the '-c' flag. Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | count-delta: no need for this anymore.Junio C Hamano2006-03-04
|/ | | | | | | | This is a companion patch to e29e1147e485654d90a0ea0fd5fb7151bb194265 which made diffcore similarity estimator independent from the packfile deltifier. There is no reason for us to be counting the xdelta anymore. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'fk/blame'Junio C Hamano2006-03-04
|\ | | | | | | | | | | | | * fk/blame: git-blame, take 2 Merge part of 'lt/rev-list' into 'fk/blame' Add git-blame, a tool for assigning blame.
| * Merge part of 'lt/rev-list' into 'fk/blame'Junio C Hamano2006-03-02
| |\ | | | | | | | | | | | | | | | | | | | | | Now blame will depend on the new revision walker infrastructure, we need to make it depend on earlier parts of Linus' rev-list topic branch, hence this merge. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Add git-blame, a tool for assigning blame.Fredrik Kuivinen2006-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have also been working on a blame program. The algorithm is pretty much the one described by Junio in his blame.perl. My variant doesn't handle renames, but it shouldn't be too hard to add that. The output is minimal, just the line number followed by the commit SHA1. An interesting observation is that the output from my git-blame and your git-annotate doesn't match on all files in the git repository. One example where several lines differ is read-cache.c. I haven't investigated it further to find out which one is correct. The code should be considered as a work in progress. It certainly has a couple of rough edges. The output looks fairly sane on the few files I have tested it on, but it wouldn't be too surprising if it gets some cases wrong. [jc: adding it to pu for wider comments. I did minimum whitespace fixups but it still needs an indent run and -Wdeclaration-after-statement fixups.] Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'lt/rev-list'Junio C Hamano2006-03-04
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lt/rev-list: setup_revisions(): handle -n<n> and -<n> internally. git-log (internal): more options. git-log (internal): add approxidate. Rip out merge-order and make "git log <paths>..." work again. Tie it all together: "git log" Introduce trivial new pager.c helper infrastructure git-rev-list libification: rev-list walking Splitting rev-list into revisions lib, end of beginning. rev-list split: minimum fixup. First cut at libifying revlist generation
| * | Rip out merge-order and make "git log <paths>..." work again.Linus Torvalds2006-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Well, assuming breaking --merge-order is fine, here's a patch (on top of the other ones) that makes git log <filename> actually work, as far as I can tell. I didn't add the logic for --before/--after flags, but that should be pretty trivial, and is independent of this anyway. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Tie it all together: "git log"Linus Torvalds2006-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is what the previous diffs all built up to. We can do "git log" as a trivial small helper function inside git.c, because the infrastructure is all there for us to use as a library. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Introduce trivial new pager.c helper infrastructureLinus Torvalds2006-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces the new function void setup_pager(void); to set up output to be written through a pager applocation. All in preparation for doing the simple scripts in C. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | First cut at libifying revlist generationLinus Torvalds2006-02-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This really just splits things up partially, and creates the interface to set things up by parsing the command line. No real code changes so far, although the parsing of filenames is a bit stricter. In particular, if there is a "--", then we do not accept any filenames before it, and if there isn't any "--", then we check that _all_ paths listed are valid, not just the first one. The new argument parsing automatically also gives us "--default" and "--not" handling as in git-rev-parse. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | diffcore-rename: split out the delta counting code.Junio C Hamano2006-02-28
| | | | | | | | | | | | | | | | | | | | | This is to rework diffcore break/rename/copy detection code so that it does not affected when deltifier code gets improved. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Darwin: Ignore missing /sw/libShawn Pearce2006-02-28
|/ / | | | | | | | | | | | | | | | | | | When on Darwin platforms don't include Fink or DarwinPorts into the link path unless the related library directory is actually present. The linker on MacOS 10.4 complains if it is given a directory which does not exist. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Build and install git-mailinfo.Junio C Hamano2006-02-24
| | | | | | | | | | | | | | | | | | | | The merge 712b1dd389ad5bcdbaab0279641f0970702fc1f1 was done incorrectly, and lost this program from Makefile. Big thanks go to Tony Luck for noticing it, and Linus for diagnosing it. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'ml/cvs'Junio C Hamano2006-02-22
|\ \ | | | | | | | | | | | | * ml/cvs: Introducing git-cvsserver -- a CVS emulator for git.
| * | Introducing git-cvsserver -- a CVS emulator for git.Martin Langhoff2006-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git-cvsserver is highly functional. However, not all methods are implemented, and for those methods that are implemented, not all switches are implemented. All the common read operations are implemented, and add/remove/commit are supported. Testing has been done using both the CLI CVS client, and the Eclipse CVS plugin. Most functionality works fine with both of these clients. Currently git-cvsserver only works over SSH connections, see the Documentation for more details on how to configure your client. It does not support pserver for anonymous access but it should not be hard to implement. Anonymous access will need tighter input validation. In our very informal tests, it seems to be significantly faster than a real CVS server. This utility depends on a version of git-cvsannotate that supports -S and on DBD::SQLite. Licensed under GPLv2. Copyright The Open University UK. Authors: Martyn Smith <martyn@catalyst.net.nz> Martin Langhoff <martin@catalyst.net.nz> Signed-off-by: Martin Langhoff <martin@catalyst.net.nz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'ra/anno'Junio C Hamano2006-02-22
|\ \ \ | | | | | | | | | | | | | | | | | | | | * ra/anno: Use Ryan's git-annotate instead of jsannotate Add git-annotate, a tool for assigning blame.
| * | | Add git-annotate, a tool for assigning blame.Ryan Anderson2006-02-20
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Ryan Anderson <ryan@michonline.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Add new git-rm command with documentationCarl Worth2006-02-22
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a git-rm command which provides convenience similar to git-add, (and a bit more since it takes care of the rm as well if given -f). Like git-add, git-rm expands the given path names through git-ls-files. This means it only acts on files listed in the index. And it does act recursively on directories by default, (no -r needed as in the case of rm itself). When it recurses, it does not remove empty directories that are left behind. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'js/portable'Junio C Hamano2006-02-21
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * js/portable: Fix "gmake -j" Really honour NO_PYTHON avoid makefile override warning Fixes for ancient versions of GNU make
| * | | Fix "gmake -j"Johannes Schindelin2006-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In my attempt to port git to IRIX, I broke it. Sorry. Signed-off-by: Johannes E. Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Really honour NO_PYTHONJohannes Schindelin2006-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not even test for subprocess (trying to execute python). Signed-off-by: Johannes E. Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | avoid makefile override warningJohannes Schindelin2006-02-19
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Johannes E. Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Fixes for ancient versions of GNU makeJohannes Schindelin2006-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some versions of GNU make do not understand $(call), and have problems to interpret rules like this: some_target: CFLAGS += -Dsome=defs [jc: simplified substitution a bit. ] Signed-off-by: Johannes E. Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Makefile tweaks: Solaris 9+ dont need iconv / move up uname variablesPaul Jakma2006-02-21
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Solaris 9 and up do not need -liconv, so NEEDS_LIBICONV should be set only for S8. - Move the declaration of the uname variables to early in the Makefile so they can be referenced by prefix and gitexecdir variables. - gitexecdir defaults to being same as bindir, it might as well reference that variable. [jc: corrupt patch, sneakily tried to remove inclusion of GIT-VERSION-FILE I do not know why I am applying this...] Signed-off-by: Paul Jakma <paul@quagga.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge part of jc/portable branchJunio C Hamano2006-02-21
|\ \ \ | |/ /
| * | Optionally work without pythonJohannes Schindelin2006-02-18
| | | | | | | | | | | | | | | | | | | | | | | | In some setups (notably server setups) you do not need that dependency. Gracefully handle the absence of python when NO_PYTHON is defined. Signed-off-by: Johannes E. Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Support IrixJohannes Schindelin2006-02-17
| | | | | | | | | | | | | | | Signed-off-by: Johannes E. Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Optionally support old diffsJohannes Schindelin2006-02-17
| |/ | | | | | | | | | | | | | | | | | | Some versions of diff do not correctly detect a missing new-line at the end of the file under certain circumstances. When defining NO_ACCURATE_DIFF, work around this bug. Signed-off-by: Johannes E. Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | git-mktree: reverse of git-ls-tree.Junio C Hamano2006-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | This reads data in the format a (non recursive) ls-tree outputs and writes a tree object to the object database. The created tree object name is output to the standard output. For convenience, the input data does not need to be sorted; the command sorts the input lines internally. By request from Tommi Virtanen. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'lt/merge-tree'Junio C Hamano2006-02-21
|\ \ | |/ |/| | | | | | | | | * lt/merge-tree: git-merge-tree: generalize the "traverse <n> trees in sync" functionality Handling large files with GIT Handling large files with GIT
| * Handling large files with GITLinus Torvalds2006-02-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Tue, 14 Feb 2006, Junio C Hamano wrote: > Linus Torvalds <torvalds@osdl.org> writes: > > > If somebody is interested in making the "lots of filename changes" case go > > fast, I'd be more than happy to walk them through what they'd need to > > change. I'm just not horribly motivated to do it myself. Hint, hint. > > In case anybody is wondering, I share the same feeling. I > cannot say I'd be "more than happy to" clean up potential > breakages during the development of such changes, but if the > change eventually would help certain use cases, I can be > persuaded to help debugging such a mess ;-). Actually, I got interested in seeing how hard this is, and wrote a simple first cut at doing a tree-optimized merger. Let me shout a bit first: THIS IS WORKING CODE, BUT BE CAREFUL: IT'S A TECHNOLOGY DEMONSTRATION RATHER THAN THE FINAL PRODUCT! With that out of the way, let me descibe what this does (and then describe the missing parts). This is basically a three-way merge that works entirely on the "tree" level, rather than on the index. A lot of the _concepts_ are the same, though, and if you're familiar with the results of an index merge, some of the output will make more sense. You give it three trees: the base tree (tree 0), and the two branches to be merged (tree 1 and tree 2 respectively). It will then walk these three trees, and resolve them as it goes along. The interesting part is: - it can resolve whole sub-directories in one go, without actually even looking recursively at them. A whole subdirectory will resolve the same way as any individual files will (although that may need some modification, see later). - if it has a "content conflict", for subdirectories that means "try to do a recursive tree merge", while for non-subdirectories it's just a content conflict and we'll output the stage 1/2/3 information. - a successful merge will output a single stage 0 ("merged") entry, potentially for a whole subdirectory. - it outputs all the resolve information on stdout, so something like the recursive resolver can pretty easily parse it all. Now, the caveats: - we probably need to be more careful about subdirectory resolves. The trivial case (both branches have the exact same subdirectory) is a trivial resolve, but the other cases ("branch1 matches base, branch2 is different" probably can't be silently just resolved to the "branch2" subdirectory state, since it might involve renames into - or out of - that subdirectory) - we do not track the current index file at all, so this does not do the "check that index matches branch1" logic that the three-way merge in git-read-tree does. The theory is that we'd do a full three-way merge (ignoring the index and working directory), and then to update the working tree, we'd do a two-way "git-read-tree branch1->result" - I didn't actually make it do all the trivial resolve cases that git-read-tree does. It's a technology demonstration. Finally (a more serious caveat): - doing things through stdout may end up being so expensive that we'd need to do something else. In particular, it's likely that I should not actually output the "merge results", but instead output a "merge results as they _differ_ from branch1" However, I think this patch is already interesting enough that people who are interested in merging trees might want to look at it. Please keep in mind that tech _demo_ part, and in particular, keep in mind the final "serious caveat" part. In many ways, the really _interesting_ part of a merge is not the result, but how it _changes_ the branch we're merging into. That's particularly important as it should hopefully also mean that the output size for any reasonable case is minimal (and tracks what we actually need to do to the current state to create the final result). The code very much is organized so that doing the result as a "diff against branch1" should be quite easy/possible. I was actually going to do it, but I decided that it probably makes the output harder to read. I dunno. Anyway, let's think about this kind of approach.. Note how the code itself is actually quite small and short, although it's prbably pretty "dense". As an interesting test-case, I'd suggest this merge in the kernel: git-merge-tree $(git-merge-base 4cbf876 7d2babc) 4cbf876 7d2babc which resolves beautifully (there are no actual file-level conflicts), and you can look at the output of that command to start thinking about what it does. The interesting part (perhaps) is that timing that command for me shows that it takes all of 0.004 seconds.. (the git-merge-base thing takes considerably more ;) The point is, we _can_ do the actual merge part really really quickly. Linus PS. Final note: when I say that it is "WORKING CODE", that is obviously by my standards. IOW, I tested it once and it gave reasonable results - so it must be perfect. Whether it works for anybody else, or indeed for any other test-case, is not my problem ;) Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Allow building Git in systems without iconvFernando J. Pereda2006-02-16
|/ | | | | | | | | | | Systems using some uClibc versions do not properly support iconv stuff. This patch allows Git to be built on those systems by passing NO_ICONV=YesPlease to make. The only drawback is mailinfo won't do charset conversion in those systems. Signed-off-by: Fernando J. Pereda <ferdy@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Print an error if cloning a http repo and NO_CURL is setFernando J. Pereda2006-02-15
| | | | | | | | | | If Git is compiled with NO_CURL=YesPlease and one tries to clone a http repository, git-clone tries to call the curl binary. This trivial patch prints an error instead in such situation. Signed-off-by: Fernando J. Pereda <ferdy@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>