summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-09-08t/t91XX-svn: start removing use of "git-" from these testsNanako Shiraishi
Subversion tests use too many "git-foo" form, so I am converting them in two steps. This first step replaces literal strings "remotes/git-svn" and "git-svn-id" by introducing $remotes_git_svn and $git_svn_id constants defined as shell variables. This will reduce the number of false hits from "git grep". Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-08Merge git://git.bogomips.org/git-svnJunio C Hamano
* git://git.bogomips.org/git-svn: git-svn: fix handling of even funkier branch names
2008-09-08Merge branch 'ar/autospell'Junio C Hamano
* ar/autospell: Add help.autocorrect to enable/disable autocorrecting git wrapper: DWIM mistyped commands
2008-09-08Merge branch 'jc/cc-ld-dynpath'Junio C Hamano
* jc/cc-ld-dynpath: configure: auto detect dynamic library path switches Makefile: Allow CC_LD_DYNPATH to be overriden Conflicts: Makefile config.mak.in
2008-09-08Merge branch 'jc/hide-cr-in-diff-from-less'Junio C Hamano
* jc/hide-cr-in-diff-from-less: diff: Help "less" hide ^M from the output
2008-09-08Merge branch 'jc/maint-checkout-fix'Junio C Hamano
* jc/maint-checkout-fix: checkout: do not check out unmerged higher stages randomly Conflicts: t/t7201-co.sh
2008-09-07Teach "git diff -p" to locate PHP class methodsAndreas Ericsson
Otherwise it will always print the class-name rather than the name of the function inside that class. While we're at it, reorder the gitattributes manpage to list the built-in funcname pattern names in alphabetical order. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-07git-svn: fix handling of even funkier branch namesEric Wong
Apparently do_switch() tolerates the lack of escaping in less funky branch names. For the really strange and scary ones, we need to escape them properly. It strangely maintains compatible with the existing handling of branch names with spaces and exclamation marks. Reported-by: m.skoric@web.de ($gmane/94677) Signed-off-by: Eric Wong <normalperson@yhbt.net>
2008-09-07Update draft release notes for 1.6.1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-07Merge git://git.bogomips.org/git-svnJunio C Hamano
* git://git.bogomips.org/git-svn: git-svn: set auto_props when renaming files t9124: clean up chdir usage git-svn: fix 'info' tests for unknown items git-svn: match SVN 1.5 behaviour of info' on unknown item git svn info: always quote URLs in 'info' output git svn info: make info relative to the current directory git svn info: tests: fix ptouch argument order in setup git svn info: tests: use test_cmp instead of git-diff git svn info: tests: do not use set -e git svn info: tests: let 'init' test run with SVN 1.5 git svn: catch lack of upstream info for dcommit earlier git-svn: check error code of send_txstream git-svn: Send deltas during commits git-svn: Introduce SVN::Git::Editor::_chg_file_get_blob git-svn: extract base blob in generate_diff
2008-09-07git-svn: set auto_props when renaming filesPaul Talacko
Patch-by: Paul Talacko <gnuruandstuff@yahoo.co.uk>: <http://article.gmane.org/gmane.comp.version-control.git/95006> > Hello, > > There's an issue in git-svn as autoprops are not applied to > renamed files, only to added files. > > This patch fixes the bug. [ew: added test case] Signed-off-by: Eric Wong <normalperson@yhbt.net>
2008-09-07t9124: clean up chdir usageEric Wong
Spawn subshells when running things in subdirectories instead of chdir-ing to the path of an undefined variable, which is confusing. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2008-09-07Merge updated git-gui and gitk that call each otherJunio C Hamano
Merge git://repo.or.cz/git-gui and git://git.kernel.org/pub/scm/gitk/gitk * git://repo.or.cz/git-gui: git-gui: Show special diffs for complex conflict cases. git-gui: Make F5 reselect a diff, if an untracked file is selected. git-gui: Reimplement and enhance auto-selection of diffs. git-gui: Support conflict states _U & UT. git-gui: Support more merge tools. git-gui: Don't allow staging files with conflicts. git-gui: Support calling merge tools. git-gui: Support resolving conflicts via the diff context menu. git-gui: Mark forgotten strings for translation. git-gui: Allow specifying an initial line for git gui blame. git-gui: Better positioning in Blame Parent Commit git-gui: Support passing blame to a parent commit. git-gui: Support starting gitk from Gui Blame git-gui: Teach git gui about file type changes * git://git.kernel.org/pub/scm/gitk/gitk: gitk: Add menu item for calling git gui blame gitk: Add option to specify the default commit on command line
2008-09-06Merge branch 'maint'Junio C Hamano
* maint: Update draft release notes for 1.6.0.2 stash: refresh the index before deciding if the work tree is dirty Mention the fact that 'git annotate' is only for backward compatibility. "blame -c" should be compatible with "annotate" git-gui: Fix diff parsing for lines starting with "--" or "++" git-gui: Fix string escaping in po2msg.sh git gui: show diffs with a minimum of 1 context line git-gui: update all remaining translations to French. git-gui: Update french translation
2008-09-06Update draft release notes for 1.6.0.2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-06stash: refresh the index before deciding if the work tree is dirtyJunio C Hamano
Unlike the case where the user does have a real change in the work tree, refusing to work because of unclean stat information is not very helpful. Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Nanako Shiraishi <nanako3@lavabit.com>
2008-09-06Merge branch 'maint' of git://repo.or.cz/git-gui into maintJunio C Hamano
* 'maint' of git://repo.or.cz/git-gui: git-gui: Fix diff parsing for lines starting with "--" or "++" git-gui: Fix string escaping in po2msg.sh git gui: show diffs with a minimum of 1 context line git-gui: update all remaining translations to French. git-gui: Update french translation
2008-09-05git-svn: fix 'info' tests for unknown itemsThomas Rast
The previous tests all expected the results from SVN and Git to be identical, and expected both to return success. This cannot be guaranteed: SVN changed the message style between 1.4 and 1.5, and in 1.5, sets a failure exit code. Change the tests to verify that 'git svn info <item>' sets a failure exit code, and that its output contains the file name. This should hopefully catch all other errors. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Eric Wong <normalperson@yhbt.net>
2008-09-05git-svn: match SVN 1.5 behaviour of info' on unknown itemThomas Rast
Previously 'git svn info unknown-file' only announced its failure (in the SVN 1.4 style, "not a versioned resource"), and exited successfully. It is desirable to actually exit with failure, so change the code to exit(1) under this condition. Since that is already halfway SVN 1.5 compatibility, also change the error output to match 1.5. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Eric Wong <normalperson@yhbt.net>
2008-09-05git svn info: always quote URLs in 'info' outputThomas Rast
Changes 'git svn info' to always URL-escape the 'URL' and 'Repository' fields and --url output, like SVN (at least 1.5) does. Note that reusing the escape_url() further down in Git::SVN::Ra is not possible because it only triggers for http(s) URLs. I did not know whether extending it to all schemes would break SVN access anywhere, so I made a new one that quotes in all schemes. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Eric Wong <normalperson@yhbt.net>
2008-09-05git svn info: make info relative to the current directoryThomas Rast
Previously 'git svn info <path>' would always treat the <path> as relative to the working directory root, with a default of ".". This does not match the behaviour of 'svn info'. Prepend $(git rev-parse --show-prefix) to the path used inside cmd_info to make it relative to the current working directory. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Eric Wong <normalperson@yhbt.net>
2008-09-05git svn info: tests: fix ptouch argument order in setupThomas Rast
The arguments must be <gitwc-path> <svnwc-path>, otherwise it fails to update the timestamps (without setting a failure exit code) and results in bad test output later on. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Eric Wong <normalperson@yhbt.net>
2008-09-05git svn info: tests: use test_cmp instead of git-diffThomas Rast
git-diff does not appear to return the correct exit values, and gives a false success for more than half (!) of the tests due to the space in "trash directory" which git-svn fails to encode. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Eric Wong <normalperson@yhbt.net>
2008-09-05git svn info: tests: do not use set -eThomas Rast
Exiting in the middle of a test confuses the test suite, which will just say "FATAL: Unexpected exit with code 1" in response to a failed test, instead of actually diagnosing failure and continuing with the next test. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Eric Wong <normalperson@yhbt.net>
2008-09-05git svn info: tests: let 'init' test run with SVN 1.5Thomas Rast
Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Eric Wong <normalperson@yhbt.net>
2008-09-05git svn: catch lack of upstream info for dcommit earlierThomas Rast
Since 711521e 'git svn dcommit' attempts to use the upstream information to determine the SVN URL, before it verifies that it even found an upstream. Move up the corresponding check. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Eric Wong <normalperson@yhbt.net>
2008-09-05git-svn: check error code of send_txstreamEric Wong
Not checking the error code of a function used to transform and send data makes me nervous. It currently returns "undef" on success; so die if we get any result other than "undef" because it's likely something went wrong somewhere. I really wish this function returned an MD5 like send_stream (or better yet, SHA1) for verification. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2008-09-05git-svn: Send deltas during commitsFlorian Weimer
Signed-off-by: Florian Weimer <fw@deneb.enyo.de> Acked-by: Eric Wong <normalperson@yhbt.net>
2008-09-05git-svn: Introduce SVN::Git::Editor::_chg_file_get_blobFlorian Weimer
Signed-off-by: Florian Weimer <fw@deneb.enyo.de> Acked-by: Eric Wong <normalperson@yhbt.net>
2008-09-05git-svn: extract base blob in generate_diffFlorian Weimer
We need the base blob to compute a delta to be sent to the server. Signed-off-by: Florian Weimer <fw@deneb.enyo.de> Acked-by: Eric Wong <normalperson@yhbt.net>
2008-09-05Mention the fact that 'git annotate' is only for backward compatibility.Junio C Hamano
When somebody is reading git-blame.txt (or git-annotate.txt) for the first time, the message we would like to send is: (1) Here is why you would want to use this command, what it can do (perhaps more than what you would have expected from "$scm blame"), and how you tell it to do what it does. This is obvious. (2) You might have heard of the command with the other name. There is no difference between the two, except they differ in their default output formats. This is essential to answer: "git has both? how are they different?" (3) We tend to encourage blame over annotate for new scripts and new people, but there is no reason to choose one over the other. This is not as important as (2), but would be useful to avoid repeated questions about "when will we start deprecating this?" As long as we describe (2) on git-annotate page clearly enough, people who read git-blame page first and get curious can refer to git-annotate page. While at it, subtly hint (3) without being overly explicit. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-05"blame -c" should be compatible with "annotate"Junio C Hamano
There is no reason to have a separate variable cmd_is_annotate; OUTPUT_ANNOTATE_COMPAT option is supposed to produce the compatibility output, and we should produce the same output even when the command was not invoked as "annotate" but as "blame -c". Noticed by Pasky. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-05Merge branch 'jc/maint-log-grep'Junio C Hamano
* jc/maint-log-grep: log --author/--committer: really match only with name part diff --cumulative is a sub-option of --dirstat bash completion: Hide more plumbing commands
2008-09-05log --author/--committer: really match only with name partJunio C Hamano
When we tried to find commits done by AUTHOR, the first implementation tried to pattern match a line with "^author .*AUTHOR", which later was enhanced to strip leading caret and look for "^author AUTHOR" when the search pattern was anchored at the left end (i.e. --author="^AUTHOR"). This had a few problems: * When looking for fixed strings (e.g. "git log -F --author=x --grep=y"), the regexp internally used "^author .*x" would never match anything; * To match at the end (e.g. "git log --author='google.com>$'"), the generated regexp has to also match the trailing timestamp part the commit header lines have. Also, in order to determine if the '$' at the end means "match at the end of the line" or just a literal dollar sign (probably backslash-quoted), we would need to parse the regexp ourselves. An earlier alternative tried to make sure that a line matches "^author " (to limit by field name) and the user supplied pattern at the same time. While it solved the -F problem by introducing a special override for matching the "^author ", it did not solve the trailing timestamp nor tail match problem. It also would have matched every commit if --author=author was asked for, not because the author's email part had this string, but because every commit header line that talks about the author begins with that field name, regardleses of who wrote it. Instead of piling more hacks on top of hacks, this rethinks the grep machinery that is used to look for strings in the commit header, and makes sure that (1) field name matches literally at the beginning of the line, followed by a SP, and (2) the user supplied pattern is matched against the remainder of the line, excluding the trailing timestamp data. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-05Merge branch 'maint'Shawn O. Pearce
* maint: git-gui: Fix diff parsing for lines starting with "--" or "++"
2008-09-05git-gui: Fix diff parsing for lines starting with "--" or "++"Shawn O. Pearce
Languages like Lua and SQL use "--" to mark a line as commented out. If this appears at column 0 and is part of the pre-image we may see "--- foo" in the diff, indicating that the line whose content is "-- foo" has been removed from the new version. git-gui was incorrectly parsing "--- foo" as the old file name in the file header, causing it to generate a bad patch file when the user tried to stage or unstage a hunk or the selected line. We need to keep track of where we are in the parsing so that we do not misread a deletion or addition record as part of the header. Reported-by: Alexander Gladysh <agladysh@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-09-05git-gui: Show special diffs for complex conflict cases.Alexander Gavrilov
Add special handling for displaying diffs of modified/deleted, and symlink/mode conflicts. Currently the display is completely unusable for deciding how to resolve the conflict. New display modes: 1) Deleted/Modified conflict: e.g. LOCAL: deleted REMOTE: [diff :1:$path :3:$path] 2) Conflict involving symlinks: LOCAL: [diff :1:$path :2:$path] REMOTE: [diff :1:$path :3:$path] In order to be able to display multiple diffs, this patch adds a queue of commands to call. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-09-05git-gui: Make F5 reselect a diff, if an untracked file is selected.Alexander Gavrilov
If an untracked file is selected, F5 and other manual rescan synonyms would try to select a tracked file instead. Also, clicking on an icon in the unstaged changes list skips over untracked files, unless the file clicked is untracked itself. The objective is to make it easier to ignore untracked files showing up in the Unstaged Changes list, and ensure that no modifications to tracked objects are left unstaged. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-09-05git-gui: Reimplement and enhance auto-selection of diffs.Alexander Gavrilov
Generalize the next_diff system, and implement auto-reselection for merge tool resolution and reshow_diff. Also add auto-selection of diffs after rescan, if no diff is already selected. New auto-select rules: - Rescan auto-selects the first conflicting file, or if none a modified tracked file, if nothing was selected previously. - Resolving a conflict auto-selects the nearest conflicting file, or nothing if everything is resolved. - Staging the last remaining hunk auto-selects the nearest modified staged file. - Staging a file through its icon auto-selects the nearest file. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-09-05git-gui: Support conflict states _U & UT.Alexander Gavrilov
Support _U (local deleted, remote modified) and UT (file type changed in conflict) modes. Note that 'file type changed' does not refer to changes in the executable bit, instead it denotes replacing a file with a link, or vice versa. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-09-05git-gui: Support more merge tools.Alexander Gavrilov
Add native support for Araxis Merge, WinMerge and Perforce merge. Custom merge tools are not implemented by mergetool.tcl; besides, native support allows constructing the command lines in a more intelligent way. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-09-05git-gui: Don't allow staging files with conflicts.Alexander Gavrilov
Prevent staging files with conflict markers by clicking on the icon in the 'Unstaged Changes' list. Instead, pretend that the user clicked the name, and show the diff. Originally it made some sense to allow staging conflicting files, because git-gui did not provide any tools to resolve them from within the GUI. But now that we have added mergetool capabilities, it is more likely to cause accidental and non-undoable errors. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-09-05git-gui: Support calling merge tools.Alexander Gavrilov
Adds an item to the diff context menu in conflict mode, which invokes a merge tool for the selected file. Tool command-line handling code was ported from git-mergetool. Automatic default tool selection and custom merge tools are not supported. If merge.tool is not set, git-gui defaults to meld. This implementation uses a checkout-index hack in order to retrieve all stages with autocrlf and filters properly applied. It requires temporarily moving the original conflict file out of the way. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-09-05git-gui: Support resolving conflicts via the diff context menu.Alexander Gavrilov
If the file has merge conflicts, show a special version of the diff context menu, which includes conflict resolution commands instead of Stage Hunk/Line. This patch only supports resolving by discarding all sides except one. Discarding is the only way to resolve conflicts involving symlinks and/or deletion, excluding manual editing. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-09-05git-gui: Mark forgotten strings for translation.Christian Stimming
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-09-04diff --cumulative is a sub-option of --dirstatJunio C Hamano
The option used to be implemented as if it is a totally independent one, but "git diff --cumulative" would not mean anything without "--dirstat". This makes --cumulative imply --dirstat. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-04bash completion: Hide more plumbing commandsPetr Baudis
git <tab><tab> still shows way too many commands, some of them are clearly plumbing. This patch hides the plumbing commands liberally (that is, in special cases, users still might want to call one of the hidden commands, a *normal* workflow should never involve these, though - and if it does, we have a UI problem anyway). Signed-off-by: Petr Baudis <pasky@suse.cz> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-03Update draft release notes for 1.6.1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-03Merge branch 'maint'Junio C Hamano
* maint: Start 1.6.0.2 maintenance cycle tests: use "git xyzzy" form (t7200 - t9001) tests: use "git xyzzy" form (t7000 - t7199) Fix passwd(5) ref and reflect that commit doens't use commit-tree improve handling of sideband message display tests: use "git xyzzy" form (t3600 - t6999) tests: use "git xyzzy" form (t0000 - t3599) checkout: fix message when leaving detached HEAD clone: fix creation of explicitly named target directory 'git foo' program identifies itself without dash in die() messages setup_git_directory(): fix move to worktree toplevel directory update-index: fix worktree setup Start conforming code to "git subcmd" style read-tree: setup worktree if merge is required grep: fix worktree setup diff*: fix worktree setup Conflicts: RelNotes t/t3900-i18n-commit.sh t/t7003-filter-branch.sh
2008-09-03Start 1.6.0.2 maintenance cycleJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>