Commit graph

18165 commits

Author SHA1 Message Date
Martin Storsjö 3944ba0cb0 Allow curl to rewind the read buffers
When using multi-pass authentication methods, the curl library may
need to rewind the read buffers (depending on how much already has
been fed to the server) used for providing data to HTTP PUT, POST or
PROPFIND, and in order to allow the library to do so, we need to tell
it how by providing either an ioctl callback or a seek callback.

This patch adds an ioctl callback, which should be usable on older
curl versions (since 7.12.3) than the seek callback (introduced in
curl 7.18.0).

Some HTTP servers (such as Apache) give an 401 error reply immediately
after receiving the headers (so no data has been read from the read
buffers, and thus no rewinding is needed), but other servers (such
as Lighttpd) only replies after the whole request has been sent and
all data has been read from the read buffers, making rewinding necessary.

Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-02 13:04:07 -07:00
Junio C Hamano dffc13166b Merge branch 'ef/fast-export'
* ef/fast-export:
  builtin-fast-export.c: handle nested tags
  builtin-fast-export.c: fix crash on tagged trees
  builtin-fast-export.c: turn error into warning
  test-suite: adding a test for fast-export with tag variants
2009-04-01 22:49:28 -07:00
Junio C Hamano 37a13acb2e Merge branch 'mh/format-patch-add-header'
* mh/format-patch-add-header:
  format-patch: add arbitrary email headers
2009-04-01 22:49:24 -07:00
Junio C Hamano 85b7bd50c4 Merge branch 'tr/maint-1.6.1-doc-format-patch--root'
* tr/maint-1.6.1-doc-format-patch--root:
  Documentation: format-patch --root clarifications
2009-04-01 22:49:03 -07:00
Junio C Hamano 02c62b10de Merge branch 'maint'
* maint:
  Documentation: Remove an odd "instead"
  fix portability problem with IS_RUN_COMMAND_ERR
  mailmap: resurrect lower-casing of email addresses
2009-04-01 22:46:31 -07:00
Junio C Hamano 7634817871 Merge branch 'maint-1.6.1' into maint
* maint-1.6.1:
  Documentation: Remove an odd "instead"
2009-04-01 22:36:05 -07:00
Junio C Hamano f054a41941 Merge branch 'maint-1.6.0' into maint-1.6.1
* maint-1.6.0:
  Documentation: Remove an odd "instead"
2009-04-01 22:35:57 -07:00
Junio C Hamano 477fde6ff3 Merge branch 'cj/doc-format'
* cj/doc-format:
  Documentation: use "spurious .sp" XSLT if DOCBOOK_SUPPRESS_SP is set
  Documentation: option to render literal text as bold for manpages
  Documentation: asciidoc.conf: fix verse block with block titles
  Documentation: asciidoc.conf: always use <literallayout> for [blocktext]
  Documentation: move "spurious .sp" code into manpage-base.xsl
  Documentation: move quieting params into manpage-base.xsl
  Documentation: rename docbook-xsl-172 attribute to git-asciidoc-no-roff
  Documentation: use parametrized manpage-base.xsl with manpage-{1.72,normal}.xsl
  Documentation: move callouts.xsl to manpage-{base,normal}.xsl
  Documentation/Makefile: break up texi pipeline
  Documentation/Makefile: make most operations "quiet"
2009-04-01 22:35:00 -07:00
Junio C Hamano 3c91bf6805 Merge branch 'jc/maint-1.6.0-keep-pack'
* jc/maint-1.6.0-keep-pack:
  pack-objects: don't loosen objects available in alternate or kept packs
  t7700: demonstrate repack flaw which may loosen objects unnecessarily
  Remove --kept-pack-only option and associated infrastructure
  pack-objects: only repack or loosen objects residing in "local" packs
  git-repack.sh: don't use --kept-pack-only option to pack-objects
  t7700-repack: add two new tests demonstrating repacking flaws

Conflicts:
	t/t7700-repack.sh
2009-04-01 22:34:19 -07:00
Junio C Hamano 988d9fd8a4 Merge branch 'kb/tracking-count-no-merges'
* kb/tracking-count-no-merges:
  stat_tracking_info(): only count real commits
2009-04-01 22:27:43 -07:00
Wesley J. Landaker 0e5e69a355 Documentation: git-svn: fix trunk/fetch svn-remote key typo
Fix the git-svn documentation svn-remote example section talking about
tags and branches by using the proper key "fetch" instead of "trunk".
Using "trunk" actually might be nice, but it doesn't currently work.

The fetch line for the trunk was also reordered to be at the top of the
list, since most people think about the trunk/tags/branches trio in that
logical order.

Signed-off-by: Wesley J. Landaker <wjl@icecavern.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-01 21:43:03 -07:00
Björn Steinbrink 5288dd5835 Mailmap: Allow empty email addresses to be mapped
While it makes no sense to map some email address to an empty one, doing
things the other way around can be useful. For example when using
filter-branch with an env-filter that employs a mailmap to fix up an
import that created such broken commits with empty email addresses.

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-01 15:53:36 -07:00
Heiko Voigt 75fd877e15 Cleanup warning about known issues in cvsimport documentation
Not all statements were complete sentences.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-01 15:46:46 -07:00
Holger Weiß 5bd27ebb18 Documentation: Remove an odd "instead"
Signed-off-by: Holger Weiß <holger@zedat.fu-berlin.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-01 11:34:02 -07:00
Jay Soffian dc1460aa8d send-email: ask_default should apply to all emails, not just the first
Commit 6e18251 made the "Send this email?" prompt assume yes if confirm
= "inform" when it was unable to get a valid response. However, the
"yes" assumption only worked correctly for the first email. This commit
fixes the issue and confirms the fix by modifying the existing test for
the prompt to send multiple emails.

Reported by Matthieu Moy <Matthieu.Moy@imag.fr>

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-01 11:11:21 -07:00
Jay Soffian 5906f54e47 send-email: don't attempt to prompt if tty is closed
Attempting to prompt when the tty is closed (typically when running from
cron) is pointless and emits a warning. This patch causes ask() to
return early, squelching the warning.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-01 11:10:06 -07:00
Jeff King fd94836923 fix portability problem with IS_RUN_COMMAND_ERR
Some old versions of gcc don't seem to like us negating an
enum constant. Let's work around it by negating the other
half of the comparison instead.

Reported by Pierre Poissinger on gcc 2.9.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-01 11:05:54 -07:00
Chris Johnsen 2346431e47 Documentation: use "spurious .sp" XSLT if DOCBOOK_SUPPRESS_SP is set
With this change, the "spurious .sp" suppression XSLT code is
disabled by default. It can be enabled by defining
DOCBOOK_SUPPRESS_SP.

The "spurious .sp" XSLT fragment was used to work around a bug
first released in docbook-xsl 1.69.1. Modern versions of
docbook-xsl are negatively affected by the code (some empty lines
are omitted from manpage output; see
<http://article.gmane.org/gmane.comp.version-control.git/115302>).

The key revisions in the docbook SVN repo seem to be 5144 (before
docbook-xsl 1.69.1) and 6359 (before docbook-xsl 1.71.1).

Testing done with asciidoc 8.3.1 and docbook-xsl 1.74.0.

Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-01 11:02:42 -07:00
Johannes Schindelin bf637803a7 mailmap: resurrect lower-casing of email addresses
Commit 0925ce4(Add map_user() and clear_mailmap() to mailmap) broke the
lower-casing of email addresses.  This mostly did not matter if your
.mailmap has only lower-case email addresses;  However, we did not
require .mailmap to contain lowercase-only email addresses.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-01 11:00:54 -07:00
Junio C Hamano 91286ca61a Merge git://git.bogomips.org/git-svn
* git://git.bogomips.org/git-svn:
  git-svn: add a double quiet option to hide git commits
2009-04-01 10:57:48 -07:00
Ali Gholami Rudi 50b5f420fe builtin-clone.c: no need to strdup for setenv
The setenv function makes a copy, itself.

Signed-off-by: Ali Gholami Rudi <ali@rudi.ir>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-01 08:58:55 -07:00
Ali Gholami Rudi e161acd11d builtin-clone.c: make junk_pid static
junk_pid is used only in builtin-clone.c.

Signed-off-by: Ali Gholami Rudi <ali@rudi.ir>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-01 08:57:39 -07:00
Simon Arlott 49750f3076 git-svn: add a double quiet option to hide git commits
People may expect/prefer -q to still show git commits,
so this change allows a second -q to hide them.

Signed-off-by: Michael Poole <mdpoole@troilus.org>
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Acked-by: Eric Wong <normalperson@yhbt.net>
2009-03-30 23:51:20 -07:00
Junio C Hamano 442dd42d6d Merge branch 'maint'
* maint:
  Update draft release notes to 1.6.2.2
  Fix bash completion in path with spaces
  bash completion: only show 'log --merge' if merging
  git-tag(1): add hint about commit messages
  Documentation: update graph api example.
2009-03-30 13:29:57 -07:00
Junio C Hamano 8c7f788238 Update draft release notes to 1.6.2.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-30 13:29:31 -07:00
Junio C Hamano b19293df9e Merge branch 'maint-1.6.1' into maint
* maint-1.6.1:
  Fix bash completion in path with spaces
  bash completion: only show 'log --merge' if merging
  git-tag(1): add hint about commit messages
  Documentation: update graph api example.

Conflicts:
	contrib/completion/git-completion.bash
2009-03-30 13:25:27 -07:00
Junio C Hamano dcbf041745 Merge branch 'maint-1.6.0' into maint-1.6.1
* maint-1.6.0:
  Fix bash completion in path with spaces
  bash completion: only show 'log --merge' if merging
  git-tag(1): add hint about commit messages
  Documentation: update graph api example.
2009-03-30 13:23:53 -07:00
Santi Béjar 01eadafccb Documentation: push.default applies to all remotes
push.default is not only for the current remote but setting the default
behaviour for all remotes.

Signed-off-by: Santi Béjar <santi@agolina.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-30 09:20:41 -07:00
Santi Béjar 76d3cc50b5 Documentation: enhance branch.<name>.{remote,merge}
The documentation for branch.*.merge is very dense, so add a simple
explanation on top of it.

And branch.*.remote also affects 'git push'.

Signed-off-by: Santi Béjar <santi@agolina.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-30 09:19:37 -07:00
Daniel Cheng (aka SDiZ) ba7906f2f4 Fix bash completion in path with spaces
Signed-off-by: Daniel Cheng (aka SDiZ) <j16sdiz+freenet@gmail.com>
Trivially-acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-30 09:07:03 -07:00
Thomas Rast 67f1fe5f08 bash completion: only show 'log --merge' if merging
The gitk completion only shows --merge if MERGE_HEAD is present.
Do it the same way for git-log completion.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-30 09:06:48 -07:00
Nico -telmich- Schottelius abfd5fa872 git-tag(1): add hint about commit messages
If a tag is not annotated, git tag displays the commit message
instead. Add this hint to the manpage to unhide this secret.

Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-30 09:00:04 -07:00
Allan Caffee 7b60d0d3e4 Documentation: update graph api example.
As of commit 03300c0 the graph API uses '*' for all nodes including merges.
This updates the example in the documentation to match.

Signed-off-by: Allan Caffee <allan.caffee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-30 08:59:45 -07:00
Junio C Hamano f2ad051fd1 Merge branch 'maint'
* maint:
  git-svn: fix ls-tree usage with dash-prefixed paths
  import-zips: fix thinko
2009-03-29 23:11:23 -07:00
Junio C Hamano 510a309e5e Merge branch 'maint-1.6.1' into maint
* maint-1.6.1:
  import-zips: fix thinko
2009-03-29 23:11:13 -07:00
Junio C Hamano 8e4f767ba7 Merge branch 'maint-1.6.0' into maint-1.6.1
* maint-1.6.0:
  import-zips: fix thinko
2009-03-29 23:11:03 -07:00
Jay Soffian c18f75a1e9 send-email: add tests for refactored prompting
Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-29 21:41:28 -07:00
Jay Soffian 6e1825186b send-email: refactor and ensure prompting doesn't loop forever
Several places in send-email prompt for input, and will do so forever
when the input is EOF. This is poor behavior when send-email is run
unattended (say from cron).

This patch refactors the prompting to an ask() function which takes a
prompt, an optional default, and an optional regex to validate the
input. The function returns on EOF, or if a default is provided and the
user simply types return, or if the input passes the validating regex
(which accepts all input by default). The ask() function gives up after
10 tries in case of invalid input.

There are four callers of the function:

1) "Who should the emails appear to be from?" which provides a default
sender. Previously the user would have to type ctrl-d to accept the
default. Now the user can just hit return, or type ctrl-d.

2) "Who should the emails be sent to?". Previously this prompt passed a
second argument ("") to $term->readline() which was ignored. I believe
the intent was to allow the user to just hit return. Now the user
can do so, or type ctrl-d.

3) "Message-ID to be used as In-Reply-To for the first email?".
Previously this prompt passed a second argument (effectively undef) to
$term->readline() which was ignored. I believe the intent was the same
as for (2), to allow the user to just hit return. Now the user can do
so, or type ctrl-d.

4) "Send this email?". Previously this prompt would loop forever until
it got a valid reply. Now it stops prompting on EOF or a valid reply. In
the case where confirm = "inform", it now defaults to "y" on EOF or the
user hitting return, otherwise an invalid reply causes send-email to
terminate.

A followup patch adds tests for the new functionality.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-29 21:41:03 -07:00
Eric Wong b8fee3a388 git-svn: fix ls-tree usage with dash-prefixed paths
To find the blob object name given a tree and pathname, we were
incorrectly calling "git ls-tree" with a "--" argument followed
by the pathname of the file we wanted to get.

  git ls-tree <TREE> -- --dashed/path/name.c

Unlike many command-line interfaces, the "--" alone does not
symbolize the end of non-option arguments on the command-line.

ls-tree interprets the "--" as a prefix to match against, thus
the entire contents of the --dashed/* hierarchy would be
returned because the "--" matches "--dashed" and every path
under it.

Thanks to Anton Gyllenberg for pointing me toward the
Twisted repository as a real-world example of this case.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-29 19:58:10 -07:00
Johannes Schindelin 63801da88d import-zips: fix thinko
Embarrassingly, the common prefix calculation did not work properly, due
to a mistake in the assignment: instead of assigning the dirname of the
current file name, the dirname of the current common prefix needs to
be assigned to common prefix, when the current prefix does not match the
current file name.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-29 19:56:26 -07:00
Erik Faye-Lund 1982467d92 builtin-fast-export.c: handle nested tags
When tags that points to tags are passed to fast-export, an error is given,
saying "Tag [TAGNAME] points nowhere?". This fix calls parse_object() on the
object before referencing it's tag, to ensure the tag-info is fully initialized.
In addition, it inserts a comment to point out where nested tags are handled.
This is consistent with the comment for signed tags.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-29 19:48:43 -07:00
Erik Faye-Lund c0582c53bc builtin-fast-export.c: fix crash on tagged trees
If a tag object points to a tree (or another unhandled type), the commit-
pointer is left uninitialized and later dereferenced. This patch adds a
default case to the switch that issues a warning and skips the object.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-29 19:48:43 -07:00
Erik Faye-Lund 2d07f6d4b7 builtin-fast-export.c: turn error into warning
fast-import doesn't have a syntax to support tree-objects (and some other
object-types), so fast-export shouldn't handle them. However, aborting the
operation is a bit drastic. This patch turns the error into a warning instead.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-29 19:48:43 -07:00
Erik Faye-Lund 41a5c70f2c test-suite: adding a test for fast-export with tag variants
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-29 19:48:39 -07:00
Simon Arlott 18d5cf908f git-svn: don't output git commits in quiet mode
Ideally only errors should be output in this mode so fetch
can be run from cron and normally produce no output. Without
this change it would output a single line on each git commit,
e.g.
r1909 = 32ef87860662526d4a62f903949ed21e0341079e (u2_10_12_branch)

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Acked-by: Eric Wong <normalperson@yhbt.net>
2009-03-29 15:42:00 -07:00
Eric Wong 4f821012c3 git-svn: fix ls-tree usage with dash-prefixed paths
To find the blob object name given a tree and pathname, we were
incorrectly calling "git ls-tree" with a "--" argument followed
by the pathname of the file we wanted to get.

  git ls-tree <TREE> -- --dashed/path/name.c

Unlike many command-line interfaces, the "--" alone does not
symbolize the end of non-option arguments on the command-line.

ls-tree interprets the "--" as a prefix to match against, thus
the entire contents of the --dashed/* hierarchy would be
returned because the "--" matches "--dashed" and every path
under it.

Thanks to Anton Gyllenberg for pointing me toward the
Twisted repository as a real-world example of this case.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-03-28 23:00:05 -07:00
Junio C Hamano b0085a7167 Merge branch 'maint'
* maint:
  test-lib: Clean up comments and Makefile.
  diff --no-index: Do not generate patch output if other output is requested
2009-03-28 01:16:46 -07:00
Junio C Hamano a1b1ae0571 Update draft release notes to 1.6.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-28 00:55:52 -07:00
Junio C Hamano aa72a14a7f Merge branch 'jc/maint-1.6.0-diff-borrow-carefully'
* jc/maint-1.6.0-diff-borrow-carefully:
  diff --cached: do not borrow from a work tree when a path is marked as assume-unchanged
2009-03-28 00:42:31 -07:00
Junio C Hamano 48bcfbd134 Merge branch 'js/remote-improvements'
* js/remote-improvements:
  remote: improve sorting of "configure for git push" list
2009-03-28 00:42:22 -07:00