summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2007-08-05Fix install-doc-quick targetLibravatar Junio C Hamano1-1/+3
The script starts in a subdirectory of the source directory to muck with a branch whose structure does not have anything to do with the actual work tree. Go up to the top to make it clear that we operate on the whole tree. It also exported GIT_DIR without any good reason. Remove it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-05unpack-trees.c: assume submodules are clean during check-outLibravatar Junio C Hamano1-0/+9
Sven originally raised this issue: If you have a submodule checked out and you go back (or forward) to a revision of the supermodule that contains a different revision of the submodule and then switch to another revision, it will complain that the submodule is not uptodate, because git simply didn't update the submodule in the first move. The current policy is to consider it is perfectly normal that checked-out submodule is out-of-sync wrt the supermodule index. At least until we introduce a superproject repository configuration option that says "in this repository, I do care about this submodule and at any time I move around in the superproject, recursively check out the submodule to match", it is a reasonable policy, as we currently do not recursively checkout the submodules at all. The most extreme case of this policy is that the superproject index knows about the submodule but the subdirectory does not even have to be checked out. The function verify_uptodate(), called during the two-way merge aka branch switching, is about "make sure the filesystem entity that corresponds to this cache entry is up to date, lest we lose the local modifications". As we explicitly allow submodule checkout to drift from the supermodule index entry, the check should say "Ok, for submodules, not matching is the norm" for now. Later when we have the ability to mark "I care about this submodule to be always in sync with the superproject" (thereby implementing automatic recursive checkout and perhaps diff, among other things), we should check if the submodule in question is marked as such and perform the current test. Acked-by: Lars Hjemli <hjemli@gmail.com> Acked-by: Sven Verdoolaege <skimo@kotnet.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-04Fixed git-push manpageLibravatar Jyotirmoy Bhattacharya1-1/+1
In git-push it is the remote repository and not the local repository which is fast forwarded. The description of the -f option in the git-push manpage gets it the other way round. Signed-off-by: Jyotirmoy Bhattacharya <jyotirmoy@jyotirmoy.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-04checkout-index needs a working treeLibravatar Johannes Schindelin1-1/+2
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-04add "test-absolute-path" to .gitignoreLibravatar Randal L. Schwartz1-0/+1
New file requires new ignore. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-04Document GIT_SSH environment variable alongside other variablesLibravatar Shawn O. Pearce1-0/+16
The GIT_SSH environment variable has survived for quite a while without being documented, but has been mentioned on list and on my day-job repositories can only be accessed via magic supplied through the wonderous hack that is GIT_SSH. Advertising it alongside other "low level magic" such as GIT_PAGER and GIT_MERGE_VERBOSITY will certainly help others who need to spread their own pixie dust to make things work. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-04INSTALL: add warning on docbook-xsl 1.72 and 1.73Libravatar Junio C Hamano2-0/+25
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-04gitweb: Fix handling of $file_name in feed generationLibravatar Jakub Narebski1-1/+1
The commit b6093a5c, by Robert Fitzsimons: "gitweb: Change atom, rss actions to use parse_commits." forgot to pass $file_name parameter to parse_commits subroutine. If git_feed is provided a file name, it ought to show only the history affecting that file or a directory. The title was being set correctly, but all commits from history were being shown. Signed-off-by: Steven Walter <stevenrwalter@gmail.com> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-04git-completion: add "git stash"Libravatar Junio C Hamano1-0/+7
This is a new addition to 1.5.3; let's teach it to the completion before the final release. [sp: Added missing git-stash completion configuration] Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-08-03GIT 1.5.3-rc4Libravatar Junio C Hamano1-3/+3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-03Fix bogus use of printf in t3700 testLibravatar Junio C Hamano1-2/+2
The hashed contents did not matter in the end result, but it passed an uninitialized variable to printf, which caused it to emit empty while giving an error/usage message. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-03gitweb: do not choke on recursive symlinkLibravatar Junio C Hamano1-0/+1
If somebody used to advertise his repository that physically resides at /pub/lic.git/ as: git://git.example.com/pub/lic.git/ but now wants to use --base-path to allow: git://git.example.com/lic.git/ she can start git-daemon with --base-path option, like this: git-daemon --base-path=/pub --export-all During the transition, however, she would also want to allow older URL as well. One natural way to achieve that is to create a symlink: ln -s /pub /pub/pub so that a request to git://git.example.com/pub/lic.git/ is first translated by --base-path to a request to /pub/pub/lic.git/ which goes to /pub/lic.git, thanks to the symlink. So far so good. However, gitweb chokes if there is such a symlink (File::Find barfs with "/pub/pub is a recursive symbolic link"). Make the code ignore such a symlink. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-02Fix work-tree related breakagesLibravatar Junio C Hamano1-8/+14
In set_work_tree(), variable rel needs to be reinitialized to NULL on every call (it should not be static). Make sure the incoming dir variable is not too long before copying to the temporary buffer, and make sure chdir to the resulting directory succeeds. This was spotted and fixed by Alex and Johannes in a handful patch exchanges. Here is the final version. Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
2007-08-02Fix documentation for core.gitproxy to reflect codeLibravatar David Symonds2-4/+2
The current implementation of core.gitproxy only operates on git:// URLs, so the ssh:// examples and custom protocol examples have been removed or edited. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-02read-tree: remove unnecessary call to setup_git_directory()Libravatar Johannes Schindelin1-1/+0
read-tree is already marked with RUN_SETUP in git.c, so there is no need to call setup_git_directory() a second time. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-02Support building on GNU/HurdLibravatar Thomas Schwinge1-0/+4
GNU/Hurd systems don't have strlcpy. Signed-off-by: Thomas Schwinge <tschwinge@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-02Fix style nit in Python slicing.Libravatar Han-Wen Nienhuys1-3/+3
Python slices start at 0 by default. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Simon Hausmann <simon@lst.de>
2007-08-02Sort output of "p4 change" in incremental import before furtherLibravatar Han-Wen Nienhuys1-1/+1
processing P4 change outputs the changes sorted for each directory separately. We want the global ordering on the changes, hence we sort. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Simon Hausmann <simon@lst.de>
2007-08-02RelNotes 1.5.3 updates before -rc4Libravatar Junio C Hamano1-1/+13
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-01When generating manpages, delete outdated targets first.Libravatar David Kastrup1-0/+1
This makes "make doc" work even if you made "sudo make doc" previously by mistake. Apparently an oversight: the other targets did this already. Signed-off-by: David Kastrup <dak@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-01rebase -i: fix for optional [branch] parameterLibravatar Johannes Schindelin2-1/+9
When calling "git rebase -i <upstream> <branch>", git should switch to <branch> first. This worked before, but I broke it by my "Shut git rebase -i up" patch. Fix that, and add a test to make sure that it does not break again. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Acked-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-01Try to be consistent with capitalization in the documentationLibravatar Steve Hoelzer4-26/+26
Signed-off-by: Steve Hoelzer <shoelzer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-01git-commit.sh: Permit the --amend message to be given with -m/-c/-C/-F.Libravatar Junio C Hamano2-6/+5
[jc: adjusted t/t7501 as this makes -F and --amend compatible] Signed-off-by: David Kastrup <dak@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-01git-sh-setup.sh: make GIT_EDITOR/core.editor/VISUAL/EDITOR accept commandsLibravatar David Kastrup1-2/+3
The previous code only allowed specifying a single executable rather than a complete command like "emacsclient --alternate-editor vi" in those variables. Since VISUAL/EDITOR appear to be traditionally passed to a shell for interpretation (as corroborated with "less", "mail" and "mailx", while the really ancient "more" indeed allows only an executable name), the shell function git_editor has been amended appropriately. "eval" is employed to have quotes and similar interpreted _after_ expansion, so that specifying EDITOR='"/home/dak/My Commands/notepad.exe"' can be used for actually using commands with blanks. Instead of passing just the first argument of git_editor on, we pass all of them (so that +lineno might be employed at a later point of time, or so that multiple files may be edited when appropriate). Strictly speaking, there is a change in behavior: when git config core.editor returns a valid but empty string, the fallbacks are still searched. This is more consistent, and the old code was problematic with regard to multiple blanks. Putting in additional quotes might have worked, but quotes inside of command substitution inside of quotes is nasty enough to not reliably work the same across "Bourne shells". Signed-off-by: David Kastrup <dak@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-01Hack git-add--interactive to make it work with ActiveState PerlLibravatar Alex Riesen1-6/+13
It wont work for arguments with special characters (like ", : or *). It is generally not possible on Windows, so I didn't even try. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-01rebase -i: ignore patches that are already in the upstreamLibravatar Johannes Schindelin2-2/+18
Non-interactive rebase had this from the beginning -- match it by using --cherry-pick option to rev-list. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-01get_relative_cwd(): clarify why it handles dir == NULLLibravatar Johannes Schindelin1-5/+10
The comment did not make a good case why it makes sense. Clarify, and remove stale comment about the caller being lazy. The behaviour on NULL input is pretty much intentional. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-01Clean up work-tree handlingLibravatar Johannes Schindelin10-221/+216
The old version of work-tree support was an unholy mess, barely readable, and not to the point. For example, why do you have to provide a worktree, when it is not used? As in "git status". Now it works. Another riddle was: if you can have work trees inside the git dir, why are some programs complaining that they need a work tree? IOW it is allowed to call $ git --git-dir=../ --work-tree=. bla when you really want to. In this case, you are both in the git directory and in the working tree. So, programs have to actually test for the right thing, namely if they are inside a working tree, and not if they are inside a git directory. Also, GIT_DIR=../.git should behave the same as if no GIT_DIR was specified, unless there is a repository in the current working directory. It does now. The logic to determine if a repository is bare, or has a work tree (tertium non datur), is this: --work-tree=bla overrides GIT_WORK_TREE, which overrides core.bare = true, which overrides core.worktree, which overrides GIT_DIR/.. when GIT_DIR ends in /.git, which overrides the directory in which .git/ was found. In related news, a long standing bug was fixed: when in .git/bla/x.git/, which is a bare repository, git formerly assumed ../.. to be the appropriate git dir. This problem was reported by Shawn Pearce to have caused much pain, where a colleague mistakenly ran "git init" in "/" a long time ago, and bare repositories just would not work. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-01Add set_git_dir() functionLibravatar Johannes Schindelin2-0/+9
With the function set_git_dir() you can reset the path that will be used for git_path(), git_dir() and friends. The responsibility to close files and throw away information from the old git_dir lies with the caller. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-01Add functions get_relative_cwd() and is_inside_dir()Libravatar Johannes Schindelin2-0/+41
The function get_relative_cwd() works just as getcwd(), only that it takes an absolute path as additional parameter, returning the prefix of the current working directory relative to the given path. If the cwd is no subdirectory of the given path, it returns NULL. is_inside_dir() is just a trivial wrapper over get_relative_cwd(). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-01Add is_absolute_path() and make_absolute_path()Libravatar Johannes Schindelin5-1/+98
This patch adds convenience functions to work with absolute paths. The function is_absolute_path() should help the efforts to integrate the MinGW fork. Note that make_absolute_path() returns a pointer to a static buffer. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-01--base-path-relaxed optionLibravatar Jens Axboe2-2/+30
I switched git.kernel.dk to --base-path a few minutes ago, to get rid of a /data/git postfix in the posted urls. But transitioning is tricky, since now all old paths will fail miserably. So I added this --base-path-relaxed option, that will make git-daemon try the absolute path without prefixing --base-path before giving up. With this in place and --base-path-relaxed added, both my new url of git://git.kernel.dk/linux-2.6-block.git and the old git://git.kernel.dk/data/git/linux-2.6-block.git work fine. Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-31Add test case for basic commit functionality.Libravatar Kristian Høgsberg1-0/+134
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-31git.el: Take into account the core.excludesfile config option.Libravatar Alexandre Julliard1-5/+15
Also don't require .git/info/exclude to exist in order to list unknown files. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Acked-by: Karl Hasselström <kha@treskal.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-31git.el: Avoid using ewoc-set-data for compatibility with Emacs 21.Libravatar Alexandre Julliard1-1/+1
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Acked-by: Karl Hasselström <kha@treskal.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-31Make verse of git-config manpage more readableLibravatar Alex Riesen1-13/+19
Also mention '--file' in FILES. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-31Add a test for git-config --fileLibravatar Alex Riesen1-0/+6
Check for non-0 exit code if the confiog file does not exist and if it works exactly like when setting GIT_CONFIG. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-31Add an option to specify a file to config builtinLibravatar Alex Riesen2-14/+24
There are (really!) systems where using environment variables is very cumbersome (yes, Windows, it has problems unsetting them). Besides this form is shorter. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-31make the name of the library directory a config optionLibravatar Robert Schiele2-5/+17
Introduce new makefile variable lib to hold the name of the lib directory ("lib" by default). Also introduce a switch for configure to specify this name with --with-lib=ARG. This is useful for systems that use a different name than "lib" (like "lib64" on some 64 bit Linux architectures). Signed-off-by: Robert Schiele <rschiele@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-31Merge branch 'maint'Libravatar Junio C Hamano1-1/+1
* maint: rev-list --bisect: fix allocation of "int*" instead of "int".
2007-07-31rev-list --bisect: fix allocation of "int*" instead of "int".Libravatar Christian Couder1-1/+1
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-31git.c: execution pathLibravatar Junio C Hamano1-5/+5
The comment before executing git subcommands were stale and confusing. Noticed by Jeff King. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-31add option to find zlib in custom pathLibravatar Robert Schiele2-1/+10
Some systems do not provide zlib development headers and libraries in default search path of the compiler. For these systems we should allow specifying the location by --with-zlib=PATH or by setting ZLIB_PATH in the makefile. Signed-off-by: Robert Schiele <rschiele@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-30Unset GIT_EDITOR while running tests.Libravatar Junio C Hamano1-0/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-30add_file_to_index: skip rehashing if the cached stat already matchesLibravatar Junio C Hamano1-1/+10
An earlier commit 366bfcb6 broke git-add by moving read_cache() call down, because it wanted the directory walking code to grab paths that are already in the index. The change serves its purpose, but introduces a regression because the responsibility of avoiding unnecessary reindexing by matching the cached stat is shifted nowhere. This makes it the job of add_file_to_index() function. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-30git-svn: Translate invalid characters in refnameLibravatar Robert Ewald1-3/+36
In git some characters are invalid as documented in git-check-ref-format. In subversion these characters might be valid, so a translation is required. This patch does this translation by url escaping characters, that are not allowed. Credit goes to Eric Wong, martin f. krafft and Jan Hudec Signed-off-by: Robert Ewald <robewald@gmx.net> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-30white space fixes in setup.cLibravatar Johannes Schindelin1-3/+3
Some lines were not indented by tabs but by spaces. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-30Documentation/gitattributes.txt: typofixLibravatar David Soria Parra1-1/+1
The file used for per-repository attribute setting is not $GIT_DIR/info/gitattributes, but $GIT_DIR/info/attributes. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-29rebase: try not to munge commit log messageLibravatar Junio C Hamano2-5/+72
This makes rebase/am keep the original commit log message better, even when it does not conform to "single line paragraph to say what it does, then explain and defend why it is a good change in later paragraphs" convention. This change is a two-edged sword. While the earlier behaviour would make such commit log messages more friendly to readers who expect to get the birds-eye view with oneline summary formats, users who primarily use git as a way to interact with foreign SCM systems would not care much about the convenience of oneline git log tools, but care more about preserving their own convention. This changes their commits less useful to readers who read them with git tools while keeping them more consistent with the foreign SCM systems they interact with. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-29symbolic-ref, update-ref: do not refuse reflog message with LFLibravatar Junio C Hamano2-4/+0
Earlier these tools refused to create a reflog entry when the message given by the calling Porcelain had a LF in it, partially to keep the file format integrity of reflog file, which is one-entry-per-line. These tools should not be dictating such a policy. Instead, let the codepath to write out the reflog entry worry about the format integrity and allow messages with LF in them. Signed-off-by: Junio C Hamano <gitster@pobox.com>