summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-12-08Revert recent "git merge <msg> HEAD <commit>..." deprecationJunio C Hamano
This reverts commit c0ecb07048ce2123589a2f077d296e8cf29a9570 "git-pull.sh: Fix call to git-merge for new command format" and commit b81e00a965c62ca72a4b9db425ee173de147808d "git-merge: a deprecation notice of the ancient command line syntax". They caused a "git pull" (without any arguments, and without any local commits---only to update to the other side) to warn that commit log message is ignored because the merge resulted in a fast-forward. Another possible solution is to add an extra option to "git merge" so that "git pull" can tell it that the message given is not coming from the end user (the canned message is passed just in case the merge resulted in a non-ff and caused commit), but I think it is easier _not_ to deprecate the old syntax. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-08add-interactive: fix deletion of non-empty filesJeff King
Commit 24ab81a fixed the deletion of empty files, but broke deletion of non-empty files. The approach it took was to factor out the "deleted" line from the patch header into its own hunk, the same way we do for mode changes. However, unlike mode changes, we only showed the special "delete this file" hunk if there were no other hunks. Otherwise, the user would annoyingly be presented with _two_ hunks: one for deleting the file and one for deleting the content. This meant that in the non-empty case, we forgot about the deleted line entirely, and we submitted a bogus patch to git-apply (with "/dev/null" as the destination file, but not marked as a deletion). Instead, this patch combines the file deletion hunk and the content deletion hunk (if there is one) into a single deletion hunk which is either staged or not. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-08git svn: log removals of empty directoriesEric Wong
This also adds a test case for: "git svn: Don't create empty directories whose parents were deleted" which was the reason we found this bug in the first place. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-12-08git svn: Don't create empty directories whose parents were deletedGreg Price
Commit 6111b93 "git svn: attempt to create empty dirs on clone+rebase" will create empty directories 'a/b' and 'a/c' if they were previously created in SVN, even if their parent directory 'a' was deleted. For example, unhandled.log may contain lines like this: r32 +empty_dir: packages/sipb-xen-remctl-auto/sipb-xen-remctl-auto/files/etc/remctl/sipb-xen-auto/acl +empty_dir: packages/sipb-xen-remctl-auto/sipb-xen-remctl-auto/files/etc/remctl/sipb-xen-auto/machine.d +empty_dir: packages/sipb-xen-remctl-auto/sipb-xen-remctl-auto/files/etc/remctl/sipb-xen-auto/moira-acl [...] r314 -empty_dir: packages/sipb-xen-remctl-auto [ew: rewrote to be line-wrapped at <= 80-columns] Reported-by: Evan Broder <broder@mit.edu> Signed-off-by: Greg Price <price@ksplice.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-12-08git-svn: sort svk merge tickets to account for minimal parentsAlex Vandiver
When merging branches based on svk:merge properties, a single merge can have updated or added multiple svk:merge lines. Attempt to include the minimal set of parents by sorting the merge properties in order of revision, highest to lowest. Signed-off-by: Alex Vandiver <alex@chmrr.net> Acked-by: Sam Vilain <sam@vilain.net> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-12-07git-gui: suppress RenderBadPicture X error caused by Tk bugJindrich Makovicka
Due to a bug in Tk, git-gui almost always (unless git-gui is closed right after starting) produces an X window error message on exit, something like: X Error of failed request: RenderBadPicture (invalid Picture parameter) Major opcode of failed request: 150 (RENDER) Minor opcode of failed request: 7 (RenderFreePicture) Picture id in failed request: 0x3a000dc Serial number of failed request: 1965 Current serial number in output stream: 1980 Respective Tk bug report is here: http://sourceforge.net/tracker/?func=detail&atid=112997&aid=1821174&group_id=12997 This bug is triggered only when the send command is blocked via rename send {} . The following patch re-enables send just before quiting git-gui to suppress the error. Signed-off-by: Jindrich Makovicka <makovick@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-12-06bash: update 'git commit' completionSZEDER Gábor
I just wanted to add the recently learnt '--reset-author' option, but then noticed that there are many more options missing. This patch adds support for all of 'git commit's options, except '--allow-empty', because it is primarily there for foreign scm interfaces. Furthermore, this patch also adds support for completing the arguments of those options that take a non-filename argument: valid modes are offered for '--cleanup' and '--untracked-files', while refs for '--reuse-message' and '--reedit-message', because these two take a commit as argument. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-05git-gui: Increase blame viewer usability on MacOS.Alexander Gavrilov
On MacOS raising a window causes the focus to be transferred to it -- although it may actually be a bug in the Tcl/Tk port. When this happens with the blame viewer tooltips, it makes the interface less usable, because Entry and Leave handlers on the text view cause the tip to disappear once the mouse is moved even 1 pixel. This commit makes the code raise the main window on MacOS when Tk 8.5 is used. This version seems to properly support wm transient by making the tip stay on top of the master, so reraising the master does not cause it to disappear. Thus the only remaining sign of problems is slight UI flicker when focus is momentarily transferred to the tip and back. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-12-05git-gui: search 4 directories to improve statistic of gc hintClemens Buchacher
On Windows, git-gui suggests running the garbage collector if it finds 1 or more files in .git/objects/42 (as opposed to 8 files on other platforms). The probability of that happening if the repo contains about 100 loose objects is 32%. The probability for the same to happen when searching 4 directories is only 8%, which is bit more reasonable. Also remove $objects_limit from the message, because we already know that we are above (or close to) that limit. Telling the user about that number does not really give him any useful information. The following octave script shows the probability for at least m*q objects to be found in q subdirectories of .git/objects if n is the total number of objects. q = 4; m = [1 2 8]; n = 0:10:2000; P = zeros(length(n), length(m)); for k = 1:length(n) P(k, :) = 1-binocdf(q*m-1, n(k), q/(256-q)); end plot(n, P); n \ q 1 4 50 18% 1% 100 32% 8% 200 54% 39% 500 86% 96% Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-12-05git gui: make current branch default in "remote delete branch" merge checkHeiko Voigt
We already do the same when locally deleting a branch. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-12-05Sync with 1.6.5.5Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-05Git 1.6.5.5v1.6.5.5Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-05Fix diff -B/--dirstat miscounting of newly added contentsLinus Torvalds
What used to happen is that diffcore_count_changes() simply ignored any hashes in the destination that didn't match hashes in the source. EXCEPT if the source hash didn't exist at all, in which case it would count _one_ destination hash that happened to have the "next" hash value. As a consequence, newly added material was often undercounted, making output from --dirstat and "complete rewrite" detection used by -B unrelialble. This changes it so that: - whenever it bypasses a destination hash (because it doesn't match a source), it counts the bytes associated with that as "literal added" - at the end (once we have used up all the source hashes), we do the same thing with the remaining destination hashes. - when hashes do match, and we use the difference in counts as a value, we also use up that destination hash entry (the 'd++'). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-05reset: improve worktree safety valvesJeff King
The existing code checked to make sure we were not in a bare repository when doing a hard reset. However, we should take this one step further, and make sure we are in a worktree. Otherwise, we can end up munging files inside of '.git'. Furthermore, we should do the same check for --merge resets, which have the same properties. Actually, a merge reset of HEAD^ would already complain, since further down in the code we want a worktree. However, it is nicer to check up-front; then we are sure we cover all cases ("git reset --merge" would run, even though it wasn't doing anything) and we can give a more specific message. Add tests to t7103 to cover these cases and some missing ones. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-05Documentation: Avoid use of xmlto --stringparamTodd Zullinger
The --stringparam option is not available on older xmlto versions. Instead, set man.base.url.for.relative.links via a .xsl file. Older docbook versions will ignore this without causing grief to users of older xmlto versions. Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-04archive: clarify description of path parameterRené Scharfe
Mention that path parameters are based on the current working directory. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> -- Documentation/git-archive.txt | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-04rerere: don't segfault on failure to open rr-cacheJeff King
The rr-cache directory should always exist if we are doing garbage collection (earlier code paths check this explicitly), but we may not necessarily succeed in opening it (for example, due to permissions problems). In that case, we should print an error message rather than simply segfaulting. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03Merge branch 'maint'Junio C Hamano
* maint: Prepare for 1.6.5.5 Documentation: xmlto 0.0.18 does not know --stringparam t4201: use ISO8859-1 rather than ISO-8859-1
2009-12-03Prepare for 1.6.5.5Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03Merge branch 'uk/maint-shortlog-encoding' into maintJunio C Hamano
* uk/maint-shortlog-encoding: t4201: use ISO8859-1 rather than ISO-8859-1 shortlog: respect commit encoding
2009-12-03Merge branch 'fc/maint-format-patch-pathspec-dashes' into maintJunio C Hamano
* fc/maint-format-patch-pathspec-dashes: format-patch: add test for parsing of "--" format-patch: fix parsing of "--" on the command line
2009-12-03Merge branch 'ap/maint-merge-strategy-list-fix' into maintJunio C Hamano
* ap/maint-merge-strategy-list-fix: builtin-merge.c: call exclude_cmds() correctly.
2009-12-03Merge branch 'jc/maint-am-keep' into maintJunio C Hamano
* jc/maint-am-keep: Remove dead code from "git am"
2009-12-03Merge branch 'rs/work-around-grep-opt-insanity' into maintJunio C Hamano
* rs/work-around-grep-opt-insanity: Protect scripted Porcelains from GREP_OPTIONS insanity mergetool--lib: simplify guess_merge_tool()
2009-12-03Merge branch 'rj/maint-cygwin-count-objects' into maintJunio C Hamano
* rj/maint-cygwin-count-objects: git-count-objects: Fix a disk-space under-estimate on Cygwin
2009-12-03Merge branch 'mm/maint-hint-failed-merge' into maintJunio C Hamano
* mm/maint-hint-failed-merge: user-manual: Document that "git merge" doesn't like uncommited changes. merge-recursive: point the user to commit when file would be overwritten.
2009-12-03Merge branch 'th/maint-remote-update-help-string' into maintJunio C Hamano
* th/maint-remote-update-help-string: Update 'git remote update' usage string to match man page.
2009-12-03Merge branch 'rj/maint-t9700' into maintJunio C Hamano
* rj/maint-t9700: t9700-perl-git.sh: Fix a test failure on Cygwin
2009-12-03Merge branch 'ls/maint-mailinfo-no-inbody' into maintJunio C Hamano
* ls/maint-mailinfo-no-inbody: git am/mailinfo: Don't look at in-body headers when rebasing
2009-12-03Merge branch 'mo/maint-crlf-doc' into maintJunio C Hamano
* mo/maint-crlf-doc: core.autocrlf documentation: mention the crlf attribute
2009-12-03Merge branch 'th/remote-usage' into maintJunio C Hamano
* th/remote-usage: git remote: Separate usage strings for subcommands
2009-12-03Merge branch 'pb/maint-use-custom-perl' into maintJunio C Hamano
* pb/maint-use-custom-perl: Make sure $PERL_PATH is defined when the test suite is run.
2009-12-03Merge branch 'mm/config-pathname-tilde-expand' into maintJunio C Hamano
* mm/config-pathname-tilde-expand: Documentation: avoid xmlto input error expand_user_path: expand ~ to $HOME, not to the actual homedir. Expand ~ and ~user in core.excludesfile, commit.template
2009-12-03Merge branch 'bc/grep-i-F' into maintJunio C Hamano
* bc/grep-i-F: grep: Allow case insensitive search of fixed-strings
2009-12-03Merge branch 'jk/maint-break-rename-reduce-memory' into maintJunio C Hamano
* jk/maint-break-rename-reduce-memory: diffcore-rename: reduce memory footprint by freeing blob data early diffcore-break: save cnt_data for other phases diffcore-break: free filespec data as we go
2009-12-03Merge branch 'rj/maint-simplify-cygwin-makefile' into maintJunio C Hamano
* rj/maint-simplify-cygwin-makefile: Makefile: merge two Cygwin configuration sections into one
2009-12-03Merge branch 'rg/doc-workflow' into maintJunio C Hamano
* rg/doc-workflow: Add branch management for releases to gitworkflows
2009-12-03Merge branch 'np/maint-sideband-favor-status' into maintJunio C Hamano
* np/maint-sideband-favor-status: give priority to progress messages
2009-12-03gitweb: Describe (possible) gitweb.js minification in gitweb/READMEJakub Narebski
Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03Documentation: xmlto 0.0.18 does not know --stringparamJunio C Hamano
Newer DocBook stylesheets want man.base.url.for.relative.links parameter set when formatting manpages with external references to turn them into full URLs, and leave a helpful "you should set this parameter" message in the output. Earlier we added the MAN_BASE_URL make variable to specify the value for it. When MAN_BASE_URL is not given, it ought to be safe to set the parameter to empty; it would result in an empty leading path for older stylesheets that ignore the parameter, and newer ones would produce the same "relative URL" without the message. Unfortunately, older xmlto (at least version 0.0.18 released in early 2004 that comes with RHEL/CentOS 5) does not understand the --stringparam command line option, so we cannot add the parameter definition unconditionally to the command line. Work it around by passing the parameter only when set. If you do not have a suitable URL prefix, you can pass a quoted empty string to it, like so: $ make MAN_BASE_URL='""' Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03Fix crasher on encountering SHA1-like non-note in notes treeJohan Herland
When loading a notes tree, the code primarily looks for SHA1-like paths whose total length (discounting directory separators) are 40 chars (interpreted as valid note entries) or less (interpreted as subtree entries that may in turn contain note entries when unpacked). However, there is an additional condition that must hold for valid subtree entries: They must be _tree_ objects (duh). This patch adds an appropriate test for this condition, thereby fixing the crash that occured when passing a non-tree object to the tree-walk API. The patch also adds another selftest verifying correct behaviour of non-notes in note trees. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'Brandon Casey
The '--no-chain-reply-to' option is a Getopt::Long boolean option. The '--no-' prefix (as in --no-chain-reply-to) for boolean options is not supported in Getopt::Long version 2.32 which was released with Perl 5.8.0. This version only supports '--no' as in '--nochain-reply-to'. More recent versions of Getopt::Long, such as version 2.34, support either prefix. So use the older form in the tests. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03t4201: use ISO8859-1 rather than ISO-8859-1Brandon Casey
Some ancient platforms do not have an extensive list of alternate names for character encodings. For example, Solaris 7 and IRIX 6.5 do not know that ISO-8859-1 is the same as ISO8859-1. Modern platforms do know this, so use the older name. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03pull: clarify advice for the unconfigured error caseJan Krüger
When pull --rebase fails because it cannot find what branch to merge against, the error message implies we are trying to merge. Say "rebase against" instead of "merge with" to avoid confusion. The configuration suggested to remedy the situation uses a confusing syntax, with variables specified in the dotted form accepted by 'git config' but separated from their values by the '=' delimiter used by config files. Since the user will have to edit this output anyway, it is more helpful to provide a config file snippet to paste into an editor and modify. Signed-off-by: Jan Krüger <jk@jk.gs> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03Merge in 1.6.5.4Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03Git 1.6.5.4v1.6.5.4Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03Unconditionally set man.base.url.for.relative.linksJunio C Hamano
Even setting it to empty is better than leaving it unset as it prevents the warning cruft from appearing in the output. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03Merge branch 'maint'Junio C Hamano
2009-12-03Documentation/Makefile: allow man.base.url.for.relative.link to be set from MakeJunio C Hamano
Signed-off-by: Junio C Hamano <junio@kernel.org>
2009-12-02Git 1.6.6-rc1v1.6.6-rc1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>