summaryrefslogtreecommitdiff
path: root/Makefile
AgeCommit message (Collapse)Author
2008-03-05Do not use GUID on dir in git init --shared=all on FreeBSDAlex Riesen
It does not allow changing the bit to a non-root user. This fixes t1301-shared-repo.sh on the platform. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-03Merge branch 'np/verify-pack'Junio C Hamano
* np/verify-pack: add storage size output to 'git verify-pack -v' fix unimplemented packed_object_info_detail() features make verify_one_pack() a bit less wrong wrt packed_git structure factorize revindex code out of builtin-pack-objects.c Conflicts: Makefile
2008-03-02Merge branch 'mk/maint-parse-careful'Junio C Hamano
* mk/maint-parse-careful: receive-pack: use strict mode for unpacking objects index-pack: introduce checking mode unpack-objects: prevent writing of inconsistent objects unpack-object: cache for non written objects add common fsck error printing function builtin-fsck: move common object checking code to fsck.c builtin-fsck: reports missing parent commits Remove unused object-ref code builtin-fsck: move away from object-refs to fsck_walk add generic, type aware object chain walker Conflicts: Makefile builtin-fsck.c
2008-03-01factorize revindex code out of builtin-pack-objects.cNicolas Pitre
No functional change. This is needed to fix verify-pack in a later patch. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-29use build-time SHELL_PATH in test scriptsJeff King
The top-level Makefile now creates a GIT-BUILD-OPTIONS file which stores any options selected by the make process that may be of use to further parts of the build process. Specifically, we store the SHELL_PATH so that it can be used by tests to construct shell scripts on the fly. The format of the GIT-BUILD-OPTIONS file is Bourne shell, and it is sourced by test-lib.sh; all tests can rely on just having $SHELL_PATH correctly set in the environment. The GIT-BUILD-OPTIONS file is written every time the toplevel 'make' is invoked. Since the only users right now are the test scripts, there's no drawback to updating its timestamp. If something build-related depends on this, we can do a trick similar to the one used by GIT-CFLAGS. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-27Merge branch 'db/checkout'Junio C Hamano
* db/checkout: (21 commits) checkout: error out when index is unmerged even with -m checkout: show progress when checkout takes long time while switching branches Add merge-subtree back checkout: updates to tracking report builtin-checkout.c: Remove unused prefix arguments in switch_branches path checkout: work from a subdirectory checkout: tone down the "forked status" diagnostic messages Clean up reporting differences on branch switch builtin-checkout.c: fix possible usage segfault checkout: notice when the switched branch is behind or forked Build in checkout Move code to clean up after a branch change to branch.c Library function to check for unmerged index entries Use diff -u instead of diff in t7201 Move create_branch into a library file Build-in merge-recursive Add "skip_unmerged" option to unpack_trees. Discard "deleted" cache entries after using them to update the working tree Send unpack-trees debugging output to stderr Add flag to make unpack_trees() not print errors. ... Conflicts: Makefile
2008-02-27Merge branch 'jk/help-alias'Junio C Hamano
* jk/help-alias: help: respect aliases make alias lookup a public, procedural function help: use parseopt
2008-02-27Merge branch 'ae/pack-autothread'Junio C Hamano
* ae/pack-autothread: Revert "pack-objects: Print a message describing the number of threads for packing" pack-objects: Print a message describing the number of threads for packing pack-objects: Add runtime detection of online CPU's
2008-02-26Remove unused object-ref codeMartin Koegler
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-26add generic, type aware object chain walkerMartin Koegler
The requirements are: * it may not crash on NULL pointers * a callback function is needed, as index-pack/unpack-objects need to do different things * the type information is needed to check the expected <-> real type and print better error messages Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-25make alias lookup a public, procedural functionJeff King
This converts git_config_alias to the public alias_lookup function. Because of the nature of our config parser, we still have to rely on setting static data. However, that interface is wrapped so that you can just say value = alias_lookup(key); Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-24Merge branch 'maint'Junio C Hamano
* maint: Protect peel_ref fallback case from NULL parse_object result Ensure 'make dist' compiles git-archive.exe on Cygwin
2008-02-24Ensure 'make dist' compiles git-archive.exe on CygwinShawn O. Pearce
On Cygwin we have to use git-archive.exe as the target, otherwise running 'make dist' does not compile git-archive in the current directory. That may cause 'make dist' to fail on a clean source tree that has never been built before. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-23pack-objects: Add runtime detection of online CPU'sAndreas Ericsson
Packing objects can be done in parallell nowadays, but it's only done if the config option pack.threads is set to a value above 1. Because of that, the code-path used is often not the most optimal one. This patch adds a routine to detect the number of online CPU's at runtime (online_cpus()). When pack.threads (or --threads=) is given a value of 0, the number of threads is set to the number of online CPU's. This feature is also documented. As per Nicolas Pitre's recommendations, the default is still to run pack-objects single-threaded unless explicitly activated, either by configuration or by command line parameter. The routine online_cpus() is a rework of "numcpus.c", written by one Philip Willoughby <pgw99@doc.ic.ac.uk>. numcpus.c is in the public domain and can presently be downloaded from http://csgsoft.doc.ic.ac.uk/numcpus/ Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-23Add merge-subtree backJunio C Hamano
An earlier commit e1b3a2c (Build-in merge-recursive) made the subtree merge strategy backend unavailable. This resurrects it. A new test t6029 currently only tests the strategy is available, but it should be enhanced to check the real "subtree" case. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-21Merge branch 'bc/fopen'Junio C Hamano
* bc/fopen: Add compat/fopen.c which returns NULL on attempt to open directory
2008-02-17Merge branch 'bd/qsort'Junio C Hamano
* bd/qsort: compat: Add simplified merge sort implementation from glibc
2008-02-16Build in checkoutDaniel Barkalow
The only differences in behavior should be: - git checkout -m with non-trivial merging won't print out merge-recursive messages (see the change in t7201-co.sh) - git checkout -- paths... will give a sensible error message if HEAD is invalid as a commit. - some intermediate states which were written to disk in the shell version (in particular, index states) are only kept in memory in this version, and therefore these can no longer be revealed by later write operations becoming impossible. - when we change branches, we discard MERGE_MSG, SQUASH_MSG, and rr-cache/MERGE_RR, like reset always has. I'm not 100% sure I got the merge recursive setup exactly right; the base for a non-trivial merge in the shell code doesn't seem theoretically justified to me, but I tried to match it anyway, and the tests all pass this way. Other than these items, the results should be identical to the shell version, so far as I can tell. [jc: squashed lock-file fix from Dscho in] Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-12Add compat/fopen.c which returns NULL on attempt to open directoryBrandon Casey
Some systems do not fail as expected when fread et al. are called on a directory stream. Replace fopen on such systems which will fail when the supplied path is a directory. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-10Move create_branch into a library fileDaniel Barkalow
You can also create branches, in exactly the same way, with checkout -b. This introduces branch.{c,h} library files for doing porcelain-level operations on branches (such as creating them with their appropriate default configuration). Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
2008-02-10Build-in merge-recursiveDaniel Barkalow
This makes write_tree_from_memory(), which writes the active cache as a tree and returns the struct tree for it, available to other code. It also makes available merge_trees(), which does the internal merge of two trees with a known base, and merge_recursive(), which does the recursive internal merge of two commits with a list of common ancestors. The first two of these will be used by checkout -m, and the third is presumably useful in general, although the implementation of checkout -m which entirely matches the behavior of the shell version does not use it (since it ignores the difference of ancestry between the old branch and the new branch). Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
2008-02-07compat: Add simplified merge sort implementation from glibcBrian Downing
qsort in Windows 2000 (and various other C libraries) is a Quicksort with the usual O(n^2) worst case. Unfortunately, sorting Git trees seems to get very close to that worst case quite often: $ /git/gitbad runstatus # On branch master qsort, nmemb = 30842 done, 237838087 comparisons. This patch adds a simplified version of the merge sort that is glibc's qsort(3). As a merge sort, this needs a temporary array equal in size to the array that is to be sorted, but has a worst-case performance of O(n log n). The complexity that was removed is: * Doing direct stores for word-size and -aligned data. * Falling back to quicksort if the allocation required to perform the merge sort would likely push the machine into swap. Even with these simplifications, this seems to outperform the Windows qsort(3) implementation, even in Windows XP (where it is "fixed" and doesn't trigger O(n^2) complexity on trees). [jes: moved into compat/qsort.c, as per Johannes Sixt's suggestion] [bcd: removed gcc-ism, thanks to Edgar Toernig. renamed make variable per Junio's comment.] Signed-off-by: Brian Downing <bdowning@lavos.net> Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-05Rename 'git-help--browse.sh' to 'git-web--browse.sh'.Christian Couder
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-05help: make 'git-help--browse' usable outside 'git-help'.Christian Couder
"git-help--browse" helper is to launch a browser of the user's choice to view the HTML version of git documentation for a given command. It used to take the name of a command, convert it to the path of the documentation by prefixing the directory name and appending the ".html" suffix, and start the browser on the path. This updates the division of labor between the caller in help.c and git-help--browser helper. The helper is now responsible for launching a browser of the user's choice on given URLs, and it is the caller's responsibility to tell it the paths to documentation files. This is in preparation to reuse the logic to choose user's preferred browser in instaweb. The helper had a provision for running it without any command name, in which case it showed the toplevel "git(7)" documentation, but the caller in help.c never makes such a call. The helper now exits with a usage message when no path is given. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-26Add a missing dependency on http.hMike Hommey
Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-25Makefile: customization for supporting HP-UXRobert Schiele
Signed-off-by: Robert Schiele <rschiele@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-24pre-POSIX.1-2001 systems do not have <sys/select.h>Robert Schiele
POSIX.1-2001 has declaration of select(2) in <sys/select.h>, but in the previous version of SUS, it was declared in <sys/time.h> (which is already included in git-compat-util.h). This introduces NO_SYS_SELECT_H macro in the Makefile to be set on older systems, to skip inclusion of <sys/select.h> that does not exist on them. We could check _POSIX_VERSION with 200112L and do this automatically, but earlier it was reported that the approach does not work well on some vintage of HP-UX. Other systems may get _POSIX_VERSION itself wrong. At least for now, this manual configuration is safer. Signed-off-by: Robert Schiele <rschiele@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-18Move sha1_file_to_archive into libgitLars Hjemli
When the specfile (export-subst) attribute was introduced, it added a dependency from archive-{tar|zip}.c to builtin-archive.c. This broke the support for archive-operations in libgit.a since builtin-archive.o doesn't belong in libgit.a. This patch moves the functions required by libgit.a from builtin-archive.c to the new file archive.c (which becomes part of libgit.a). Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-18autoconf: Add checking for unsetenv functionJakub Narebski
Update configure.ac (and config.mak.in) by adding test for unsetenv (NO_UNSETENV). Add comment about NO_UNSETENV to Makefile header, as original commit 731043fd adding compat/unsetenv.c didn't do that. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-18Officially deprecate repo-config.Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-15Fix git-rerere documentationJunio C Hamano
rerere.enabled is _not_ on by default. The command is enabled if rr-cache exists even when rerere.enabled is missing, and enabled or disabled by explicitly setting the rerere.enabled variable.
2007-12-22parse-options: Add a gitcli(5) man page.Pierre Habouzit
This page should hold every information about the git ways to parse command lines, and best practices to be used for scripting. Signed-off-by: Pierre Habouzit <madcoder@debian.org>
2007-12-19Fix git-instaweb breakage on MacOS X due to the limited sed functionalityCharles Bailey
git-instaweb relied on a pipe in a sed script, but this is not supported by MacOS X sed when using BREs. git-instaweb relies on a working perl in any case, and perl re are more consistent between platforms, so replace sed invocation with an equivalent perl invocation. Also, fix the documented -b "" to work without giving a spurious 'command not found' error. Signed-off-by: Charles Bailey <charles@hashpling.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-16rename git-browse--help to git-help--browseJeff King
The convention for helper scripts has been git-$TOOL--$HELPER. Since this is a "browse" helper for the "help" tool, git-help--browse is a more sensible name. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-15Retire git-runstatus for real.Junio C Hamano
The command was removed from the builtin command list and there was no way to invoke it, but the code was still there. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-15Rename git-browse-help helper to git-browse--helpJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-13Merge branch 'cc/help'Junio C Hamano
* cc/help: RPM spec: Adjust htmldir git-help -w: do not require to be in git repository git.spec.in: remove python_path Documentation: rename git.texi to user-manual.texi Add git-browse-help to .gitignore git-help -i: show info documentation from matching version of git git-help -i: invoke info with document and node name Documentation: add gitman.info target Documentation: describe -w/--web option to "git-help". Use {web,instaweb,help}.browser config options. git-help: add -w|--web option to display html man page in a browser. Documentation: describe -i/--info option to "git-help" git-help: add -i|--info option to display info page.
2007-12-11Don't cache DESTDIR in perl/perl.mak.Gerrit Pape
DESTDIR is supposed to be overridden on 'make install' after doing 'make'. Have the automatically generated perl/perl.mak not cache the value of DESTDIR to support that for the perl/ subdirectory also. Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-10git-help -i: show info documentation from matching version of gitJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-10Merge branch 'master' into cc/helpJunio C Hamano
This is to primarily pull in MANPATH tweak and help.txt formatting fix from the master branch.
2007-12-09Merge branch 'jc/spht'Junio C Hamano
* jc/spht: Use gitattributes to define per-path whitespace rule core.whitespace: documentation updates. builtin-apply: teach whitespace_rules builtin-apply: rename "whitespace" variables and fix styles core.whitespace: add test for diff whitespace error highlighting git-diff: complain about >=8 consecutive spaces in initial indent War on whitespace: first, a bit of retreat. Conflicts: cache.h config.c diff.c
2007-12-09git-help: add -w|--web option to display html man page in a browser.Christian Couder
Now when using "git help -w cmd", we will try to show the HTML man page "git-cmd.html" in your prefered web browser. To do that "help.c" code will call a new shell script "git-browse-help". This currently works only if the HTML versions of the man page have been installed in $(htmldir) (typically "/usr/share/doc/git-doc"), so new target to do that is added to "Documentation/Makefile". The browser to use can be configured using the "web.browser" config variable. We try to open a new tab in an existing web browser, if possible. The code in "git-browse-help" is heavily stolen from "git-mergetool" by Theodore Y. Ts'o. Thanks. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-08Let git-help prefer man-pages installed with this version of gitSergei Organov
Prepend $(prefix)/share/man to the MANPATH environment variable before invoking 'man' from help.c:show_man_page(). There may be other git documentation in the user's MANPATH but the user is asking a specific instance of git about its own documentation, so we'd better show the documentation for _that_ instance of git. Signed-off-by: Sergei Organov <osv@javad.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-07Silence iconv warnings on LeopardWincent Colaiuta
Apple ships a newer version of iconv with Leopard (Mac OS X 10.5/Darwin 9). Ensure that OLD_ICONV is not set on any version of Darwin in the 9.x series; this should be good for at least a couple of years, when Darwin 10 comes out and we can invert the sense of the test to specifically check for Darwin 7 or 8. A more sophisticated and robust check is possible for those who use autoconf, but not everybody does that. Signed-off-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-06Use gitattributes to define per-path whitespace ruleJunio C Hamano
The `core.whitespace` configuration variable allows you to define what `diff` and `apply` should consider whitespace errors for all paths in the project (See gitlink:git-config[1]). This attribute gives you finer control per path. For example, if you have these in the .gitattributes: frotz whitespace nitfol -whitespace xyzzy whitespace=-trailing all types of whitespace problems known to git are noticed in path 'frotz' (i.e. diff shows them in diff.whitespace color, and apply warns about them), no whitespace problem is noticed in path 'nitfol', and the default types of whitespace problems except "trailing whitespace" are noticed for path 'xyzzy'. A project with mixed Python and C might want to have: *.c whitespace *.py whitespace=-indent-with-non-tab in its toplevel .gitattributes file. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-05Set OLD_ICONV on Cygwin.Pascal Obry
Cygwin still has old definition for the iconv() second parameter. This patch fixes the last warning on Cygwin. This has been tested with Cygwin 1.5.24. Signed-off-by: Pascal Obry <pascal@obry.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-05Merge branch 'kh/commit'Junio C Hamano
* kh/commit: (33 commits) git-commit --allow-empty git-commit: Allow to amend a merge commit that does not change the tree quote_path: fix collapsing of relative paths Make git status usage say git status instead of git commit Fix --signoff in builtin-commit differently. git-commit: clean up die messages Do not generate full commit log message if it is not going to be used Remove git-status from list of scripts as it is builtin Fix off-by-one error when truncating the diff out of the commit message. builtin-commit.c: export GIT_INDEX_FILE for launch_editor as well. Add a few more tests for git-commit builtin-commit: Include the diff in the commit message when verbose. builtin-commit: fix partial-commit support Fix add_files_to_cache() to take pathspec, not user specified list of files Export three helper functions from ls-files builtin-commit: run commit-msg hook with correct message file builtin-commit: do not color status output shown in the message template file_exists(): dangling symlinks do exist Replace "runstatus" with "status" in the tests t7501-commit: Add test for git commit <file> with dirty index. ...
2007-12-04install-sh from automake does not like -m without delimiting spaceRobert Schiele
The install-sh script as shipped with automake requires a space between the -m switch and its argument. Since this is also the regular way of doing it with other install implementations this change inserts the missing space in all makefiles. Signed-off-by: Robert Schiele <rschiele@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-04Documentation: add a new man page for "git-help"Christian Couder
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-03Merge branch 'js/fast-export'Junio C Hamano
* js/fast-export: Add 'git fast-export', the sister of 'git fast-import'