aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Fix work-tree related breakagesJunio C Hamano2007-08-02
| | | | | | | | | | | | | | | 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>
* Fix documentation for core.gitproxy to reflect codeDavid Symonds2007-08-02
| | | | | | | | 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>
* read-tree: remove unnecessary call to setup_git_directory()Johannes Schindelin2007-08-02
| | | | | | | | 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>
* Support building on GNU/HurdThomas Schwinge2007-08-02
| | | | | | | GNU/Hurd systems don't have strlcpy. Signed-off-by: Thomas Schwinge <tschwinge@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Fix style nit in Python slicing.Han-Wen Nienhuys2007-08-02
| | | | | | | Python slices start at 0 by default. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Simon Hausmann <simon@lst.de>
* Sort output of "p4 change" in incremental import before furtherHan-Wen Nienhuys2007-08-02
| | | | | | | | | | 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>
* RelNotes 1.5.3 updates before -rc4Junio C Hamano2007-08-02
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* When generating manpages, delete outdated targets first.David Kastrup2007-08-01
| | | | | | | | 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>
* rebase -i: fix for optional [branch] parameterJohannes Schindelin2007-08-01
| | | | | | | | | | | | 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>
* Try to be consistent with capitalization in the documentationSteve Hoelzer2007-08-01
| | | | | Signed-off-by: Steve Hoelzer <shoelzer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-commit.sh: Permit the --amend message to be given with -m/-c/-C/-F.Junio C Hamano2007-08-01
| | | | | | | [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>
* git-sh-setup.sh: make GIT_EDITOR/core.editor/VISUAL/EDITOR accept commandsDavid Kastrup2007-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Hack git-add--interactive to make it work with ActiveState PerlAlex Riesen2007-08-01
| | | | | | | 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>
* rebase -i: ignore patches that are already in the upstreamJohannes Schindelin2007-08-01
| | | | | | | | 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>
* get_relative_cwd(): clarify why it handles dir == NULLJohannes Schindelin2007-08-01
| | | | | | | | | 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>
* Clean up work-tree handlingJohannes Schindelin2007-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add set_git_dir() functionJohannes Schindelin2007-08-01
| | | | | | | | | | | 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>
* Add functions get_relative_cwd() and is_inside_dir()Johannes Schindelin2007-08-01
| | | | | | | | | | | | 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>
* Add is_absolute_path() and make_absolute_path()Johannes Schindelin2007-08-01
| | | | | | | | | | | 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>
* --base-path-relaxed optionJens Axboe2007-08-01
| | | | | | | | | | | | | | | | | | | | | 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>
* Add test case for basic commit functionality.Kristian Høgsberg2007-07-31
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git.el: Take into account the core.excludesfile config option.Alexandre Julliard2007-07-31
| | | | | | | | | 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>
* git.el: Avoid using ewoc-set-data for compatibility with Emacs 21.Alexandre Julliard2007-07-31
| | | | | | 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>
* Make verse of git-config manpage more readableAlex Riesen2007-07-31
| | | | | | | Also mention '--file' in FILES. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Add a test for git-config --fileAlex Riesen2007-07-31
| | | | | | | | 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>
* Add an option to specify a file to config builtinAlex Riesen2007-07-31
| | | | | | | | | 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>
* make the name of the library directory a config optionRobert Schiele2007-07-31
| | | | | | | | | | | 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>
* Merge branch 'maint'Junio C Hamano2007-07-31
|\ | | | | | | | | * maint: rev-list --bisect: fix allocation of "int*" instead of "int".
| * rev-list --bisect: fix allocation of "int*" instead of "int".Christian Couder2007-07-31
| | | | | | | | | | Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git.c: execution pathJunio C Hamano2007-07-31
| | | | | | | | | | | | | | The comment before executing git subcommands were stale and confusing. Noticed by Jeff King. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | add option to find zlib in custom pathRobert Schiele2007-07-31
| | | | | | | | | | | | | | | | | | | | 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>
* | Unset GIT_EDITOR while running tests.Junio C Hamano2007-07-30
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | add_file_to_index: skip rehashing if the cached stat already matchesJunio C Hamano2007-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | git-svn: Translate invalid characters in refnameRobert Ewald2007-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | white space fixes in setup.cJohannes Schindelin2007-07-30
| | | | | | | | | | | | | | 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>
* | Documentation/gitattributes.txt: typofixDavid Soria Parra2007-07-30
| | | | | | | | | | | | | | 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>
* | rebase: try not to munge commit log messageJunio C Hamano2007-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | symbolic-ref, update-ref: do not refuse reflog message with LFJunio C Hamano2007-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | log_ref_write() -- do not chomp reflog message at the first LFJunio C Hamano2007-07-29
| | | | | | | | | | | | | | | | | | A reflog file is organized as one-line-per-entry records, and we enforced the file format integrity by chomping the given message at the first LF. This changes it to convert them to SP, which is more in line with the --pretty=oneline format. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'bs/lock'Junio C Hamano2007-07-29
|\ \ | | | | | | | | | | | | | | | | | | * bs/lock: Add test for symlinked configuration file updates. use lockfile.c routines in git_commit_set_multivar() fully resolve symlinks when creating lockfiles
| * | Add test for symlinked configuration file updates.Junio C Hamano2007-07-27
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | use lockfile.c routines in git_commit_set_multivar()Bradford C. Smith2007-07-27
| | | | | | | | | | | | | | | | | | | | | | | | Changed git_commit_set_multivar() to use the routines provided by lockfile.c to reduce code duplication and ensure consistent behavior. Signed-off-by: Bradford C. Smith <bradford.carl.smith@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | fully resolve symlinks when creating lockfilesBradford C. Smith2007-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the code for resolving symlinks in lockfile.c more robust as follows: 1. Handle relative symlinks 2. recursively resolve symlink chains up to 5 [jc: removed lstat/stat calls to do things stupid way] Signed-off-by: Bradford C. Smith <bradford.carl.smith@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'master' of git://repo.or.cz/git-guiJunio C Hamano2007-07-29
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'master' of git://repo.or.cz/git-gui: (50 commits) git-gui: Minor refactoring of merge command line in merge support git-gui: Use more modern looking icons in the tree browser git-gui: Don't offer to stage hunks from untracked files git-gui: Make sure remotes are loaded when picking revisions git-gui: Use progress bar while resetting/aborting files git-gui: Honor core.excludesfile when listing extra files git-gui: Unify wording to say "to stage" instead of "to add" git-gui: Don't kill modified commit message buffer with merge templates git-gui: Remove usernames from absolute SSH urls during merging git-gui: Format tracking branch merges as though they were pulls git-gui: Cleanup bindings within merge dialog git-gui: Replace merge dialog with our revision picker widget git-gui: Show ref last update times in revision chooser tooltips git-gui: Display commit/tag/remote info in tooltip of revision picker git-gui: Save remote urls obtained from config/remotes setup git-gui: Avoid unnecessary symbolic-ref call during checkout git-gui: Refactor current branch menu items to make i18n easier git-gui: Refactor diff popup into a procedure to ease i18n work git-gui: Paper bag fix quitting crash after commit git-gui: Clarify meaning of add tracked menu option ...
| * | | git-gui: Minor refactoring of merge command line in merge supportgitgui-0.8.0Shawn O. Pearce2007-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is just a small code movement to cleanup how we generate the command line for a merge. I'm only doing it to make the next series of changes slightly more readable. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * | | git-gui: Use more modern looking icons in the tree browserShawn O. Pearce2007-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a replacement of all of the icons in our tree browser window, as the prior icons just looked too 1980s Tk-ish. The icons used here are actually from a KDE themed look, so they might actually be familiar to some users of git-gui. Aside from using more modern looking icons we now have a special icon for executable blobs, to make them stand out from the normal non-executable blobs. We also denote symlinks now with a different icon, so they stand out from the other types of objects in the tree. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * | | git-gui: Don't offer to stage hunks from untracked filesShawn O. Pearce2007-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user looks at an untracked file in our diff pane we used to offer "Stage Hunk For Commit" in the context menu when they right-clicked in that pane. The problem is we don't actually have any diff hunks in untracked files, so there is nothing to really select for staging. So we now grey out the menu item, so the user cannot invoke it and think its broken when it does not perform any useful action. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * | | git-gui: Make sure remotes are loaded when picking revisionsShawn O. Pearce2007-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we are started for only a blame/browser/citool run we don't usually initialize the list of remotes, or determine which refs are tracking branches and which are local branch heads. This is because some of that work is relatively expensive and is usually not going to be needed if we are started only for a blame, or to make a single commit. However by not loading the remote configuration we were crashing if the user tried to open a browser for another branch through the Repository menu, as our load_all_heads procedure was unable to decide which refs/heads/ items were actually local heads. We now force all remote configuration data to be loaded if we have not done so already and we are trying to create a revision mega widget. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * | | git-gui: Use progress bar while resetting/aborting filesShawn O. Pearce2007-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resetting a large number of files on a slow filesystem can take considerable time, just as switching branches in such a case can take more than two seconds. We now take advantage of the progress meter output by read-tree and show it in the main window status bar, just like we do during checkout (branch switch). Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * | | git-gui: Honor core.excludesfile when listing extra filesShawn O. Pearce2007-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent git versions have a git-status that honors the core.excludesfile configuration option when it reports on untracked files. Unfortunately I missed the introduction of this configuration option in the core porcelain implementation, so it was not reflected here in git-gui. Found and reported by Lars Noschinski <lars@public.noschinski.de>. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>