aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* fetch/clone: mark messages from remote side stand out.Junio C Hamano2006-08-01
| | | | | | | | | | | | | | | | | | | | When dealing with a corrupt or out of sync remote repository, the user often gets error messages like this: error: refs/heads/devel does not point to a valid commit object! which leaves the user wondering if the breakage is on the local end or on the remote end. This is unnecessarily alarming. This patch changes the way we display messages received from the remote side over the git protocol sideband (i.e. stderr stream of the remote process). It shows them with blue background with white letters, but this presentation is subject to proposals of better ways from the list. The problem was pointed out by Andrew Morton. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'rs/rebase'Junio C Hamano2006-07-31
|\ | | | | | | | | | | * rs/rebase: rebase: Make the fast-fowarding message more user-friendly by using branch names instead of SHA1 IDs. rebase: Fix the detection of fast-forwarding of the current branch to upstream.
| * rebase: Make the fast-fowarding message more user-friendly by using branch ↵Robert Shearman2006-07-31
| | | | | | | | | | | | | | names instead of SHA1 IDs. Signed-off-by: Robert Shearman <rob@codeweavers.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * rebase: Fix the detection of fast-forwarding of the current branch to upstream.Robert Shearman2006-07-31
| | | | | | | | | | | | | | | | | | | | | | | | Previously, a rebasing operation with on a branch that is just tracking an upstream branch would output a confusing "Nothing to do" due to no patches being given to git-am. The test brings the behaviour back into line with that of just before e646c9c8c0aa995eac284ea0a2117add19c4461c. Signed-off-by: Robert Shearman <rob@codeweavers.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'ml/pager'Junio C Hamano2006-07-31
|\ \
| * | pager: config variable pager.colorMatthias Lederhofer2006-07-31
| | | | | | | | | | | | | | | | | | | | | enable/disable colored output when the pager is in use Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Builtins: control the use of pager from the command table.Junio C Hamano2006-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the built-in "always-use-pager" logic for log family to the command dispatch table of git wrapper. This makes it easier to change the default use of pager, and has an added benefit that we fork and exec the pager early before packs are mmapped. Pointed out by Juergen Ruehle <j.ruehle@bmiag.de>. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'jc/checkout'Junio C Hamano2006-07-31
|\ \ \ | |/ / |/| | | | | | | | * jc/checkout: git-checkout: allow "checkout HEAD -- path"
| * | git-checkout: allow "checkout HEAD -- path"Junio C Hamano2006-07-31
| |/ | | | | | | | | | | | | Even though -- is redundant in this case, we should allow it to prevent confusion. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Fix up some fallout from "setup_git_directory()" cleanupsLinus Torvalds2006-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git-ls-files was broken by the setup_git_directory() calling changes, because I had missed the fact that the "prefix" variable in that file was static to the whole file, and unlike git-ls-tree (where I had fixed it up), it ended up using two different variables with the same name depending on what the scoping happened to be. This fixes it up properly (by just removing the static variable, and passing the automatic one around properly), and git-ls-files should work again. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Fix double "close()" in ce_compare_dataLinus Torvalds2006-07-31
|/ | | | | | | | | | | | Doing an "strace" on "git diff" shows that we close() a file descriptor twice (getting EBADFD on the second one) when we end up in ce_compare_data if the index does not match the checked-out stat information. The "index_fd()" function will already have closed the fd for us, so we should not close it again. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* tar-tree: illustrate an obscure feature betterJohannes Schindelin2006-07-30
| | | | | | | | Since you can tar just a subdirectory of a certain revision, tell the users so, by showing an example how to do it. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git.c: allow alias expansion without a git directoryMatthias Lederhofer2006-07-30
| | | | | | | | | | With this, the configuration mechanism can be used to say: [alias] init = init-db --template=/path/to/template Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* setup_git_directory_gently: do not barf when GIT_DIR is given.Matthias Lederhofer2006-07-30
| | | | | | | | | Earlier we barfed when GIT_DIR environment variable points at a directory yet to be created, which made it impossible to use configuration mechanism in "git-init-db". Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Build on Debian GNU/kFreeBSDGerrit Pape2006-07-30
| | | | | | | | | Patch from Petr Salinger to make the build process detect and support the Debian GNU/kFreeBSD architecture, see http://bugs.debian.org/380209 Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'lt/web'Junio C Hamano2006-07-30
|\ | | | | | | | | | | | | | | * lt/web: gitweb.cgi: git_blame2: slight optimization reading the blame lines gitweb.cgi: git_blame2: Revision blocks now have alternating colors gitweb.cgi: git_blame2: Allow back-trekking through commits gitweb.cgi: git_blame2: an alternative simple working git blame
| * gitweb.cgi: git_blame2: slight optimization reading the blame linesLuben Tuikov2006-07-24
| | | | | | | | | | | | | | | | Eliminate git_read_blame_line() -- move that code inline and optimize it. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * gitweb.cgi: git_blame2: Revision blocks now have alternating colorsLuben Tuikov2006-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A revision block is the largest number of adjacent lines of code originating from the same revision. This patch adds color to git_blame2(), in that no two adjacent revision blocks have the same color. The color alternates between light and dark. As we annotate the code lines, we alternate the color (light, dark) of code lines _per revision_. This makes it easier to see line conglomerations per revision. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * gitweb.cgi: git_blame2: Allow back-trekking through commitsLuben Tuikov2006-07-24
| | | | | | | | | | | | | | | | | | This patch adds the capability of back-trekking through commits from git_blame2() as follows: blame2->commit->blame2->commit->blame2->...->initial commit. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * gitweb.cgi: git_blame2: an alternative simple working git blameLuben Tuikov2006-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds an alternative simple working git-blame called git_blame2(). Simple, because it displays just three columns: the commit, the line number and the line of code. Alternative, because the original git_blame() is left untouched. Lines of code are printed html escaped, but as-is. git_blame2() uses git-blame as opposed to git-annotate used by git_blame(). Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch '__/setup-n-mv'Junio C Hamano2006-07-30
|\ \ | | | | | | | | | | | | | | | * __/setup-n-mv: Call setup_git_directory() much earlier Call setup_git_directory() early
| * \ Merge branch 'lt/setup' into __/setup-n-mvJunio C Hamano2006-07-29
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | This merges the new built-in calling convention code into Johannes's builtin-mv topic in order to resolve their conflicts early on. Signed-off-by: Junio C Hamano <junkio@cox.net>
| | * | Call setup_git_directory() much earlierLinus Torvalds2006-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the calling convention of built-in commands and passes the "prefix" (i.e. pathname of $PWD relative to the project root level) down to them. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| | * | Call setup_git_directory() earlyLinus Torvalds2006-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Any git command that expects to work in a subdirectory of a project, and that reads the git config files (which is just about all of them) needs to make sure that it does the "setup_git_directory()" call before it tries to read the config file. This means, among other things, that we need to move the call out of "init_revisions()", and into the caller. This does the mostly trivial conversion to do that. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'js/mv'Junio C Hamano2006-07-30
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | * js/mv: builtin git-mv: support moving directories Make git-mv a builtin Extract helper bits from c-merge-recursive work
| * | | builtin git-mv: support moving directoriesJohannes Schindelin2006-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the builtin mv for the test which Josef provided, and also fixes moving directories into existing directories, as noted by Jon Smirl. In case the destination exists, fail early (this cannot be overridden by -f). Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Make git-mv a builtinJohannes Schindelin2006-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also moves add_file_to_index() to read-cache.c. Oh, and while touching builtin-add.c, it also removes a duplicate git_config() call. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Extract helper bits from c-merge-recursive workJohannes Schindelin2006-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This backports the pieces that are not uncooked from the merge-recursive WIP we have seen earlier, to be used in git-mv rewritten in C. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'jn/make'Junio C Hamano2006-07-30
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jn/make: Set datarootdir in config.mak.in Quote all calls to GIT_CONF_APPEND_LINE Typofix in configure.ac comment. configure.ac vertical whitespace usage cleanup autoconf: Checks for some programs autoconf: Checks for libraries autoconf: Checks for some library functions. autoconf: Checks for typedefs, structures, and compiler characteristics. autoconf: Preparing the way for autodetection Copy description of build configuration variables to configure.ac Teach make clean about configure and autoconf autoconf: Use autoconf to write installation directories to config.mak.autogen
| * | | Set datarootdir in config.mak.inPavel Roskin2006-07-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Autoconf 2.60 expresses datadir in terms of datarootdir. If datarootdir is not substituted, configure issues a warning and uses a compatibility substitution for datadir. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Quote all calls to GIT_CONF_APPEND_LINEPavel Roskin2006-07-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not quoting macro arguments that contain other macros is a big no-no in Autoconf. It can break at any time. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Typofix in configure.ac comment.Pavel Roskin2006-07-09
| | | | | | | | | | | | | | | | | | | | | | | | [jc: copied from Makefile typofix in "master"] Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | configure.ac vertical whitespace usage cleanupJakub Narebski2006-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | configure.ac | 29 +++++++++++++++-------------- 1 files changed, 15 insertions(+), 14 deletions(-) Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | autoconf: Checks for some programsJakub Narebski2006-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ./configure script checks now for the following programs: * CC - using AC_PROG_CC * AR - using AC_CHECK_TOOL among ar * TAR - among gtar, tar Checks not implemented: * INSTALL - needs install-sh or install.sh in sources * RPMBUILD - not known alternatives for rpmbuild * PYTHON - no PYTHON variable in Makefile, has to set NO_PYTHON if not present Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | autoconf: Checks for librariesJakub Narebski2006-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ./configure script checks now if the following libraries are present: * -lssl for SHA1_Init (NO_OPENSSL) * -lcurl for curl_easy_setopt (NO_CURL) * -lexpat for XML_ParserCreate (NO_EXPAT) It also checks if adding the following libraries are needed: * -lcrypto for SHA1_Init (NEEDS_SSL_WITH_CRYPTO) * -liconv for iconv (NEEDS_LIBICONV) * -lsocket for socket (NEEDS_SOCKET) Policy: we check also if NEEDS_LIBRARY libraries are present, even if there is no NO_LIBRARY variable. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | autoconf: Checks for some library functions.Jakub Narebski2006-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ./configure script checks now for the following library functions: * strcasestr (NO_STRCASESTR) * strlcpy (NO_STRLCPY) * setenv (NO_SETENV) in default C library and in libraries which have AC_CHECK_LIB done for them. Checks not implemented: * NO_MMAP - probably only via optional features configuration * NO_IPV6 - what does "lack IPv6 support" mean? * NO_ICONV - what does "properly support iconv" mean? Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | autoconf: Checks for typedefs, structures, and compiler characteristics.Jakub Narebski2006-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ./configure script checks now for existence of the following types, structures, and structure members: * dirent.d_ino in <dirent.h> (NO_D_INO_IN_DIRENT) * dirent.d_type in <dirent.h> (NO_D_TYPE_IN_DIRENT) * 'struct sockaddr_storage' in <netinet/in.h> (NO_SOCKADDR_STORAGE) Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | autoconf: Preparing the way for autodetectionJakub Narebski2006-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prepares configure.ac to output autodetected and selected (by using --with/--without and --enable/disable parameters to generated ./configure script) building configuration in "git style", i.e. by appending appropriate variables to output file config.mak.autogen (via temporary file config.mak.append). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Copy description of build configuration variables to configure.acJakub Narebski2006-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Copy description of build configuration variables from the commentary in the top Makefile (from 'next' branch) to configure.ac, splitting them into "autoconf" sections. This is to be able to easily check which build/install configuration variables are covered by current configure.ac Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Teach make clean about configure and autoconfJakub Narebski2006-07-08
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | autoconf: Use autoconf to write installation directories to config.mak.autogenJakub Narebski2006-07-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is beginning of patch series introducing installation configuration using autoconf (and no other autotools) to git. The idea is to generate config.mak.autogen using ./configure (generated from configure.ac by running autoconf) from config.mak.in, so one can use autoconf as an _alternative_ to ordinary Makefile, and creating one's own config.mak. Local settings in config.mak override generated settings in config.mak.autogen This patch includes minimal configure.ac and config.mak.in, so one can set installation directories using autoconf generated ./configure script e.g. ./configure --prefix=/usr Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Display an error from update-ref if target ref name is invalid.Shawn Pearce2006-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alex Riesen (raa.lkml@gmail.com) recently observed that git branch would fail with no error message due to unexpected situations with regards to refs. For example, if .git/refs/heads/gu is a file but "git branch -b refs/heads/gu/fixa HEAD" was invoked by the user it would fail silently due to refs/heads/gu being a file and not a directory. This change adds a test for trying to create a ref within a directory that is actually currently a file, and adds error printing within the ref locking routine should the resolve operation fail. The error printing code probably belongs at this level of the library as other failures within the ref locking, writing and logging code are also currently at this level of the code. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Fix http-fetchJohannes Schindelin2006-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the latest changes in fetch.c, http-fetch crashed accessing write_ref[i], where write_ref was NULL. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'pb/multi-fetch'Junio C Hamano2006-07-28
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pb/multi-fetch: Teach git-http-fetch the --stdin switch Teach git-local-fetch the --stdin switch Make pull() support fetching multiple targets at once Make pull() take some implicit data as explicit arguments
| * | | | Teach git-http-fetch the --stdin switchPetr Baudis2006-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Speeds up things quite a lot when fetching tags with Cogito. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Teach git-local-fetch the --stdin switchPetr Baudis2006-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to fetch many commits (refs) at once, greatly speeding up cg-clone. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Make pull() support fetching multiple targets at oncePetr Baudis2006-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pull() now takes an array of arguments instead of just one of each kind. Currently, no users use the new capability, but that'll change. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Make pull() take some implicit data as explicit argumentsPetr Baudis2006-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently it's a bit weird that pull() takes a single argument describing the commit but takes the write_ref from a global variable. This makes it take that as a parameter as well, which might be nicer for the libification in the future, but especially it will make for nicer code when we implement pull()ing multiple commits at once. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Merge branch 'lt/web'Junio C Hamano2006-07-28
|\ \ \ \ \ | | |_|_|/ | |/| | |
| * | | | gitweb.cgi: Centralize printing of the page pathLuben Tuikov2006-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Centralize printing of the page path so that if the entity is a blob, we can set the page path to be the link to the HEAD revision of the "raw" blob. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>