path: root/Makefile
AgeCommit message (Collapse)Author
2006-05-01built-in "git grep"Junio C Hamano
This attempts to set up built-in "git grep" to further reduce our dependence on the shell, while at the same time optionally allowing to run grep against object database. You could do funky things like these: git grep --cached -e pattern ;# grep from index git grep -e pattern master ;# or in a rev git grep -e pattern master next ;# or in multiple revs git grep -e pattern pu^@ ;# even like this with an ;# extension from another topic ;-) git grep -e pattern ;# or even from rev ranges git grep -e pattern master~20:Documentation ;# or an arbitrary tree git grep -e pattern ;# or an arbitrary blob Right now, it does not understand and/or obey many options grep should accept, and the pattern must be given with -e option due to the way the parameter parser is structured, both of which obviously need to be fixed for usability. But this is going in the right direction. The shell script version is one of the worst Portability offender in the git barebone Porcelainish; it uses xargs -0 to pass paths around and shell arrays to sift flags and parameters. Signed-off-by: Junio C Hamano <>
2006-04-26Makefile: remove and create xdiff library from scratch.Junio C Hamano
... in the same spirit as 71459c193d04870076efa0a387c317390b53e3e2. Signed-off-by: Junio C Hamano <>
2006-04-26Merge branch 'jc/diff'Junio C Hamano
* jc/diff: Libified diff-index: backward compatibility fix. Libify diff-index. Libify diff-files.
2006-04-26Makefile: remove and create libgit.a from scratch.Junio C Hamano
Foolishly I renamed diff.o around which caused an old diff.o taken out of libgit.a and got linked into resulting binary and exhibited mysterious breakage for many people. This borrows from the kernel Makefile (scripts/ to first remove the target and then recreate. Signed-off-by: Junio C Hamano <>
2006-04-22Libify diff-files.Junio C Hamano
This is the first installment to libify diff brothers. The updated diff-files uses revision.c::setup_revisions() infrastructure to parse its command line arguments, which means the pathname arguments are checked more strictly than before. The tests are adjusted to separate possibly missing paths from the rest of arguments with double-dashes, to show the kosher way. As Linus pointed out, renaming diff.c to diff-lib.c was simply stupid, so I am renaming it back. The new diff-lib.c is to contain pieces extracted from diff brothers. Signed-off-by: Junio C Hamano <>
2006-04-22Makefile: dependency for builtin-help.oJunio C Hamano
builtin-help.c wants to include common-cmds.h which is a generated file. Signed-off-by: Junio C Hamano <>
2006-04-21Split up builtin commands into separate files from git.cLinus Torvalds
Right now it split it into "builtin-log.c" for log-related commands ("log", "show" and "whatchanged"), and "builtin-help.c" for the informational commands (usage printing and "help" and "version"). This just makes things easier to read, I find. Signed-off-by: Linus Torvalds <> Signed-off-by: Junio C Hamano <>
2006-04-19diff: move diff.c to diff-lib.c to make room.Junio C Hamano
Now I am not doing any real "git-diff in C" yet, but this would help before doing so. Signed-off-by: Junio C Hamano <>
2006-04-18Add git-annotate(1) and git-blame(1)Jonas Fonseca
[jc: with entries in git.txt] Signed-off-by: Jonas Fonseca <> Signed-off-by: Junio C Hamano <>
2006-04-17Makefile fixups.A Large Angry SCM
Signed-off-by: A Large Angry SCM <> Signed-off-by: Junio C Hamano <>
2006-04-13Makefile: $(MAKE) check-docsJunio C Hamano
This target lists undocumented commands, and/or whose document is not referenced from the main git documentation. For now, there are some exceptions I added primarily because I lack the energy to document them myself: - merge backends (we should really document them) - ssh-push/ssh-pull (does anybody still use them?) - annotate and blame (maybe after one of them eats the other ;-) Signed-off-by: Junio C Hamano <>
2006-04-11Merge branch 'ds/index' into nextJunio C Hamano
* ds/index: Replace index() with strchr(). Solaris 9 also wants our own unsetenv/setenv. Retire (take #3)
2006-04-11Solaris 9 also wants our own unsetenv/setenv.Dennis Stosberg
[jc: the original had "index() is evil" but that should be a separate patch.]
2006-04-11Retire (take #3)Junio C Hamano
Do not install built-in commands as separate files -- use hardlinks instead. Signed-off-by: Junio C Hamano <>
2006-04-11Merge branch 'jc/withraw' into nextJunio C Hamano
* jc/withraw: diff-* --patch-with-raw Retire (take#2) Retire Retire diffcore-pathspec. Improve the git-diff-tree -c/-cc documentation
2006-04-11Retire (take#2)Junio C Hamano
... and install a replacement properly. Signed-off-by: Junio C Hamano <>
2006-04-11Retire git-log.shJunio C Hamano
Signed-off-by: Junio C Hamano <>
2006-04-10Retire diffcore-pathspec.Junio C Hamano
Nobody except diff-stages used it -- the callers instead filtered the input to diffcore themselves. Make diff-stages do that as well and retire diffcore-pathspec. Signed-off-by: Junio C Hamano <>
2006-04-09log-tree: separate major part of diff-tree.Junio C Hamano
This separates out the part that deals with one-commit diff-tree (and --stdin form) into a separate log-tree module. There are two goals with this. The more important one is to be able to make this part available to "git log --diff", so that we can have a native "git whatchanged" command. Another is to simplify the commit log generation part simpler. Signed-off-by: Junio C Hamano <>
2006-04-05Merge branch 'nh/http' into nextJunio C Hamano
* nh/http: Fix compile with expat, but an old curl version
2006-04-05Fix compile with expat, but an old curl versionJohannes Schindelin
With an old curl version, git-http-push is not compiled. But git-http-fetch still needs to be linked with expat if NO_EXPAT is not defined. Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2006-04-05Merge branches 'master' and 'jc/combine' into nextJunio C Hamano
* master: Add git-clean command diff_flush(): leakfix. parse_date(): fix parsing 03/10/2006 * jc/combine: combine-diff: refactor built-in xdiff interface.
2006-04-05Add git-clean commandPavel Roskin
This command removes untracked files from the working tree. This implementation is based on cg-clean with some simplifications. The documentation is included. [jc: with trivial documentation fix, noticed by Jakub Narebski] Signed-off-by: Pavel Roskin <> Signed-off-by: Junio C Hamano <>
2006-04-05combine-diff: refactor built-in xdiff interface.Junio C Hamano
This refactors the line-by-line callback mechanism used in combine-diff so that other programs can reuse it more easily. Signed-off-by: Junio C Hamano <>
2006-04-05http-fetch: add optional DAV-based pack listNick Hengeveld
If git is not built with NO_EXPAT, this patch changes git-http-fetch to attempt using DAV to get a list of remote packs and fall back to using objects/info/packs if the DAV request fails. Signed-off-by: Nick Hengeveld <> Signed-off-by: Junio C Hamano <>
2006-04-04Set HTTP user agent to git/GIT_VERSIONNick Hengeveld
Useful for diagnostics/troubleshooting to know which client versions are hitting your server. Signed-off-by: Nick Hengeveld <> Signed-off-by: Junio C Hamano <>
2006-04-01Makefile: many programs now depend on xdiff/lib.a having been built.Junio C Hamano
The dependency was not properly updated when we added this library, breaking parallel build with $(MAKE) -j. Signed-off-by: Junio C Hamano <>
2006-03-30tree/diff header cleanup.Junio C Hamano
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 <>
2006-03-28Add ALL_LDFLAGS to the git target.Jason Riedy
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,, 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 <> Signed-off-by: Junio C Hamano <>
2006-03-27Merge branch 'lt/diffgen' into nextJunio C Hamano
* lt/diffgen: add clean and ignore rules for xdiff/ Remove dependency on a file named "-lz"
2006-03-27add clean and ignore rules for xdiff/Junio C Hamano
Signed-off-by: Junio C Hamano <>
2006-03-27Remove dependency on a file named "-lz"Johannes Schindelin
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 <> Signed-off-by: Junio C Hamano <>
2006-03-26Merge branch 'lt/diffgen' into nextJunio C Hamano
* lt/diffgen: built-in diff: minimum tweaks builtin-diff: \No newline at end of file. Use a *real* built-in diff generator
2006-03-26Use a *real* built-in diff generatorLinus Torvalds
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 <> Signed-off-by: Junio C Hamano <>
2006-03-18Merge branch 'master' into nextJunio C Hamano
* master: Makefile: Add TAGS and tags targets ls-files: Don't require exclude files to end with a newline.
2006-03-18Makefile: Add TAGS and tags targetsFredrik Kuivinen
Signed-off-by: Fredrik Kuivinen <> Signed-off-by: Junio C Hamano <>
2006-03-11Merge branch 'fk/blame' into nextJunio C Hamano
* 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
2006-03-11Add git-imap-send, derived from isync 1.0.1.Mike McCormack
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 /usr/bin/imapd ./Maildir 2> /dev/null" [imap] Host = User = bob Password = pwd Port = 143
2006-03-09Merge branch 'jc/fsck' into nextJunio C Hamano
* 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
2006-03-09Nicer output from 'git'Fredrik Kuivinen
[jc: with suggestions by Jan-Benedict Glaw] Signed-off-by: Fredrik Kuivinen <> Signed-off-by: Junio C Hamano <>
2006-03-09test-delta needs zlib to compileNicolas Pitre
Signed-off-by: Nicolas Pitre <> Signed-off-by: Junio C Hamano <>
2006-03-08Merge branch 'master' into nextJunio C Hamano
* master: repo-config: give value_ a sane default so regexec won't segfault Update http-push functionality cvsimport: Remove master-updating code
2006-03-08Update http-push functionalityNick Hengeveld
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 <>
2006-03-06blame: avoid -lm by not using log().Junio C Hamano
... as suggested on the list. Signed-off-by: Junio C Hamano <>
2006-03-05git-blame: Make the output human readableFredrik Kuivinen
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 <> Signed-off-by: Junio C Hamano <>
2006-03-04count-delta: no need for this anymore.Junio C Hamano
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 <>
2006-03-04Merge branch 'fk/blame'Junio C Hamano
* fk/blame: git-blame, take 2 Merge part of 'lt/rev-list' into 'fk/blame' Add git-blame, a tool for assigning blame.
2006-03-04Merge branch 'lt/rev-list'Junio C Hamano
* 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
2006-03-02Merge part of 'lt/rev-list' into 'fk/blame'Junio C Hamano
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 <>
2006-03-01Rip out merge-order and make "git log <paths>..." work again.Linus Torvalds
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 <>