aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* run_command: report system call errors instead of returning error codesJohannes Sixt2009-07-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation for this change is that system call failures are serious errors that should be reported to the user, but only few callers took the burden to decode the error codes that the functions returned into error messages. If at all, then only an unspecific error message was given. A prominent example is this: $ git upload-pack . | : fatal: unable to run 'git-upload-pack' In this example, git-upload-pack, the external command invoked through the git wrapper, dies due to SIGPIPE, but the git wrapper does not bother to report the real cause. In fact, this very error message is copied to the syslog if git-daemon's client aborts the connection early. With this change, system call failures are reported immediately after the failure and only a generic failure code is returned to the caller. In the above example the error is now to the point: $ git upload-pack . | : error: git-upload-pack died of signal Note that there is no error report if the invoked program terminated with a non-zero exit code, because it is reasonable to expect that the invoked program has already reported an error. (But many run_command call sites nevertheless write a generic error message.) There was one special return code that was used to identify the case where run_command failed because the requested program could not be exec'd. This special case is now treated like a system call failure with errno set to ENOENT. No error is reported in this case, because the call site in git.c expects this as a normal result. Therefore, the callers that carefully decoded the return value still check for this condition. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* run_command: return exit code as positive valueJohannes Sixt2009-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | As a general guideline, functions in git's code return zero to indicate success and negative values to indicate failure. The run_command family of functions followed this guideline. But there are actually two different kinds of failure: - failures of system calls; - non-zero exit code of the program that was run. Usually, a non-zero exit code of the program is a failure and means a failure to the caller. Except that sometimes it does not. For example, the exit code of merge programs (e.g. external merge drivers) conveys information about how the merge failed, and not all exit calls are actually failures. Furthermore, the return value of run_command is sometimes used as exit code by the caller. This change arranges that the exit code of the program is returned as a positive value, which can now be regarded as the "result" of the function. System call failures continue to be reported as negative values. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* MinGW: simplify waitpid() emulation macrosJohannes Sixt2009-07-05
| | | | | | | | | | Windows does not have signals. At least they cannot be diagnosed by the parent process; all that the parent process can observe is the exit code. This also adds a dummy definition of WTERMSIG. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* MinGW: truncate exit()'s argument to lowest 8 bitsJohannes Sixt2009-07-05
| | | | | | | | | | | | | | For some reason, MinGW's bash cannot reliably detect failure of the child process if a negative value is passed to exit(). This fixes it by truncating the exit code in all calls of exit(). This issue was worked around in run_builtin() of git.c (2488df84 builtin run_command: do not exit with -1, 2007-11-15). This workaround is no longer necessary and is reverted. Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Remove filename from conflict markersMartin Renold2009-07-01
| | | | | | | | | | Put filenames into the conflict markers only when they are different. Otherwise they are redundant information clutter. Print the filename explicitely when warning about a binary conflict. Signed-off-by: Martin Renold <martinxyz@gmx.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'cc/bisect'Junio C Hamano2009-07-01
|\ | | | | | | | | | | * cc/bisect: Documentation: remove warning saying that "git bisect skip" may slow bisection bisect: use a PRNG with a bias when skipping away from untestable commits
| * Documentation: remove warning saying that "git bisect skip" may slow bisectionChristian Couder2009-06-13
| | | | | | | | | | | | | | | | | | This warning was probably useless anyway, but it is even more so now that filtering of skipped commits is done in C and that there is a mechanism to skip away from broken commits. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * bisect: use a PRNG with a bias when skipping away from untestable commitsChristian Couder2009-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using a PRNG (pseudo random number generator) with a bias should be better than alternating between 3 fixed ratios. In repositories with many untestable commits it should prevent alternating between areas where many commits are untestable. The bias should favor commits that can give more information, so that the bisection process should not loose much efficiency. HPA suggested to use a PRNG and found that the best bias is to raise a ratio between 0 and 1 given by the PRNG to the power 1.5. An integer square root function is implemented to avoid including <math.h> and linking with -lm. A PRNG function is implemented to get the same number sequence on different machines as suggested by "man 3 rand". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'js/daemon-log'Junio C Hamano2009-07-01
|\ \ | | | | | | | | | | | | | | | | | | * js/daemon-log: receive-pack: do not send error details to the client upload-pack: squelch progress indicator if client cannot see it daemon: send stderr of service programs to the syslog
| * | receive-pack: do not send error details to the clientJohannes Sixt2009-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the objects that a client pushes to the server cannot be processed for any reason, an error is reported back to the client via the git protocol. We used to send quite detailed information if a system call failed if unpack-objects is run. This can be regarded as an information leak. Now we do not send any error details like we already do in the case where index-pack failed. Errors in system calls as well as the exit code of unpack-objects and index-pack are now reported to stderr; in the case of a local push or via ssh these messages still go to the client, but that is OK since these forms of access to the server assume that the client can be trusted. If receive-pack is run from git-daemon, then the daemon should put the error messages into the syslog. With this reasoning a new status report is added for the post-update-hook; untrusted (i.e. daemon's) clients cannot observe its status anyway, others may want to know failure details. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | upload-pack: squelch progress indicator if client cannot see itJohannes Sixt2009-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | upload-pack runs pack-objects, which generates progress indicator output on its stderr. If the client requests a sideband, this indicator is sent to the client; but if it did not, then the progress is written to upload-pack's own stderr. If upload-pack is itself run from git-daemon (and if the client did not request a sideband) the progress indicator never reaches the client and it need not be generated in the first place. With this patch the progress indicator is suppressed in this situation. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | daemon: send stderr of service programs to the syslogJohannes Sixt2009-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If git-daemon is run with --detach or --inetd, then stderr is explicitly redirected to /dev/null. But notice that the service programs were spawned via execl_git_cmd(), in particular, the stderr channel is inherited from the daemon. This means that errors that the programs wrote to stderr (for example, via die()), went to /dev/null. This patch arranges that the daemon does not merely exec the service program, but forks it and monitors stderr of the child; it writes the errors that it produces to the daemons log via logerror(). A consequence is that the daemon process remains in memory for the full duration of the service program, but this cannot be avoided. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'cf/maint-remote-uploadpack-useconfig-fix'Junio C Hamano2009-07-01
|\ \ \ | | | | | | | | | | | | | | | | * cf/maint-remote-uploadpack-useconfig-fix: git-remote: fix missing .uploadpack usage for show command
| * | | git-remote: fix missing .uploadpack usage for show commandChris Frey2009-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For users pulling from machines with self compiled git installs, in non-PATH locations, they can set the config option remote.<name>.uploadpack to set the location of git-upload-pack. When using 'git remote show <name>', the remote HEAD check did not use the uploadpack configuration setting, and would not use the configured program. In builtin-remote.c, the config setting is already loaded with the call to remote_get(), so this patch passes that remote along to transport_get(). Signed-off-by: Chris Frey <cdfrey@foursquare.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'sb/quiet-porcelains'Junio C Hamano2009-07-01
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sb/quiet-porcelains: stash: teach quiet option am, rebase: teach quiet option submodule, repack: migrate to git-sh-setup's say() git-sh-setup: introduce say() for quiet options am: suppress apply errors when using 3-way t4150: test applying with a newline in subject
| * | | | stash: teach quiet optionStephen Boyd2009-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach stash pop, apply, save, and drop to be quiet when told. By using the quiet option (-q), these actions will be silent unless errors are encountered. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | am, rebase: teach quiet optionStephen Boyd2009-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git-am and git-rebase are talkative scripts. Teach them to be quiet when told, allowing them to speak only when they fail or experience errors. The quiet option is maintained when git-am or git-rebase fails to apply a patch. This means subsequent --resolved, --continue, --skip, --abort invocations will be quiet if the original invocation was quiet. Drop a handful of >&2 redirection; the rest of the program sends all the info messages to stdout, not to stderr. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | submodule, repack: migrate to git-sh-setup's say()Stephen Boyd2009-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that there is say() in git-sh-setup, these scripts don't need to use their own. Migrate them over by setting GIT_QUIET and removing their custom say() functions. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | git-sh-setup: introduce say() for quiet optionsStephen Boyd2009-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scripts should use say() when they want to output non-error messages. This function helps future script writers easily implement a quiet option by setting GIT_QUIET to enable suppression of non-error messages. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | am: suppress apply errors when using 3-wayStephen Boyd2009-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git-am with 3-way outputs errors when applying, even though the 3-way will usually be successful. We suppress these errors from git-apply because they are not "true" errors until the 3-way has been attempted. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | t4150: test applying with a newline in subjectStephen Boyd2009-06-18
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 4b7cc26 (git-am: use printf instead of echo on user-supplied strings, 2007-05-25) fixed a bug where subjects with newlines would cause git-am to echo multiple lines when it says "Applying: <subject>". This test ensures that fix stays valid. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'ne/maint-1.6.0-diff-tree-t-r-show-directory'Junio C Hamano2009-07-01
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * ne/maint-1.6.0-diff-tree-t-r-show-directory: diff-tree -r -t: include added/removed directories in the output
| * | | | diff-tree -r -t: include added/removed directories in the outputNick Edelen2009-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to include only the modified and typechanged directories in the ouptut, but for consistency's sake, we should also include added and removed ones as well. This makes the output more consistent, but it may break existing scripts that expect to see the current output which has long been the established behaviour. Signed-off-by: Nick Edelen <sirnot@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'maint'Junio C Hamano2009-07-01
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * maint: request-pull: really really disable pager
| * | | | | request-pull: really really disable pagerMichal Marek2009-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Earlier 476cc72 (request-pull: really disable pager, 2009-06-30) tried to use the correct environment variable to disable paging from multiple calls to "git log" and friends, but there was one extra call to "git log" that was not covered by the trick. Move the setting and exporting of GIT_PAGER much earlier in the script to cover everybody. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | log-tree: fix confusing commentJeff King2009-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This comment mentions the case where use_terminator is set, but this case is not handled at all by this chunk of code. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'maint'Junio C Hamano2009-06-30
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: attr: plug minor memory leak request-pull: really disable pager Makes some cleanup/review in gittutorial Makefile: git.o depends on library headers git-submodule documentation: fix foreach example
| * | | | | attr: plug minor memory leakRené Scharfe2009-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Free the memory allocated for struct strbuf pathbuf when we're done. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | request-pull: really disable pagerJunio C Hamano2009-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ff06c74 (Improve request-pull to handle non-rebased branches, 2007-05-01) attempted to disable pager when running subcommands in this script, but with a wrong variable. If GIT_PAGER is set, it takes precedence over PAGER. Noticed by Michal Marek. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | Makes some cleanup/review in gittutorialThadeu Lima de Souza Cascardo2009-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are some different but little cleanup changes to fix some missing quotes, to fix what seemed to be an unended sentence, to reident a little paragraph with too large a sentence and fix a branch name that was referred to twice later by another name. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | Makefile: git.o depends on library headersJohannes Sixt2009-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This dependency was not yet specified anywhere else. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | git-submodule documentation: fix foreach exampleMiklos Vajna2009-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backtick and apostrophe are asciidoc markup, so they should be escaped in order to get the expected result in the rendered manual page. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | git.c: avoid allocating one-too-many elements for new argv arrayBrandon Casey2009-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating a new argv array from a configured alias and the supplied command line arguments, the new argv was allocated with one element too many. Since the first element of the original argv array is skipped when copying it to the new_argv, the number of elements that are allocated should be reduced by one. 'count' is the number of elements that new_argv contains, and *argcp is the number of elements in the original argv array. So the total allocation (including the terminating NULL entry) for the new_argv array should be: count + (*argcp - 1) + 1 Also, the explicit assignment of the NULL terminating entry can be avoided by just copying it over from the original argv array. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | git-mv: fix directory separator treatment on WindowsJohannes Sixt2009-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following invocations did not work as expected on Windows: git mv foo\bar dest git mv foo\ dest The first command was interpreted as git mv foo/bar dest/foo/bar because the Windows style directory separator was not obeyed when the basename of 'foo\bar' was computed. The second command failed because the Windows style directory separator was not removed from the source directory, whereupon the lookup of the directory in the index failed. This fixes both issues by using is_dir_sep() and basename(). Signed-off-by: Johannes Sixt <j6t@kdbg.org> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | completion: add missing config variablesStephen Boyd2009-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update to include branch.*.rebase, remote.*.pushurl, and add.ignore-errors Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | git log: add '--merges' flag to match '--no-merges'Linus Torvalds2009-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I do various statistics on git, and one of the things I look at is merges, because they are often interesting events to count ("how many merges vs how much 'real development'" kind of statistics). And you can do it with some fairly straightforward scripting, ie git rev-list --parents HEAD | grep ' .* ' | git diff-tree --always -s --pretty=oneline --stdin | less -S will do it. But I finally got irritated with the fact that we can skip merges with '--no-merges', but we can't do the trivial reverse operation. So this just adds a '--merges' flag that _only_ shows merges. Now you can do the above with just a git log --merges --pretty=oneline which is a lot simpler. It also means that we automatically get a lot of statistics for free, eg git shortlog -ns --merges does exactly what you'd want it to do. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge git://git.bogomips.org/git-svnJunio C Hamano2009-06-27
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.bogomips.org/git-svn: git svn: Doc update for multiple branch and tag paths git svn: cleanup t9138-multiple-branches git-svn: Canonicalize svn urls to prevent libsvn assertion t9138: remove stray dot in test which broke bash git-svn: convert globs to regexps for branch destinations git svn: Support multiple branch and tag paths in the svn repository. Add 'git svn reset' to unwind 'git svn fetch' git-svn: speed up find_rev_before Add 'git svn help [cmd]' which works outside a repo. git-svn: let 'dcommit $rev' work on $rev instead of HEAD
| * | | | | | git svn: Doc update for multiple branch and tag pathsMarc Branchaud2009-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Marc Branchaud <marcnarc@xiplink.com> Acked-by: Eric Wong <normalperson@yhbt.net>
| * | | | | | git svn: cleanup t9138-multiple-branchesMarc Branchaud2009-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using the "svn_cmd" wrapper instead of "svn" alone allows tests to run consistently for users with customized ~/.subversion/configs. Additionally, using subshells via "(cd ...)" allow cleaner and less error-prone tests to be written. [ew: expanded commit message] Signed-off-by: Marc Branchaud <marcnarc@xiplink.com> Acked-by: Eric Wong <normalperson@yhbt.net>
| * | | | | | git-svn: Canonicalize svn urls to prevent libsvn assertionUlrich Dangel2009-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cloning/initializing svn repositories with an uncanonicalize url does not work as libsvn throws an assertion. This patch canonicalize svn uris for the clone and init command from git-svn. [ew: fixed trailing whitespace] Signed-off-by: Ulrich Dangel <uli@spamt.net> Acked-by: Eric Wong <normalperson@yhbt.net>
| * | | | | | t9138: remove stray dot in test which broke bashEric Wong2009-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The stray dot broke bash and probably some other shells, but worked fine with dash in my limited testing. Signed-off-by: Eric Wong <normalperson@yhbt.net>
| * | | | | | git-svn: convert globs to regexps for branch destinationsEric Wong2009-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Marc Branchaud wrote: > I'm fairly happy with this, except for the way the branch > subcommand matches refspecs. The patch does a simple string > comparison, but it'd be better to do an actual glob. I just > couldn't track down the right function for that, so I left it as > a strcmp and hope that a gitizen can tell me how to glob here. Signed-off-by: Eric Wong <normalperson@yhbt.net>
| * | | | | | git svn: Support multiple branch and tag paths in the svn repository.Marc Branchaud2009-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables git-svn.perl to read multiple 'branches' and 'tags' entries in svn-remote config sections. The init and clone subcommands also support multiple --branches and --tags arguments. The branch (and tag) subcommand gets a new argument: --destination (or -d). This argument is required if there are multiple branches (or tags) entries configured for the remote Subversion repository. The argument's value specifies which branch (or tag) path to use to create the branch (or tag). The specified value must match the left side (without wildcards) of one of the branches (or tags) refspecs in the svn-remote's config. [ew: avoided explicit loop when combining globs with "push"] Signed-off-by: Marc Branchaud <marcnarc@xiplink.com> Acked-by: Eric Wong <normalperson@yhbt.net>
| * | | | | | Add 'git svn reset' to unwind 'git svn fetch'Ben Jackson2009-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a command to unwind the effects of fetch by moving the rev_map and refs/remotes/git-svn back to an old SVN revision. This allows revisions to be re-fetched. Ideally SVN revs would be immutable, but permissions changes in the SVN repository or indiscriminate use of '--ignore-paths' can create situations where fetch cannot make progress. Signed-off-by: Ben Jackson <ben@ben.com> Acked-by: Eric Wong <normalperson@yhbt.net>
| * | | | | | git-svn: speed up find_rev_beforeBen Jackson2009-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By limiting start revision of find_rev_before to max existing revision. This avoids a long wait if you do 'git svn reset -r 9999999'. The linear search within the contiguous revisions doesn't seem to be a problem. [ew: expanded commit message] Signed-off-by: Ben Jackson <ben@ben.com> Acked-by: Eric Wong <normalperson@yhbt.net>
| * | | | | | Add 'git svn help [cmd]' which works outside a repo.Ben Jackson2009-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously there was no explicit 'help' command, but 'git svn help' still printed the usage message (as an invalid command), provided you got past the initialization steps that required a valid repo. Signed-off-by: Ben Jackson <ben@ben.com> Acked-by: Eric Wong <normalperson@yhbt.net>
| * | | | | | git-svn: let 'dcommit $rev' work on $rev instead of HEADThomas Rast2009-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'git svn dcommit' takes an optional revision argument, but the meaning of it was rather scary. It completely ignored the current state of the HEAD, only looking at the revisions between SVN and $rev. If HEAD was attached to $branch, the branch lost all commits $rev..$branch in the process. Considering that 'git svn dcommit HEAD^' has the intuitive meaning "dcommit all changes on my branch except the last one", we change the meaning of the revision argument. git-svn temporarily checks out $rev for its work, meaning that * if a branch is specified, that branch (_not_ the HEAD) is rebased as part of the dcommit, * if some other revision is specified, as in the example, all work happens on a detached HEAD and no branch is affected. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Eric Wong <normalperson@yhbt.net>
* | | | | | | Merge branch 'pb/send-email-cccmd-fix'Junio C Hamano2009-06-27
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pb/send-email-cccmd-fix: t/t9001-send-email.sh: ensure generated script is executed with $SHELL_PATH
| * | | | | | | t/t9001-send-email.sh: ensure generated script is executed with $SHELL_PATHBrandon Casey2009-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the shell is not specified using the '#!' notation, then the OS will use '/bin/sh' to execute the script which may not produce the desired results. In particular, /bin/sh on Solaris interprets '^' specially which has an effect on the sed command that this patch touches. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'maint'Junio C Hamano2009-06-27
|\ \ \ \ \ \ \ \ | | |_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: gitweb/README: fix AliasMatch in example Test grep --and/--or/--not Test git archive --remote fread does not return negative on error