summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2008-05-23Fold test-absolute-path into test-path-utilsLibravatar David Reiss5-17/+13
Signed-off-by: David Reiss <dreiss@facebook.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-23Implement normalize_absolute_pathLibravatar David Reiss6-1/+109
normalize_absolute_path removes several oddities form absolute paths, giving nice clean paths like "/dir/sub1/sub2". Also add a test case for this utility, based on a new test program (in the style of test-sha1). Signed-off-by: David Reiss <dreiss@facebook.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-17Makefile: update the default build options for AIXLibravatar Mike Ralphson1-0/+4
NO_MKDTEMP is required to build, FREAD_READS_DIRECTORIES and the definition of _LARGE_FILES fix test suite failures and INTERNAL_QSORT is required for adequate performance. Tested on AIX v5.3 Maintenance Level 06 Signed-off-by: Mike Ralphson <mike@abacus.co.uk> Tested-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-16Merge branch 'maint'Libravatar Junio C Hamano1-0/+4
* maint: git-filter-branch: Clarify file removal example.
2008-05-16Replace in-place sed in t7502-commitLibravatar Marcel Koeppen1-1/+3
The in-place mode of sed used in t7502-commit is a non-POSIX extension. That call of sed is replaced by a more portable version using a temporary file. Signed-off-by: Marcel Koeppen <git-dev@marzelpan.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-16git-filter-branch: Clarify file removal example.Libravatar Jon Loeliger1-0/+4
Signed-off-by: Jon Loeliger <jdl@jdl.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-16submodule update: add convenience option --initLibravatar Johannes Schindelin3-2/+25
When a submodule is not initialized and you do not want to change the defaults from .gitmodules anyway, you can now say $ git submodule update --init <name> When "update" is called without --init on an uninitialized submodule, a hint to use --init is printed. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-16git-fast-import: rename cmd_*() functions to parse_*()Libravatar Miklos Vajna1-31/+31
There is a cmd_merge() function in fast-import that will conflict with builtin-merge's cmd_merge() function. To keep it consistent, rename all cmd_*() function to parse_*() Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-16Documentation/git-web--browse.txt: fix small typoLibravatar Teemu Likonen1-1/+1
Change "brower.konqueror.path" to "browser.konqueror.path" in documentation. Signed-off-by: Teemu Likonen <tlikonen@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-16Use '-f' option to point to the .gitmodules fileLibravatar Imran M Yousuf1-5/+4
'git config' has a '-f' option that takes the file to parse. Using it rather than the environment variable seems more logical and simplified. Signed-off-by: Imran M Yousuf <imyousuf@smartitengineering.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-15Merge git://repo.or.cz/git-guiLibravatar Junio C Hamano7-25/+49
* git://repo.or.cz/git-gui: git-gui: Delete branches with 'git branch -D' to clear config git-gui: Setup branch.remote,merge for shorthand git-pull git-gui: Update German translation git-gui: Don't use '$$cr master' with aspell earlier than 0.60 git-gui: Report less precise object estimates for database compression
2008-05-15Documentation/git-prune.txt: document unpacked logicLibravatar Chris Frey1-1/+4
Clarifies the git-prune man page, documenting that it only prunes unpacked objects. Signed-off-by: Chris Frey <cdfrey@foursquare.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-14Merge git://git.kernel.org/pub/scm/gitk/gitkLibravatar Junio C Hamano5-888/+4028
* git://git.kernel.org/pub/scm/gitk/gitk: (44 commits) gitk: Add a progress bar for checking out a head gitk: Show current row number and total number of rows gitk: Allow users to view diffs in external diff viewer gitk: Synchronize highlighting in file view for 'f' and 'b' commands gitk: Make updates go faster gitk: Disable "Reset %s branch to here" when on a detached head gitk: German translation again updated gitk: Update German translation gitk: Makefile/install: force permissions when installing files and dirs gitk: Initial Swedish translation. gitk: Spanish translation of gitk gitk: Fix handling of tree file list with special chars in names gitk: Reorganize processing of arguments for git log gitk: Fix problem with target row not being in scroll region gitk: Avoid a crash in selectline if commitinfo($id) isn't set gitk: Fix some corner cases in computing vrowmod and displayorder gitk: Correct a few strings and comments to say "git log" gitk: Don't filter view arguments through git rev-parse gitk: Fix problems with target row stuff gitk: Handle updating with path limiting better ...
2008-05-14Merge branch 'maint'Libravatar Junio C Hamano1-3/+4
* maint: Documentation/git-describe.txt: make description more readable
2008-05-14Merge branch 'maint-1.5.4' into maintLibravatar Junio C Hamano1-3/+4
* maint-1.5.4: Documentation/git-describe.txt: make description more readable
2008-05-14Merge branch 'sb/committer'Libravatar Junio C Hamano6-40/+109
* sb/committer: commit: Show committer if automatic commit: Show author if different from committer Preparation to call determine_author_info from prepare_to_commit
2008-05-14Merge branch 'bd/tests'Libravatar Junio C Hamano57-539/+591
* bd/tests: Rename the test trash directory to contain spaces. Fix tests breaking when checkout path contains shell metacharacters Don't use the 'export NAME=value' in the test scripts. lib-git-svn.sh: Fix quoting issues with paths containing shell metacharacters test-lib.sh: Fix some missing path quoting Use test_set_editor in t9001-send-email.sh test-lib.sh: Add a test_set_editor function to safely set $VISUAL git-send-email.perl: Handle shell metacharacters in $EDITOR properly config.c: Escape backslashes in section names properly git-rebase.sh: Fix --merge --abort failures when path contains whitespace Conflicts: t/t9115-git-svn-dcommit-funky-renames.sh
2008-05-14Merge branch 'mv/format-cc'Libravatar Junio C Hamano4-0/+75
* mv/format-cc: Add tests for sendemail.cc configuration variable git-send-email: add a new sendemail.cc configuration variable git-format-patch: add a new format.cc configuration variable
2008-05-14Merge branch 'cc/hooks-doc'Libravatar Junio C Hamano9-13/+28
* cc/hooks-doc: Documentation: rename "hooks.txt" to "githooks.txt" and make it a man page
2008-05-14Merge branch 'jk/renamelimit' (early part)Libravatar Junio C Hamano7-6/+94
* 'jk/renamelimit' (early part): diff: make "too many files" rename warning optional bump rename limit defaults add merge.renamelimit config option
2008-05-14Documentation/git-describe.txt: make description more readableLibravatar Ian Hilt1-3/+4
Signed-off-by: Ian Hilt <ian.hilt@gmail.com> Credit-to: Kevin Ballard <kevin@sb.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-13filter-branch: fix variable export logicLibravatar Jeff King1-3/+9
filter-branch tries to restore "old" copies of some environment variables by using the construct: unset var test -z "$old_var" || var="$old_var" && export var This is just wrong. AND-list and OR-list operators && and || have equal precedence and they bind left to right. The second term, var="$old" assignment always succeeds, so we always end up exporting var. On bash and dash, exporting an unset variable has no effect. However, on some shells (such as FreeBSD's /bin/sh), the shell exports the empty value. This manifested itself in this case as git-filter-branch setting GIT_INDEX_FILE to the empty string, which in turn caused its call to git-read-tree to fail, leaving the working tree pointing at the original HEAD instead of the rewritten one. To fix this, we change the short-circuit logic to better match the intent: test -z "$old_var" || { var="$old_var" && export var } Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-13clone: bsd shell portability fixLibravatar Jeff King1-2/+1
When using /bin/sh from FreeBSD 6.1, the value of $? is lost when calling a function inside the 'trap' action. This resulted in clone erroneously indicating success when it should have reported failure. As a workaround, we save the value of $? before calling any functions. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-13t5000: tar portability fixLibravatar Jeff King1-4/+4
The output of 'tar tv' varies from system to system. In particular, the t5000 was expecting to parse the date from something like: -rw-rw-r-- root/root 0 2008-05-13 04:27 file but FreeBSD's tar produces this: -rw-rw-r-- 0 root root 0 May 13 04:27 file Instead of relying on tar's output, let's just extract the file using tar and stat the result using perl. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-13fix bsd shell negationLibravatar Jeff King5-8/+8
On some shells (notably /bin/sh on FreeBSD 6.1), the construct foo && ! bar | baz is true if foo && baz whereas for most other shells (such as bash) is true if foo && ! baz We can work around this by specifying foo && ! (bar | baz) which works everywhere. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-12Improve reporting of errors in config file routinesLibravatar Alex Riesen1-19/+16
Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-12Merge branch 'gp/bisect-fix'Libravatar Junio C Hamano3-10/+55
* gp/bisect-fix: bisect: print an error message when "git rev-list --bisect-vars" fails git-bisect.sh: don't accidentally override existing branch "bisect"
2008-05-12gitk: Add a progress bar for checking out a headLibravatar Paul Mackerras1-10/+31
Now that git checkout reports progress when checking out files, we can use that to provide a progress bar in gitk. We re-use the green progress bar (formerly used when reading stuff in) for that. Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-05-11Merge branch 'maint'Libravatar Junio C Hamano3-3/+4
* maint: wt-status.h: declare global variables as extern builtin-commit.c: add -u as short name for --untracked-files git-repack: re-enable parsing of -n command line option
2008-05-11Merge branch 'maint-1.5.4' into maintLibravatar Junio C Hamano3-3/+4
* maint-1.5.4: wt-status.h: declare global variables as extern builtin-commit.c: add -u as short name for --untracked-files git-repack: re-enable parsing of -n command line option
2008-05-11Merge branch 'lt/core-optim'Libravatar Junio C Hamano16-169/+393
* lt/core-optim: Optimize symlink/directory detection Avoid some unnecessary lstat() calls is_racy_timestamp(): do not check timestamp for gitlinks diff-lib.c: rename check_work_tree_entity() diff: a submodule not checked out is not modified Add t7506 to test submodule related functions for git-status t4027: test diff for submodule with empty directory Make git-add behave more sensibly in a case-insensitive environment When adding files to the index, add support for case-independent matches Make unpack-tree update removed files before any updated files Make branch merging aware of underlying case-insensitive filsystems Add 'core.ignorecase' option Make hash_name_lookup able to do case-independent lookups Make "index_name_exists()" return the cache_entry it found Move name hashing functions into a file of its own Make unpack_trees_options bit flags actual bitfields
2008-05-11rev-parse --verify: do not output anything on errorLibravatar Christian Couder2-24/+26
Before this patch, when "git rev-parse --verify" was passed at least one good rev and then anything, it would output something for the good rev even if it would latter exit on error. With this patch, we only output something if everything is ok. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-11rev-parse: fix using "--default" with "--verify"Libravatar Christian Couder2-6/+7
Before this patch, something like: $ git rev-parse --verify HEAD --default master did not work, while: $ git rev-parse --default master --verify HEAD worked. This patch fixes that, so that they both work (assuming HEAD and master can be parsed). Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-11rev-parse: add test script for "--verify"Libravatar Christian Couder1-0/+114
This patch documents the current behavior of "git rev-parse --verify". This command is tested both with and without the "--quiet" and "--default" options. This shows some problems with the current behavior that will be fixed in latter patches: - in case of errors, there should be no good rev output on stdout, - with "--default" one test case is broken Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-11Add svn-compatible "blame" output format to git-svnLibravatar Steven Grimm2-15/+55
git-svn blame produced output in the format of git blame; in environments where there are scripts that read the output of svn blame, it's useful to be able to use them with the output of git-svn. The git-compatible format is still available using the new "--git-format" option. This also fixes a bug in the initial git-svn blame implementation; it was bombing out on uncommitted local changes. Signed-off-by: Steven Grimm <koreth@midwinter.com> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-11mergetool: Make ECMerge use the settings as specified by the user in the GUILibravatar Sebastian Schuberth1-2/+2
When run from the command line, ECMerge does not automatically use the same settings for a merge / diff that it would use when starting the GUI and loading files manually. In the first case the built-in factory defaults would be used, while in the second case the settings the user has specified in the GUI would be used, which can be misleading. Specifying the "--default" command line option changes this behavior so that always the user specfified GUI settings are used. Signed-off-by: Sebastian Schuberth <sschuberth@visageimaging.com> Tested-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-11git-format-patch: add --no-binary to omit binary changes in the patch.Libravatar Caio Marcelo de Oliveira Filho2-1/+10
Add a new option --no-binary to git-format-patch so that no binary changes are included in the generated patches, only notices that those files changed. This generate patches that cannot be applied, but still is useful for generating mails for code review purposes. See also: commit e47f306d4bf964def1a0b29e8f7cea419471dffd, where --binary option was turned on by default. Signed-off-by: Caio Marcelo de Oliveira Filho <cmarcelo@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-11wt-status.h: declare global variables as externLibravatar Johannes Sixt1-2/+2
There are linkers out there that complain if a global non-static variable is defined multiple times. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-11builtin-commit.c: add -u as short name for --untracked-filesLibravatar Sitaram Chamarty1-1/+1
This makes the C code consistent with the documentation and the old shell code. Signed-off-by: Sitaram Chamarty <sitaramc@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-11git-repack: re-enable parsing of -n command line optionLibravatar A Large Angry SCM1-0/+1
In commit 5715d0b (Migrate git-repack.sh to use git-rev-parse --parseopt, 2007-11-04), parsing of the '-n' command line option was accidentally lost when git-repack.sh was migrated to use git-rev-parse --parseopt. This adds it back. Signed-off-by: A Large Angry SCM <gitzilla@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-11Allow tracking branches to set up rebase by default.Libravatar Dustin Sallings6-1/+294
Change cd67e4d4 introduced a new configuration parameter that told pull to automatically perform a rebase instead of a merge. This change provides a configuration option to enable this feature automatically when creating a new branch. If the variable branch.autosetuprebase applies for a branch that's being created, that branch will have branch.<name>.rebase set to true. Signed-off-by: Dustin Sallings <dustin@spy.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-11git-svn: fix cloning of HTTP URLs with '+' in their pathLibravatar Eric Wong3-4/+42
With this, git svn clone -s http://svn.gnome.org/svn/gtk+ is successful. Also modified the funky rename test for this, which _does_ include escaped '+' signs for HTTP URLs. SVN seems to accept either "+" or "%2B" in filenames and directories (just not the main URL), so I'll leave it alone for now. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-11alloc_ref_from_str(): factor out a common pattern of alloc_ref from stringLibravatar Krzysztof Kowalczyk6-27/+19
Also fix an underallocation in walker.c::interpret_target(). Signed-off-by: Krzysztof Kowalczyk <kkowalczyk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-11gitk: Show current row number and total number of rowsLibravatar Paul Mackerras1-39/+28
This adds a couple of fields in the bar just below the upper panes that show the row number of the currently selected commit, and how many rows are displayed in total. The latter increments as commits are read in, and thus functions to show that progress is being made. This therefore also removes the code that showed progress using a green oscillating bar in the progress bar window (which some people disliked). Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-05-10Optimize symlink/directory detectionLibravatar Linus Torvalds5-47/+61
This is the base for making symlink detection in the middle fo a pathname saner and (much) more efficient. Under various loads, we want to verify that the full path leading up to a filename is a real directory tree, and that when we successfully do an 'lstat()' on a filename, we don't get a false positive due to a symlink in the middle of the path that git should have seen as a symlink, not as a normal path component. The 'has_symlink_leading_path()' function already did this, and cached a single level of symlink information, but didn't cache the _lack_ of a symlink, so the normal behaviour was actually the wrong way around, and we ended up doing an 'lstat()' on each path component to check that it was a real directory. This caches the last detected full directory and symlink entries, and speeds up especially deep directory structures a lot by avoiding to lstat() all the directories leading up to each entry in the index. [ This can - and should - probably be extended upon so that we eventually never do a bare 'lstat()' on any path entries at *all* when checking the index, but always check the full path carefully. Right now we do not generally check the whole path for all our normal quick index revalidation. We should also make sure that we're careful about all the invalidation, ie when we remove a link and replace it by a directory we should invalidate the symlink cache if it matches (and vice versa for the directory cache). But regardless, the basic function needs to be sane to do that. The old 'has_symlink_leading_path()' was not capable enough - or indeed the code readable enough - to really do that sanely. So I'm pushing this as not just an optimization, but as a base for further work. ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-10Avoid some unnecessary lstat() callsLibravatar Linus Torvalds3-14/+23
The commit sequence used to do if (file_exists(p->path)) add_file_to_cache(p->path, 0); where both "file_exists()" and "add_file_to_cache()" needed to do a lstat() on the path to do their work. This cuts down 'lstat()' calls for the partial commit case by two for each path we know about (because we do this twice per path). Just move the lstat() to the caller instead (that's all that "file_exists()" really does), and pass the stat information down to the add_to_cache() function. This essentially makes 'add_to_index()' the core function that adds a path to the index, getting the index pointer, the pathname and the stat information as arguments. There are then shorthand helper functions that use this core function: - 'add_to_cache()' is just 'add_to_index()' with the default index - 'add_file_to_cache/index()' is the same, but does the lstat() call itself, so you can pass just the pathname if you don't already have the stat information available. So old users of the 'add_file_to_xyzzy()' are essentially left unchanged, and this just exposes the more generic helper function that can take existing stat information into account. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-10Merge branch 'py/diff-submodule'Libravatar Junio C Hamano4-8/+73
* py/diff-submodule: is_racy_timestamp(): do not check timestamp for gitlinks diff-lib.c: rename check_work_tree_entity() diff: a submodule not checked out is not modified Add t7506 to test submodule related functions for git-status t4027: test diff for submodule with empty directory
2008-05-10Merge branch 'lt/case-insensitive'Libravatar Junio C Hamano10-105/+241
* lt/case-insensitive: Make git-add behave more sensibly in a case-insensitive environment When adding files to the index, add support for case-independent matches Make unpack-tree update removed files before any updated files Make branch merging aware of underlying case-insensitive filsystems Add 'core.ignorecase' option Make hash_name_lookup able to do case-independent lookups Make "index_name_exists()" return the cache_entry it found Move name hashing functions into a file of its own Make unpack_trees_options bit flags actual bitfields
2008-05-11Merge branch 'master' into devLibravatar Paul Mackerras6-197/+3203
2008-05-11gitk: Allow users to view diffs in external diff viewerLibravatar Thomas Arcila1-2/+145
This allows gitk to run an external diff viewer such as meld. Right-click on a file in the file list view gives "External diff" popup menu entry, which launches the selected external diff tool. The menu entry is only active in "Patch" mode, not in "Tree" mode. The program to run to display the diff is configurable through Edit/Preference/External diff tool. The program is run with two arguments, being the names of files containing the two versions to diff. Gitk will create temporary directories called .gitk-tmp.<pid>/<n> to place these files in, and remove them when it's finished. If the file doesn't exist in one or other revision, gitk will supply /dev/null as the name of the file on that side of the diff. This may need to be adjusted for Windows or MacOS. [paulus@samba.org - cleaned up and rewrote some parts of the patch.] Signed-off-by: Thomas Arcila <thomas.arcila@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>