summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-01-05t4030, t4031: work around bogus MSYS bash path conversionLibravatar Johannes Sixt2-2/+2
Recall that MSYS bash converts POSIX style absolute paths to Windows style absolute paths. Unfortunately, it converts a program argument that begins with a double-quote and otherwise looks like an absolute POSIX path, but in doing so, it strips everything past the second double-quote[*]. This case is triggered in the two test scripts. The work-around is to place the Windows style path returned by $(pwd) between the quotes to avoid the path conversion. [*] It is already bogus that a conversion is even considered when a program argument begins with a double-quote because it cannot be an absolute POSIX path. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-05diff: run external diff helper with shellLibravatar Jeff King1-1/+1
This is mostly to make it more consistent with the rest of git, which uses the shell to exec helpers. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-05textconv: use shell to run helperLibravatar Jeff King3-2/+3
Currently textconv helpers are run directly. Running through the shell is useful because the user can provide a program with command line arguments, like "antiword -f". It also makes textconv more consistent with other parts of git, most of which run their helpers using the shell. The downside is that textconv helpers with shell metacharacters (like space) in the filename will be broken. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-05editor: use run_command's shell featureLibravatar Jeff King1-19/+2
Now that run_command implements the same code in a more general form, we can make use of it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-05run-command: optimize out useless shell callsLibravatar Jeff King1-9/+11
If there are no metacharacters in the program to be run, we can just skip running the shell entirely and directly exec the program. The metacharacter test is pulled verbatim from launch_editor, which already implements this optimization. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-05run-command: convert simple callsites to use_shellLibravatar Jeff King4-12/+10
Now that we have the use_shell feature, these callsites can all be converted with small changes. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-05t0021: use $SHELL_PATH for the filter scriptLibravatar Johannes Sixt1-1/+2
On Windows, we need the shbang line to correctly invoke shell scripts via a POSIX shell, except when the script is invoked via 'sh -c' because sh (a bash) does "the right thing". But the clean and smudge filters will not always be invoked via 'sh -c'; to futureproof, we should mark the the one in t0021-conversion with #!$SHELL_PATH. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-01run-command: add "use shell" optionLibravatar Jeff King2-0/+49
Many callsites run "sh -c $CMD" to run $CMD. We can make it a little simpler for them by factoring out the munging of argv. For simple cases with no arguments, this doesn't help much, but: 1. For cases with arguments, we save the caller from having to build the appropriate shell snippet. 2. We can later optimize to avoid the shell when there are no metacharacters in the program. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-23Git 1.6.6Libravatar Junio C Hamano3-4/+6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-23git svn: add test for a git svn gc followed by a git svn mkdirsLibravatar Robert Zeh1-0/+40
git svn gc will compress the unhandled.log files that git svn mkdirs reads, causing git svn mkdirs to skip directory creation. [ew: trivial whitespace cleanups] Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Robert Zeh <robert.a.zeh@gmail.com>
2009-12-23git svn: branch/tag commands detect username in URLsLibravatar Eric Wong1-1/+2
svn+ssh:// repositories often have userinfo embedded in the URL which were stripped out of the "git-svn-id:" trailers. Since the SVN::Client::copy function takes userinfo into account when matching URLs for SVN repositories, we need to retrieve the full URL with embedded userinfo in it to avoid mismatched URLs. Tested-by: Florian Köberle <florian@fkoeberle.de> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-12-22Merge branch 'maint'Libravatar Junio C Hamano2-3/+23
* maint: Prevent git blame from segfaulting on a missing author name
2009-12-22git svn: lookup new parents correctly from svn:mergeinfoLibravatar Eric Wong1-1/+2
This appears to be a trivial case where array indices were being passed to git rev-list, instead of the contents stored in the array itself. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-12-22Prevent git blame from segfaulting on a missing author nameLibravatar David Reiss2-3/+23
The human-readable author and committer name can be missing from commits imported from foreign SCM interfaces. Make sure we parse the "author" and "committer" line a bit more leniently and avoid segfaulting by assuming the name always exists. Signed-off-by: David Reiss <dreiss@facebook.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-21git-svn: Remove obsolete MAXPARENT checkLibravatar Andrew Myrick1-6/+0
Change git-svn not to impose a limit of 16 parents on a merge. This limit in git-svn artificially prevents cloning svn repositories that contain commits with more than 16 merge parents. The limit was removed from builtin-commit-tree.c for git v1.6.0 in commit ef98c5cafb3e799b1568bb843fcd45920dc62f16, so there is no need to check for it it in git-svn. Signed-off-by: Andrew Myrick <amyrick@apple.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-12-21git-svn: detect cherry-picks correctly.Libravatar Sam Vilain2-25/+66
The old function was incorrect; in some instances it marks a cherry picked range as a merged branch (because of an incorrect assumption that 'rev-list COMMIT --not RANGE' would work). This is replaced with a function which should detect them correctly, memoized to limit the expense of dealing with branches with many cherry picks to one 'merge-base' call per merge, per branch which used cherry picking. Signed-off-by: Sam Vilain <sam@vilain.net> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-12-21git-svn: exclude already merged tips using one rev-list callLibravatar Sam Vilain1-4/+48
The old function would have to check all mentioned merge tips, every time that the mergeinfo ticket changed. This involved 1-2 rev-list operation for each listed mergeinfo line. If there are a lot of feature branches being merged into a trunk, this makes for a very expensive operation for detecting the new parents on every merge. This new version first uses a single 'rev-list' to figure out which commit ranges are already reachable from the parents. This is used to eliminate the already merged branches from the list. Signed-off-by: Sam Vilain <sam@vilain.net> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-12-21git-svn: fix some mistakes with interpreting SVN mergeinfo commit rangesLibravatar Sam Vilain2-10/+4
SVN's list of commit ranges in mergeinfo tickets is inclusive, whereas git commit ranges are exclusive on the left hand side. Also, the end points of the commit ranges may not exist; they simply delineate ranges of commits which may or may not exist. Fix these two mistakes. Signed-off-by: Sam Vilain <sam@vilain.net> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-12-21git-svn: memoize conversion of SVN merge ticket info to git commit rangesLibravatar Sam Vilain1-37/+54
Each time the svn mergeinfo ticket changes, we look it up in the rev_map; when there are a lot of merged branches, this will result in many repeated lookups of the same information for subsequent commits. Arrange the slow part of the function so that it may be memoized, and memoize it. The more expensive revision walking operation can be memoized separately. [ew: changed "next" to "return" for function exit] Signed-off-by: Sam Vilain <sam@vilain.net> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-12-21git-svn: expand the svn mergeinfo test suite, highlighting some failuresLibravatar Sam Vilain3-172/+860
As shown, git-svn has some problems; not all svn merges are correctly detected, and cherry picks may incorrectly be detected as real merges. These test cases will be marked as _success once the relevant fixes are in. Signed-off-by: Sam Vilain <sam@vilain.net> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-12-21update release notes for git svn in 1.6.6Libravatar Eric Wong1-0/+2
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-12-21git svn: fix --revision when fetching deleted pathsLibravatar Eric Wong1-1/+5
When using the -r/--revision argument to fetch deleted history, calling SVN::Ra::get_log() from an SVN::Ra object initialized to track the deleted URL will fail. This regression was introduced in: commit 4aacaeb3dc82bb6479e70e120053dc27a399460e "fix shallow clone when upstream revision is too new" We now ignore errors from SVN::Ra::get_log() here because using --revision will always override the value of $head here if (and only if) we're tracking deleted directories. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-12-20Git 1.6.6-rc4Libravatar Junio C Hamano2-8/+9
Hopefully the last rc before the final one. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-19Merge branch 'maint'Libravatar Junio C Hamano3-5/+57
* maint: rebase -i: abort cleanly if the editor fails to launch technical-docs: document hash API api-strbuf.txt: fix typos and document launch_editor()
2009-12-19rebase -i: abort cleanly if the editor fails to launchLibravatar Björn Gustavsson1-1/+1
If the user's configured editor is emacsclient, the editor will fail to launch if emacs is not running and the git command that tried to lanuch the editor will abort. For most commands, all you have to do is to start emacs and repeat the command. The "git rebase -i" command, however, aborts without cleaning the "$GIT_DIR/rebase-merge" directory if it fails to launch the editor, so you'll need to do "git rebase --abort" before repeating the rebase command. Change "git rebase -i" to terminate using "die_abort" (instead of with "die") if the initial launch of the editor fails. Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-19t9146: use 'svn_cmd' wrapperLibravatar Eric Wong1-1/+1
Using 'svn' directly may not work for all users. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-12-19git svn: make empty directory creation gc-awareLibravatar Eric Wong2-11/+58
The "git svn gc" command creates and appends to unhandled.log.gz files which should be parsed before the uncompressed unhandled.log files. Reported-by: Robert Zeh Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-12-17technical-docs: document hash APILibravatar Stephen Boyd1-2/+48
Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-17api-strbuf.txt: fix typos and document launch_editor()Libravatar Stephen Boyd1-2/+8
Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-16Git 1.6.6-rc3Libravatar Junio C Hamano2-7/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-16Merge branch 'maint' to sync with 1.6.5.7Libravatar Junio C Hamano10-8/+91
* maint: Git 1.6.5.7 worktree: don't segfault with an absolute pathspec without a work tree ignore unknown color configuration help.autocorrect: do not run a command if the command given is junk Illustrate "filter" attribute with an example
2009-12-16Git 1.6.5.7Libravatar Junio C Hamano4-3/+23
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-16worktree: don't segfault with an absolute pathspec without a work treeLibravatar Junio C Hamano2-2/+20
If a command is run with an absolute path as a pathspec inside a bare repository, e.g. "rev-list HEAD -- /home", the code tried to run strlen() on NULL, which is the result of get_git_work_tree(), and segfaulted. It should just fail instead. Currently the function returns NULL even inside .git/ in a repository with a work tree, but that is a separate issue. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-16ignore unknown color configurationLibravatar Jeff King4-3/+26
When parsing the config file, if there is a value that is syntactically correct but unused, we generally ignore it. This lets non-core porcelains store arbitrary information in the config file, and it means that configuration files can be shared between new and old versions of git (the old versions might simply ignore certain configuration). The one exception to this is color configuration; if we encounter a color.{diff,branch,status}.$slot variable, we die if it is not one of the recognized slots (presumably as a safety valve for user misconfiguration). This behavior has existed since 801235c (diff --color: use $GIT_DIR/config, 2006-06-24), but hasn't yet caused a problem. No porcelain has wanted to store extra colors, and we once a color area (like color.diff) has been introduced, we've never changed the set of color slots. However, that changed recently with the addition of color.diff.func. Now a user with color.diff.func in their config can no longer freely switch between v1.6.6 and older versions; the old versions will complain about the existence of the variable. This patch loosens the check to match the rest of git-config; unknown color slots are simply ignored. This doesn't fix this particular problem, as the older version (without this patch) is the problem, but it at least prevents it from happening again in the future. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-15help.autocorrect: do not run a command if the command given is junkLibravatar Johannes Sixt1-2/+5
If a given command is not found, then help.c tries to guess which one the user could have meant. If help.autocorrect is 0 or unset, then a list of suggestions is given as long as the dissimilarity between the given command and the candidates is not excessively high. But if help.autocorrect was non-zero (i.e., a delay after which the command is run automatically), the latter restriction on dissimilarity was not obeyed. In my case, this happened: $ git ..daab02 WARNING: You called a Git command named '..daab02', which does not exist. Continuing under the assumption that you meant 'read-tree' in 4.0 seconds automatically... The patch reuses the similarity limit that is also applied when the list of suggested commands is printed. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-14Illustrate "filter" attribute with an exampleLibravatar Nanako Shiraishi1-0/+19
The example was taken from aa4ed402c9721170fde2e9e43c3825562070e65e (Add 'filter' attribute and external filter driver definition). Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-12bash: Support new 'git fetch' optionsLibravatar Björn Gustavsson1-2/+12
Support the new options --all, --prune, and --dry-run for 'git fetch'. As the --multiple option was primarily introduced to enable 'git remote update' to be re-implemented in terms of 'git fetch' (16679e37) and is not likely to be used much from the command line, it does not seems worthwhile to complicate the code (to support completion of multiple remotes) to handle it. Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-10Update Release Notes for 1.6.6 to remove old bugfixesLibravatar Junio C Hamano1-16/+0
These three have already been backported to 1.6.5.5 Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-10Sync with 1.6.5.6Libravatar Junio C Hamano7-179/+37
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-10Git 1.6.5.6Libravatar Junio C Hamano4-3/+27
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-10Fix archive format with -- on the command lineLibravatar Junio C Hamano1-6/+10
Giving --format from the command line, or using output file extention to DWIM the output format, with a pathspec that is disambiguated with an explicit double-dash on the command line, e.g. git archive -o file --format=zip HEAD -- path git archive -o file.zip HEAD -- path didn't work correctly. This was because the code reordered (when one was given) or added (when the format was inferred) a --format argument at the end, effectively making it to "archive HEAD -- path --format=zip", i.e. an extra pathspec that is unlikely to match anything. The command line argument list should always be "options, revs and then paths", and we should set a good example by inserting the --format at the beginning instead. Reported-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-10Remove post-upload-hookLibravatar Junio C Hamano4-172/+2
This hook runs after "git fetch" in the repository the objects are fetched from as the user who fetched, and has security implications. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-09Git 1.6.6-rc2Libravatar Junio C Hamano2-4/+10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-09Merge git://repo.or.cz/git-guiLibravatar Junio C Hamano4-13/+37
* git://repo.or.cz/git-gui: git-gui: suppress RenderBadPicture X error caused by Tk bug git-gui: Increase blame viewer usability on MacOS. git-gui: search 4 directories to improve statistic of gc hint git gui: make current branch default in "remote delete branch" merge check
2009-12-09Merge git://git.kernel.org/pub/scm/gitk/gitkLibravatar Junio C Hamano2-274/+1816
* git://git.kernel.org/pub/scm/gitk/gitk: gitk: Fix selection of tags gitk: Default to the system colours on Windows gitk: Update Japanese translation gitk: Fix "git gui blame" invocation when called from top-level directory gitk: Disable checkout of remote branches gitk: Improve appearance of radiobuttons and checkbuttons gitk: Skip translation of "wrong Tcl version" message gitk: Add Japanese translation gitk: Use the --submodule option for displaying diffs when available gitk: Fix diffing committed -> staged (typo in diffcmd) gitk: Add configuration for UI colour scheme gitk: Don't compare fake children when comparing commits gitk: Show diff of commits at end of compare-commits output gitk: Add a user preference to enable/disable use of themed widgets gitk: Fix errors in the theme patch gitk: Use themed tk widgets gitk: Restore scrolling position of diff pane on back/forward in history
2009-12-09Update draft release notes to 1.6.6 before -rc2Libravatar Junio C Hamano1-21/+18
Reword the 1.7.0 warnings, and drop deprecation of "merge <msg> HEAD <commit>..." syntax. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-08Merge branch 'maint'Libravatar Junio C Hamano3-16/+58
* maint: add-interactive: fix deletion of non-empty files pull: clarify advice for the unconfigured error case
2009-12-08Merge branch 'mm/maint-merge-ff-error-message-fix' into maintLibravatar Junio C Hamano3-18/+27
* mm/maint-merge-ff-error-message-fix: builtin-merge: show user-friendly error messages for fast-forward too. merge-recursive: make the error-message generation an extern function Conflicts: merge-recursive.c
2009-12-08Merge branch 'jn/maint-pull-rebase-error-message' into maintLibravatar Junio C Hamano1-15/+33
* jn/maint-pull-rebase-error-message: pull: clarify advice for the unconfigured error case
2009-12-08Merge branch 'jk/maint-add-p-delete-fix' into maintLibravatar Junio C Hamano2-1/+25
* jk/maint-add-p-delete-fix: add-interactive: fix deletion of non-empty files