summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2007-05-13Merge branch 'maint'Libravatar Junio C Hamano10-49/+110
* maint: git-svn: don't attempt to minimize URLs by default git-svn: fix segfaults due to initial SVN pool being cleared git-svn: clean up caching of SVN::Ra functions git-svn: don't drop the username from URLs when dcommit is run RPM spec: include files in technical/ to package. Remove stale non-static-inline prototype for tree_entry_extract() git-config: test for 'do not forget "a.b.var" ends "a.var" section'. git-config: do not forget seeing "a.b.var" means we are out of "a.var" section.
2007-05-13cvsserver: Limit config parser to needed optionsLibravatar Frank Lichtenheld1-3/+3
Change the configuration parser so that it ignores everything except for ^gitcvs.((ext|pserver).)? This greatly reduces the risk of failing while parsing some unknown and irrelevant config option. The bug that triggered this change was that the parsing doesn't handle sections that have a subsection and a variable with the same name. While this bug still remains, all remaining causes can be attributed to user error, since there are no defined variables gitcvs.ext and gitcvs.pserver. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-13gitweb: Check if requested object existsLibravatar Jakub Narebski1-1/+15
Try to avoid "Use of uninitialized value ..." errors caused by bad revision, incorrect filename, wrong object id, bad file etc. (wrong value of 'h', 'hb', 'f', etc. parameters). This avoids polluting web server errors log. Correct git_get_hash_by_path and parse_commit_text (and, in turn, parse_commit) to return undef if object does not exist. Check in git_tag if requested tag exists. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-13Link to HTML version of external doc if availableLibravatar Junio C Hamano1-2/+2
Currently $ git grep '\([^t]\|^\)'link: user-manual.txt gives four hits that refer to .txt version of the documentation set, but at least "hooks" and "cvs-migration" have HTML variants installed, so refer to them instead. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-13git-svn: don't attempt to minimize URLs by defaultLibravatar Eric Wong6-16/+19
For tracking branches and tags, git-svn prefers to connect to the root of the repository or at least the level that houses branches and tags as well as trunk. However, users that are accustomed to tracking a single directory have no use for this feature. As pointed out by Junio, users may not have permissions to connect to connect to a higher-level path in the repository. While the current minimize_url() function detects lack of permissions to certain paths _after_ successful logins, it cannot effectively determine if it is trying to access a login-only portion of a repo when the user expects to connect to a part where anonymous access is allowed. For people used to the git-svnimport switches of --trunk, --tags, --branches, they'll already pass the repository root (or root+subdirectory), so minimize URL isn't of too much use to them, either. For people *not* used to git-svnimport, git-svn also supports: git svn init --minimize-url \ --trunk http://repository-root/foo/trunk \ --branches http://repository-root/foo/branches \ --tags http://repository-root/foo/tags And this is where the new --minimize-url command-line switch comes in to allow for this behavior to continue working.
2007-05-13git-svn: fix segfaults due to initial SVN pool being clearedLibravatar Eric Wong1-1/+0
Some parts of SVN always seem to use it, even if the SVN::Ra object we're using is no longer used and we've created a new one in its place. It's also true that only one SVN::Ra connection can exist at once... Using SVN::Pool->new_default when the SVN::Ra object is created doesn't seem to help very much, either... Hopefully this fixes all segfault problems users have been experiencing over the past few months. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2007-05-13git-svn: clean up caching of SVN::Ra functionsLibravatar Eric Wong1-26/+42
This patch was originally intended to make the Perl GC more sensitive to the SVN::Pool objects and not accidentally clean them up when they shouldn't be (causing segfaults). That didn't work, but this patch makes the code a bit cleaner regardless Put our caches for get_dir and check_path calls directly into the SVN::Ra object so they auto-expire when it is destroyed. dirents returned by get_dir() no longer needs the pool object stored persistently along with the cache data, as they'll be converted to native Perl hash references. Since calling rev_proplist repeatedly per-revision is no longer needed in git-svn, we do not cache calls to it. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2007-05-13git-svn: don't drop the username from URLs when dcommit is runLibravatar Eric Wong1-1/+1
We no longer store usernames in URLs stored in git-svn-id lines for dcommit, so we shouldn't rely on those URLs when connecting to the remote repository to commit.
2007-05-13RPM spec: include files in technical/ to package.Libravatar Quy Tonthat1-0/+5
Not only that they are interesting to users, some of the files are linked to by the included "Git User's Manual" Signed-off-by: Quy Tonthat <qtonthat@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-13Remove stale non-static-inline prototype for tree_entry_extract()Libravatar Matthieu Castet1-1/+0
When 4651ece8 made the function a "static inline", it should have removd the stale prototype but everybody missed that. Thomas Glanzmann noticed this broke compilation with Forte12 compiler on his Sun boxes. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-13git-config: test for 'do not forget "a.b.var" ends "a.var" section'.Libravatar Steffen Prohaska1-0/+19
Added test for mentioned bugfix. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-13git-config: do not forget seeing "a.b.var" means we are out of "a.var" section.Libravatar Junio C Hamano1-4/+24
Earlier code tried to be half-careful and knew the logic that seeing "a.var" after seeing "a.b.var" is a sign of the previous "a.b." section has ended, but forgot it has to handle the other way. Seeing "a.b.var" after seeing "a.var" is a sign that "a." section has ended, so a new "a.var2" variable should be added before the location "a.b.var" appears. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-12Minor fixup to documentation of hooks in git-receive-pack.Libravatar Jan Hudec1-17/+20
Small additional changes to the cbb84e5d174cf33fd4dcf3136de50a886ff9a2e2 commit, which introduced documentation to pre-receive and post-receive: - Mention that stdout and stderr are equivalent. - Add one cross-section link and fix one other. - Fix information on advantages of post-receive over post-update. Signed-off-by: Jan Hudec <bulb@ucw.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-12Merge branch 'maint'Libravatar Junio C Hamano4-11/+74
* maint: checkout: allow detaching to HEAD even when switching to the tip of a branch Updated documentation of hooks in git-receive-pack. Allow fetching references from any namespace tiny fix in documentation of git-clone Fix an unmatched comment end in arm/sha1_arm.S
2007-05-12checkout: allow detaching to HEAD even when switching to the tip of a branchLibravatar Junio C Hamano2-3/+64
You cannot currently checkout the tip of an existing branch without moving to the branch. This allows you to detach your HEAD and place it at such a commit, with: $ git checkout master^0 Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-12Updated documentation of hooks in git-receive-pack.Libravatar Jan Hudec1-7/+70
Added documentation of pre-receive and post-receive hooks and updated documentation of update and post-update hooks. [jc: with minor copy-editing] Signed-off-by: Jan Hudec <bulb@ucw.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-12t9400: Use the repository config and nothing else.Libravatar Junio Hamano1-8/+9
git-cvsserver has a bug in its configuration file output parser that makes it choke if the configuration has these: [diff] color = auto [diff.color] whitespace = blue reverse This needs to be fixed, but thanks to that bug, a separate bug in t9400 test script was discovered. The test discarded GIT_CONFIG instead of pointing at the proper one to be used in the exoprted repository. This allowed user's .gitconfig and (if exists) systemwide /etc/gitconfig to affect the outcome of the test, which is a big no-no. The patch fixes the problem in the test. Fixing the git-cvsserver's configuration parser is left as an exercise to motivated volunteers ;-) Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-12Allow fetching references from any namespaceLibravatar Alex Riesen1-2/+2
not only from the three defined: heads, tags and remotes. Noticed when I tried to fetch the references created by git-p4-import.bat: they are placed into separate namespace (refs/p4import/, to avoid showing them in git-branch output). As canon_refs_list_for_fetch always prepended refs/heads/ it was impossible, and annoying: it worked before. Normally, the p4import references are useless anywhere but in the directory managed by perforce, but in this special case the cloned directory was supposed to be a backup, including the p4import branch: it keeps information about where the imported perforce state came from. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-12git-archive: don't die when repository uses subprojectsLibravatar Lars Hjemli2-4/+4
Both archive-tar and archive-zip needed to be taught about subprojects. The tar function died when trying to read the subproject commit object, while the zip function reported "unsupported file mode". This fixes both by representing the subproject as an empty directory. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-12tiny fix in documentation of git-cloneLibravatar Steffen Prohaska1-1/+1
path in example was missing '../' Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-12gitweb: Test if $from_id and $to_id are defined before comparisonLibravatar Jakub Narebski1-1/+2
Get rid of "Use of uninitialized value in string eq at gitweb/gitweb.perl line 2320" warning caused by the fact that "empty" patches, consisting only of extended git diff header and with patch body empty, such as patch for pure rename, does not have "index" line in extended diff header. For such patches $from_id and $to_id, filled from parsing extended diff header, are undefined. But such patches cannot be continuation patches. Test if $from_id and $to_id are defined before comparing them with $diffinfo. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-12Fix an unmatched comment end in arm/sha1_arm.SLibravatar Marco Costalba1-1/+1
Signed-off-by: Marco Costalba <mcostalba@gmail.com> Acked-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-12git-add: allow path limiting with -uLibravatar Jeff King2-7/+44
Rather than updating all working tree paths, we limit ourselves to paths listed on the command line. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-11read-tree -m -u: avoid getting confused by intermediate symlinks.Libravatar Junio C Hamano2-5/+10
When switching from a branch with both x86_64/boot/Makefile and i386/boot/Makefile to another branch that has x86_64/boot as a symlink pointing at ../i386/boot, the code incorrectly removed i386/boot/Makefile. This was because we first removed everything under x86_64/boot to make room to create a symbolic link x86_64/boot, then removed x86_64/boot/Makefile which no longer exists but now is pointing at i386/boot/Makefile, thanks to the symlink we just created. This fixes it by using the has_symlink_leading_path() function introduced previously for git-apply in the checkout codepath. Earlier, "git checkout" was broken in t4122 test due to this bug, and the test had an extra "git reset --hard" as a workaround, which is removed because it is not needed anymore. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-11apply: do not get confused by symlinks in the middleLibravatar Junio C Hamano3-10/+84
HPA noticed that git-rebase fails when changes involve symlinks in the middle of the hierarchy. Consider: * The tree state before the patch is applied has arch/x86_64/boot as a symlink pointing at ../i386/boot/ * The patch tries to remove arch/x86_64/boot symlink, and create bunch of files there: .gitignore, Makefile, etc. git-apply tries to be careful while applying patches; it never touches the working tree until it is convinced that the patch would apply cleanly. One of the check it does is that when it knows a path is going to be created by the patch, it runs lstat() on the path to make sure it does not exist. This leads to a false alarm. Because we do not touch the working tree before all the check passes, when we try to make sure that arch/x86_64/boot/.gitignore does not exist yet, we haven't removed the arch/x86_64/boot symlink. The lstat() check ends up seeing arch/i386/boot/.gitignore through the yet-to-be-removed symlink, and says "Hey, you already have a file there, but what you fed me is a patch to create a new file. I am not going to clobber what you have in the working tree." We have similar checks to see a file we are going to modify does exist and match the preimage of the diff, which is done by directly opening and reading the file. For a file we are going to delete, we make sure that it does exist and matches what is going to be removed (a removal patch records the full preimage, so we check what you have in your working tree matches it in full -- otherwise we would risk losing your local changes), which again is done by directly opening and reading the file. These checks need to be adjusted so that they are not fooled by symlinks in the middle. - To make sure something does not exist, first lstat(). If it does not exist, it does not, so be happy. If it _does_, we might be getting fooled by a symlink in the middle, so break leading paths and see if there are symlinks involved. When we are checking for a path a/b/c/d, if any of a, a/b, a/b/c is a symlink, then a/b/c/d does _NOT_ exist, for the purpose of our test. This would fix this particular case you saw, and would not add extra overhead in the usual case. - To make sure something already exists, first lstat(). If it does not exist, barf (up to this, we already do). Even if it does seem to exist, we might be getting fooled by a symlink in the middle, so make sure leading paths are not symlinks. This would make the normal codepath much more expensive for deep trees, which is a bit worrisome. This patch implements the first side of the check "making sure it does not exist". The latter "making sure it exists" check is not done yet, so applying the patch in reverse would still fail, but we have to start from somewhere. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-11Add has_symlink_leading_path() function.Libravatar Junio C Hamano2-0/+49
When we are applying a patch that creates a blob at a path, or when we are switching from a branch that does not have a blob at the path to another branch that has one, we need to make sure that there is nothing at the path in the working tree, as such a file is a local modification made by the user that would be lost by the operation. Normally, lstat() on the path and making sure ENOENT is returned is good enough for that purpose. However there is a twist. We may be creating a regular file arch/x86_64/boot/Makefile, while removing an existing symbolic link at arch/x86_64/boot that points at existing ../i386/boot directory that has Makefile in it. We always first check without touching filesystem and then perform the actual operation, so when we verify the new file, arch/x86_64/boot/Makefile, does not exist, we haven't removed the symbolic link arc/x86_64/boot symbolic link yet. lstat() on the file sees through the symbolic link and reports the file is there, which is not what we want. The function has_symlink_leading_path() function takes a path, and sees if any of the leading directory component is a symbolic link. When files in a new directory are created, we tend to process them together because both index and tree are sorted. The function takes advantage of this and allows the caller to cache and reuse which symbolic link on the filesystem caused the function to return true. The calling sequence would be: char last_symlink[PATH_MAX]; *last_symlink = '\0'; for each index entry { if (!lose) continue; if (lstat(it)) if (errno == ENOENT) ; /* happy */ else error; else if (has_symlink_leading_path(it, last_symlink)) ; /* happy */ else error; /* would lose local changes */ unlink_entry(it, last_symlink); } Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-10Minor copyediting on Release Notes for 1.5.2Libravatar Junio C Hamano1-7/+9
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-10GIT v1.5.2-rc3Libravatar Junio C Hamano2-2/+9
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-10Document 'git-log --decorate'Libravatar Michael Hendricks1-0/+3
Signed-off-by: Michael Hendricks <michael@ndrix.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-10Correct error message in revert/cherry-pickLibravatar Shawn O. Pearce1-1/+1
We now write to MERGE_MSG, not .msg. I missed this earlier when I changed the target we write to. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-10Merge branch 'master' of git://repo.or.cz/git-guiLibravatar Junio C Hamano9-345/+513
* 'master' of git://repo.or.cz/git-gui: git gui 0.7.0 git-gui: Paperbag fix blame in subdirectory git-gui: Format author/committer times in ISO format git-gui: Cleanup minor nits in blame code git-gui: Generate blame on uncommitted working tree file git-gui: Smarter command line parsing for browser, blame git-gui: Use prefix if blame is run in a subdirectory git-gui: Convert blame to the "class" way of doing things git-gui: Don't attempt to inline array reads in methods git-gui: Convert browser, console to "class" format git-gui: Define a simple class/method system git-gui: Allow shift-{k,j} to select a range of branches to merge git-gui: Call changes "Staged" and "Unstaged" in file list titles.
2007-05-10git gui 0.7.0Libravatar Shawn O. Pearce1-1/+1
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-10git-gui: Paperbag fix blame in subdirectoryLibravatar Shawn O. Pearce1-1/+1
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-10Merge branch 'maint'Libravatar Junio C Hamano1-1/+1
* maint: Fix documentation of tag in git-fast-import.txt Properly handle '0' filenames in import-tars
2007-05-10Merge branch 'maint' of git://repo.or.cz/git/fastimport into maintLibravatar Junio C Hamano1-1/+1
* 'maint' of git://repo.or.cz/git/fastimport: Fix documentation of tag in git-fast-import.txt Properly handle '0' filenames in import-tars
2007-05-10Fix documentation of tag in git-fast-import.txtLibravatar Richard P. Curnow1-1/+0
The tag command does not take a trailing LF. Signed-off-by: Richard P. Curnow <rc@rc0.org.uk> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-10Merge branch 'gfi-maint' into maintLibravatar Shawn O. Pearce1-1/+1
* gfi-maint: Properly handle '0' filenames in import-tars
2007-05-10gitweb: Do not use absolute font sizesLibravatar Petr Baudis1-10/+9
Avoid specifying font sizes in pixels, since that is just pure evil. Pointed out by Chris Riddoch. Note that this is pretty much just a proposal; I didn't test if everything fits perfectly right, but things seem to be pretty much okay. repo.or.cz uses it now as a test drive - if you find any visual quirks, please point them out, with a patch if possible since I'm total CSS noob and debugging CSS is an extremely painful experience for me. Note that this patch actually does change visual look of gitweb in Firefox with my resolution and default settings - everything is bigger and I can't explain the joy of actually seeing gitweb text that is in _readable_ size; also, my horizontal screen real estate feels better used now. But judging from the look of most modern webpages on the 'net, most people prefer reading the web with strained eyes and/or a magnifying glass (I wonder what species of scientists should look into this mystifying phenomenon) - so, please tell us what you think. Maybe we might want to get rid of absolute sizes other than font sizes in the CSS file too in the long term. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-10Git.pm: config_boolean() -> config_bool()Libravatar Petr Baudis3-8/+12
This patch renames config_boolean() to config_bool() for consistency with the commandline interface and because it is shorter but still obvious. ;-) It also changes the return value from some obscure string to real Perl boolean, allowing for clean user code. Signed-off-by: Petr Baudis <pasky@suse.cz>
2007-05-10Merge branch 'maint'Libravatar Junio C Hamano4-3/+13
* maint: .mailmap: add some aliases SPECIFYING RANGES typo fix: it it => it is git-clone: don't get fooled by $PWD Fix documentation of tag in git-fast-import.txt
2007-05-10.mailmap: add some aliasesLibravatar Junio C Hamano1-0/+4
2007-05-10SPECIFYING RANGES typo fix: it it => it isLibravatar Jari Aalto1-1/+1
Signed-off-by: Jari Aalto <jari.aalto@cante.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-10git-clone: don't get fooled by $PWDLibravatar Junio C Hamano1-1/+8
If you have /home/me/git symlink pointing at /pub/git/mine, trying to clone from /pub/git/his/ using relative path would not work as expected: $ cd /home/me $ cd git $ ls ../ his mine $ git clone -l -s -n ../his/stuff.git This is because "cd ../his/stuff.git" done inside git-clone to check if the repository is local is confused by $PWD, which is set to /home/me, and tries to go to /home/his/stuff.git which is different from /pub/git/his/stuff.git. We could probably say "set -P" (or "cd -P") instead, if we know the shell is POSIX, but the way the patch is coded is probably more portable. [jc: this is updated with Andy Whitcroft's improvements] Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-10gitweb: choose appropriate view for file type if a= parameter missingLibravatar Gerrit Pape1-4/+10
gitweb URLs use the a= parameter for the view to use on the given path, such as "blob" or "tree". Currently, if a gitweb URL omits the a= parameter, gitweb just shows the top-level repository summary, regardless of the path given. gitweb could instead choose an appropriate view based on the file type: blob for blobs (files), tree for trees (directories), and summary if no path given (the URL included no f= parameter, or an empty f= parameter). Apart from making gitweb more robust and supporting URL editing more easily, this change would aid the creation of shortcuts to git repositories using simple substitution, such as: http://example.org/git/?p=path/to/repo.git;hb=HEAD;f=%s With this patch, if given the hash through the h= parameter, or the hash base (hb=) and a filename (f=), gitweb uses cat-file -t to automatically set the a= parameter. This feature was requested by Josh Triplett through http://bugs.debian.org/410465 Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-10Added new git-gui library files to rpm specLibravatar Quy Tonthat1-0/+1
"make rpm" breaks without these files. Signed-off-by: Quy Tonthat <qtonthat@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-09Fix documentation of tag in git-fast-import.txtLibravatar Richard P. Curnow1-1/+0
The tag command does not take a trailing LF. Signed-off-by: Richard P. Curnow <rc@rc0.org.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-09t9400: skip cvsserver test if Perl SQLite interface is unavailableLibravatar Junio C Hamano1-0/+5
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-09Merge branch 'fl/cvsserver'Libravatar Junio C Hamano1-0/+120
* fl/cvsserver: cvsserver: Add test cases for git-cvsserver
2007-05-09Merge branch 'jc/diffopt'Libravatar Junio C Hamano3-73/+23
* jc/diffopt: diff -S: release the image after looking for needle in it diff -M: release the preimage candidate blobs after rename detection. diff.c: do not use a separate "size cache". diff: release blobs after generating textual diff.
2007-05-09Merge branch 'jn/gitweb'Libravatar Junio C Hamano2-103/+394
* jn/gitweb: gitweb: Show combined diff for merge commits in 'commit' view gitweb: Show combined diff for merge commits in 'commitdiff' view gitweb: Make it possible to use pre-parsed info in git_difftree_body gitweb: Add combined diff support to git_patchset_body gitweb: Add combined diff support to git_difftree_body gitweb: Add parsing of raw combined diff format to parse_difftree_raw_line