summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2006-07-25cvsserver: avoid warning about active db handlesv1.4.2-rc2Johannes Schindelin
Turns out that DBD::SQLite does not favour preparing statements which are never executed. So, turn all 4 statements, which were prepared _always_, into methods, like the other 12 prepared statements. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-25cvsserver: suppress warningsJohannes Schindelin
This patch defines $state->{prependdir} as the empty string, so that quite a few warnings are avoided. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Acked-by: Martin Langhoff <martin@catalyst.net.nz> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-25Substitute xmalloc()+memset(0) with xcalloc().Peter Eriksen
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-25gitweb: escape tag commentsDaniel Drake
I have a tag with a comment which includes an & character. Firefox wouldn't display my gitweb summary page due to malformed XML. This solves the problem. Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-25Merge branch 'jc/clone-bind-failure'Junio C Hamano
* jc/clone-bind-failure: fetch/clone: check return status from ls-remote
2006-07-25Merge branch 'jt/format-patch'Junio C Hamano
* jt/format-patch: builtin-log: typefix for recent format-patch changes. Add option to set initial In-Reply-To/References Add option to enable threading headers git-format-patch: Make the second and subsequent mails replies to the first
2006-07-25Merge branch 'ew/apply'Junio C Hamano
* ew/apply: Fix t4114 on cygwin apply: handle type-changing patch correctly. apply: split out removal and creation into different phases. apply: check D/F conflicts more carefully. typechange tests for git apply (currently failing)
2006-07-25Merge branch 'jc/read-tree'Junio C Hamano
* jc/read-tree: checkout -f failed to check out a file if an existing directory interfered.
2006-07-25gitweb.cgi: git_blame2: slight optimization reading the blame linesLuben Tuikov
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>
2006-07-25gitweb.cgi: Centralize printing of the page pathLuben Tuikov
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>
2006-07-25gitweb.cgi: git_blame2: Revision blocks now have alternating colorsLuben Tuikov
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>
2006-07-25gitweb.cgi: Show "raw" head of project link even when $hash is not definedLuben Tuikov
Some callers of git_history() do not set $hash of $file_name. Add code to find it, if it is not defined. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-25gitweb.cgi: git_blame2: Allow back-trekking through commitsLuben Tuikov
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>
2006-07-25gitweb.cgi: git_blame2: an alternative simple working git blameLuben Tuikov
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>
2006-07-25gitweb.cgi: Include direct link to "raw" files from "history"Luben Tuikov
In "history" view, the "page_path" is now also a URL link to the "raw" format of the file, which will always give you the latest version in the repository. This is helpful for externally linking files, such that the latest version is always referenced and in "raw" format. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-25gitweb.cgi: Teach git_history() to read hash from $hash_baseLuben Tuikov
Teach git_history() to take its hash argument from the hb parameter, i.e. from $hash_base. Also change all "a=history" actions to pass "hb=" instead of "h=". Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-25Merge branch 'lt/objformat'Junio C Hamano
* lt/objformat: sha1_file: add the ability to parse objects in "pack file format"
2006-07-25Trivial path optimization testAlex Riesen
Linus: get_pathspec() does turn '.' into an empty string (which is correct - git internally does _not_ ever understand the notion of "." as the current working directory), but it doesn't ever do the optimization of noticing that a pathspec that consists solely of an empty string is "equivalent" to an empty pathspec. The test is to ensure that this behaviour stays. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-24Always reset the color _before_ printing out the newlineJohannes Schindelin
This patch brings the benefits of part of v1.4.1-rc2~37 to the "commit" colorizing patch. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-24upload-pack: fix timeout in create_pack_fileMatthias Lederhofer
Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-24Defaulting fetch to origin when set in the repo-configSanti Béjar
Signed-off-by: Santi Béjar <sbejar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-24Colorize 'commit' lines in log uiJeff King
When paging through the output of git-whatchanged, the color cues help to visually navigate within a diff. However, it is difficult to notice when a new commit starts, because the commit and log are shown in the "normal" color. This patch colorizes the 'commit' line, customizable through diff.colors.commit and defaulting to yellow. As a side effect, some of the diff color engine (slot enum, get_color) has become accessible outside of diff.c. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-24git-am: Don't accept an mbox on stdin of we already have a .dotest directoryLukas Sandström
It makes no sense to accept an mbox via stdin when we won't accept it on the commandline. The patch helps the following scenario: # git init-db "add file1 with content" # git checkout -b apply "edit file1 && commit" # git checkout -b conflict master "edit file1 && commit" # git checkout -b ok master "add file2" # git checkout apply # git format-patch -k -3 master..conflict | git am -k -3 => git-am fails with a conflict message # git reset --hard # git format-patch -k -3 master..ok | git am -k -3 => git am fails with the same conflict message as above, => since it's trying to apply the old .dotest directory With the patch it complains about an old .dotest directory instead. Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-24show-branch: Fix another performance problem.Alexandre Julliard
When naming commits, stop walking the parent chain as soon as we find a commit that already has a name. The parent chain of that commit will be walked later on in any case (or may even have been walked already). This avoids O(n^2) behavior; on a tree where show-branch displays 6800 commits, the total run time drops from 77 seconds to 5 seconds. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-24pack-objects: check pack.window for default window sizeJeff King
For some repositories, deltas simply don't make sense. One can disable them for git-repack by adding --window, but git-push insists on making the deltas which can be very CPU-intensive for little benefit. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-24Disable linking with Fink or DarwinPorts.Shawn Pearce
It may be desirable for the compiler to disable linking against Fink or DarwinPorts, especially if both are installed on the system and the user wants GIT to be linked specifically to only one of them. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-24git.el: Put the git customize group in the 'tools' parent group.Alexandre Julliard
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-24git.el: Try to reuse an existing buffer when running git-status.Alexandre Julliard
By default, running git-status again will now reuse an existing buffer that displays the same directory. The old behavior of always creating a new buffer can be obtained by customizing the git-reuse-status-buffer option. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-24git.el: Prepend a slash to the file name when adding to .gitignore.Alexandre Julliard
This way the ignore command will really only ignore the marked files and not files with the same name in subdirectories. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-24git.el: Run git-rerere on commits if the rr-cache directory exists.Alexandre Julliard
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-24git-svn: fix fetching new directories copies when using SVN:: libsEric Wong
Log output from SVN doesn't list all the new files that were added if a new directory was copied from an existing place in the repository. This means we'll have to do some extra work and traverse new directories ourselves. This has been updated from the original patch to defer traversed adds until all removals have been done. Please disregard the original. Thanks to Ben Williamson for the excellent bug report and testing. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-24tar-tree: add the "tar.umask" config optionWilly Tarreau
By default, git-tar-tree(1) sets file and directories modes to 0666 or 0777. While this is both useful and acceptable for projects such as the Linux Kernel, it might be excessive for other projects. With this variable, it becomes possible to tell git-tar-tree(1) to apply a specific umask to the modes above. The special value "user" indicates that the user's current umask will be used. This should be enough for most projects, as it will lead to the same permissions as git-checkout(1) would use. The default value remains 0, which means world read-write. Signed-off-by: Willy Tarreau <w@1wt.eu> Acked-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-24Fix t4114 on cygwinJohannes Schindelin
On cygwin, when you try to create a symlink over a directory, you do not get EEXIST, but EACCES. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-24cvsexportcommit - add -a (add author line) flag, cleanup warningsMartin Langhoff
This patch adds support for -a which will add an "Author: " line, and possibly a "Committer: " line to the bottom of the commit message for CVS. The commit message parser is now a little bit better, and some warnings have been cleaned up. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-17unpack-objects: remove stale and confusing commentJunio C Hamano
The very initial version of unpack-objects.c::unpack_all() used to unpack from the end of the pack, but since end of June last year it was changed to stream from the front and the comment does not reflect the reality anymore. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-17git-fetch: fix --keep vs --thinJunio C Hamano
When --keep is specified there is no reason to pass --thin to git-fetch-pack, which are mutually exclusive. This does not hurt because fetch-pack disables thin transfer when both are given internally, but still is confusing. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-17git-diff A...B to (usually) mean "git-diff `git-merge-base A B` B"Junio C Hamano
This tweaks the argument parser of "git diff" to allow "git-diff A...B" to show diffs leading to B since their merge-base, when there is only one sensible merge base between A and B. Currently nonsense cases are thrown at combined-diff to produce nonsense results, which would eventually need to be fixed. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-17Merge branch 'sp/reflog'v1.4.2-rc1Junio C Hamano
* sp/reflog: Record rebase changes as 'rebase' in the reflog. Log ref changes made by resolve. Log ref changes made by quiltimport. Log ref changes made by git-merge and git-pull.
2006-07-17apply: handle type-changing patch correctly.Junio C Hamano
A type-change diff is always split into a patch to delete old, immediately followed by a patch to create new. check_patch() routine noticed that the path to be created already exists in the working tree and/or in the index when looking at the creation patch and mistakenly thought it to be an error. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-17apply: split out removal and creation into different phases.Junio C Hamano
This reworks write_out_result() loop so we first remove the paths that are to go away and then create them after finishing all the removal. This is necessary when a patch creates a file "foo" and removes a file "foo/bar". Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-17apply: check D/F conflicts more carefully.Junio C Hamano
When creating a new file where a directory used to be (or the user had an empty directory) the code did not check the result from lstat() closely enough, and mistakenly thought the path already existed in the working tree. This does not fix the problem where you have a patch that creates a file at "foo" and removes a file at "foo/bar" (which presumably is the last file in "foo/" directory in the original). For that, we would need to restructure write_out_results() loop. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-17checkout -f failed to check out a file if an existing directory interfered.Junio C Hamano
When path foo/bar existed in the working tree, checkout -f to switch to a branch that has a file foo silently did a wrong thing. It failed to remove the directory foo, did not check out the file foo, and the worst of all it did not report any errors. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-17typechange tests for git apply (currently failing)Eric Wong
I've found that git apply is incapable of handling patches involving object type changes to the same path. Of course git itself is perfectly capable of making commits that generate these changes, as it only tracks trees states. It's just that the diffs between them are less useful if they can't be applied. Some of these are rare, but I've hit one of them (file becoming a symlink) recently in real-world usage, and was inspired to find more potential breakages :) I'm not sure when I'll have time to fix these myself and I'm not very familiar with the apply code. So if someone could get some or all of these cases working, they would be my hero :) Some of these are what I would refer to as corner-cases from hell. Most (if not all) other systems fail some of these. In fact, they aren't even capable of representing most of these changes in their histories; much less being able to handle patches to that effect. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-16git-svn: don't check for migrations/upgrades on commit-diffEric Wong
Unlike other git-svn commands, commit-diff is intended to operate without needing any additional metadata inside .git Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-16show-branch: fix performance problem.Junio C Hamano
The core function used in show-branch, join_revs(), was supposed to be exactly the same algorithm as merge_bases(), except that it was a version enhanced for use with more than two heads. However, it needed to mark and keep a list of all the commits it has seen, because it needed them for its semi-graphical output. The function to implement this list, mark_seen(), stupidly used insert_by_date(), when it did not need to keep the list sorted during its processing. This made "show-branch --merge-base" more than 20x slower compared to "merge-base --all" in some cases (e.g. between b5032a5 and 48ce8b0 in the Linux 2.6 kernel archive). The performance of "show-branch --independent" suffered from the same reason. This patch sorts the resulting list after the list traversal just once to fix these problems. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-15builtin-log: typefix for recent format-patch changes.Junio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-15Set datarootdir in config.mak.inPavel Roskin
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>
2006-07-15Quote all calls to GIT_CONF_APPEND_LINEPavel Roskin
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>
2006-07-15Add option to set initial In-Reply-To/ReferencesJosh Triplett
Add the --in-reply-to option to provide a Message-Id for an initial In-Reply-To/References header, useful for including a new patch series as part of an existing thread. Signed-off-by: Josh Triplett <josh@freedesktop.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-15Add option to enable threading headersJosh Triplett
Add a --thread option to enable generation of In-Reply-To and References headers, used to make the second and subsequent mails appear as replies to the first. Signed-off-by: Josh Triplett <josh@freedesktop.org> Signed-off-by: Junio C Hamano <junkio@cox.net>