Code

git.git
14 years agoGIT 1.6.4.1 v1.6.4.1
Junio C Hamano [Fri, 21 Aug 2009 19:02:25 +0000 (12:02 -0700)]
GIT 1.6.4.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'bc/maint-am-email' into maint
Junio C Hamano [Sat, 22 Aug 2009 01:51:30 +0000 (18:51 -0700)]
Merge branch 'bc/maint-am-email' into maint

* bc/maint-am-email:
  git-am: print fair error message when format detection fails
  am: allow individual e-mail files as input

14 years agoMerge branch 'jc/maint-merge-recursive-fix' into maint
Junio C Hamano [Fri, 21 Aug 2009 18:34:24 +0000 (11:34 -0700)]
Merge branch 'jc/maint-merge-recursive-fix' into maint

* jc/maint-merge-recursive-fix:
  merge-recursive: don't segfault while handling rename clashes

14 years agoMerge branch 'zf/maint-gitweb-acname' into maint
Junio C Hamano [Fri, 21 Aug 2009 18:34:17 +0000 (11:34 -0700)]
Merge branch 'zf/maint-gitweb-acname' into maint

* zf/maint-gitweb-acname:
  gitweb: parse_commit_text encoding fix

14 years agoMerge branch 'np/maint-limit-delta-cache' into maint
Junio C Hamano [Fri, 21 Aug 2009 18:34:02 +0000 (11:34 -0700)]
Merge branch 'np/maint-limit-delta-cache' into maint

* np/maint-limit-delta-cache:
  don't let the delta cache grow unbounded in 'git repack'

14 years agoMerge branch 'jk/maint-show-tag' into maint
Junio C Hamano [Fri, 21 Aug 2009 18:33:54 +0000 (11:33 -0700)]
Merge branch 'jk/maint-show-tag' into maint

* jk/maint-show-tag:
  show: add space between multiple items
  show: suppress extra newline when showing annotated tag

14 years agoMerge branch 'sb/maint-pull-rebase' into maint
Junio C Hamano [Fri, 21 Aug 2009 18:33:08 +0000 (11:33 -0700)]
Merge branch 'sb/maint-pull-rebase' into maint

* sb/maint-pull-rebase:
  pull: support rebased upstream + fetch + pull --rebase
  t5520-pull: Test for rebased upstream + fetch + pull --rebase

14 years agofilter-branch: make the usage string fit on 80 chars terminals.
Matthieu Moy [Tue, 18 Aug 2009 09:51:00 +0000 (11:51 +0200)]
filter-branch: make the usage string fit on 80 chars terminals.

It used to be a single, huge line, badly wrapped by xterm.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agofilter-branch: add an example how to add ACKs to a range of commits
Johannes Schindelin [Mon, 17 Aug 2009 20:38:46 +0000 (22:38 +0200)]
filter-branch: add an example how to add ACKs to a range of commits

When you have to add certain lines like ACKs (or for that matter,
Signed-off-by:s) to a range of commits starting with HEAD, you might
be tempted to use 'git rebase -i -10', but that is a waste of your
time.

It is better to use 'git filter-branch' with an appropriate message
filter, and this commit adds an example how to do so to
filter-branch's man page.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agodocs: describe impact of repack on "clone -s"
Jeff King [Mon, 17 Aug 2009 06:19:17 +0000 (02:19 -0400)]
docs: describe impact of repack on "clone -s"

The effects of repacking on a repository with alternates are a bit
subtle. The two main things users will want are:

  1. Not to waste disk space by accidentally copying objects which could
     be shared.

  2. Copying all objects explicitly to break the dependency on the source
     repo.

This patch describes both under the "clone -s" documentation. It makes
sense to put it there rather than in git-repack.txt for both cases.

For (1), we are warning the user who is using "clone -s" about what _not_
to do, so we need to get their attention when reading about "clone -s".

For (2), we are telling them how git-repack can be used to accomplish a
task, but until they know that git-repack is the right tool, they have no
reason to look at the repack documentation.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint-1.6.3' into maint
Junio C Hamano [Wed, 12 Aug 2009 23:15:55 +0000 (16:15 -0700)]
Merge branch 'maint-1.6.3' into maint

* maint-1.6.3:
  Change mentions of "git programs" to "git commands"
  Documentation: merge: one <remote> is required
  help.c: give correct structure's size to memset()

14 years agopush: point to 'git pull' and 'git push --force' in case of non-fast forward
Matthieu Moy [Sat, 8 Aug 2009 07:51:08 +0000 (09:51 +0200)]
push: point to 'git pull' and 'git push --force' in case of non-fast forward

'git push' failing because of non-fast forward is a very common situation,
and a beginner does not necessarily understand "fast forward" immediately.

Add a new section to the git-push documentation and refer them to it.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocumentation: add: <filepattern>... is optional
Paul Bolle [Tue, 11 Aug 2009 13:03:10 +0000 (15:03 +0200)]
Documentation: add: <filepattern>... is optional

<filepattern>... is optional (e.g. when the --all or --update
options are used) so use square brackets in the synopsis.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoChange mentions of "git programs" to "git commands"
Ori Avtalion [Fri, 7 Aug 2009 14:24:21 +0000 (17:24 +0300)]
Change mentions of "git programs" to "git commands"

Most of the docs and printouts refer to "commands" when discussing what
the end users call via the "git" top-level program. We should refer them
as "git programs" when we discuss the fact that the commands are
implemented as separate programs, but in other contexts, it is better to
use the term "git commands" consistently.

Signed-off-by: Ori Avtalion <ori@avtalion.name>
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocumentation: merge: one <remote> is required
Paul Bolle [Tue, 11 Aug 2009 13:03:58 +0000 (15:03 +0200)]
Documentation: merge: one <remote> is required

merge only requires one <remote>, so "<remote>..." should be used in the
synopsis (and not "<remote> <remote>...").

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agohelp.c: give correct structure's size to memset()
Johan Herland [Tue, 11 Aug 2009 10:10:21 +0000 (12:10 +0200)]
help.c: give correct structure's size to memset()

These two structures are of the same type, but we'd better be consistent.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint-1.6.3' into maint
Junio C Hamano [Tue, 11 Aug 2009 05:23:48 +0000 (22:23 -0700)]
Merge branch 'maint-1.6.3' into maint

* maint-1.6.3:
  Fix typos in git-remote.txt and git-symbolic-ref.txt

14 years agoFix typos in git-remote.txt and git-symbolic-ref.txt
Štěpán Němec [Tue, 11 Aug 2009 00:52:07 +0000 (02:52 +0200)]
Fix typos in git-remote.txt and git-symbolic-ref.txt

Signed-off-by: Štěpán Němec <stepnem@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit-am: print fair error message when format detection fails
Nicolas Sebrecht [Fri, 7 Aug 2009 01:08:13 +0000 (20:08 -0500)]
git-am: print fair error message when format detection fails

Avoid git ending with this message:
"Patch format  is not supported."

With improved error message in the format detection failure case by
Giuseppe Bilotta.

Signed-off-by: Nicolas Sebrecht <ni.s@laposte.net>
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoam: allow individual e-mail files as input
Junio C Hamano [Fri, 7 Aug 2009 01:08:12 +0000 (20:08 -0500)]
am: allow individual e-mail files as input

We traditionally allowed a mbox file or a directory name of a maildir (but
never an individual file inside a maildir) to be given to "git am".  Even
though an individual file in a maildir (or more generally, a piece of
RFC2822 e-mail) is not a mbox file, it contains enough information to
create a commit out of it, so there is no reason to reject one.  Running
mailsplit on such a file feels stupid, but it does not hurt.

This builds on top of a5a6755 (git-am foreign patch support: introduce
patch_format, 2009-05-27) that introduced mailbox format detection.  The
codepath to deal with a mbox requires it to begin with "From " line and
also allows it to begin with "From: ", but a random piece of e-mail can
and often do begin with any valid RFC2822 header lines.

Instead of checking the first line, we extract all the lines up to the
first empty line, and make sure they look like e-mail headers.

A test is added to t4150 to demonstrate this feature.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit-instaweb: fix mod_perl detection for apache2
Mark A Rada [Sat, 8 Aug 2009 22:24:02 +0000 (18:24 -0400)]
git-instaweb: fix mod_perl detection for apache2

The script was looking for something that matched the '^our $gitbin'
regex, which no longer exists in gitweb.cgi.

Now it looks for 'MOD_PERL', which should be on the line that checks
to see if the script is running in a mod_perl environment.

Signed-off-by: Mark Rada <marada@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint-1.6.3' into maint
Junio C Hamano [Sat, 8 Aug 2009 03:44:26 +0000 (20:44 -0700)]
Merge branch 'maint-1.6.3' into maint

* maint-1.6.3:
  verify-pack -v: do not report "chain length 0"
  t5510: harden the way verify-pack is used

14 years agoMerge branch 'maint-1.6.2' into maint-1.6.3
Junio C Hamano [Sat, 8 Aug 2009 03:44:15 +0000 (20:44 -0700)]
Merge branch 'maint-1.6.2' into maint-1.6.3

* maint-1.6.2:
  verify-pack -v: do not report "chain length 0"
  t5510: harden the way verify-pack is used

14 years agoMerge branch 'maint-1.6.1' into maint-1.6.2
Junio C Hamano [Sat, 8 Aug 2009 03:44:09 +0000 (20:44 -0700)]
Merge branch 'maint-1.6.1' into maint-1.6.2

* maint-1.6.1:
  verify-pack -v: do not report "chain length 0"
  t5510: harden the way verify-pack is used

14 years agoMerge branch 'maint-1.6.0' into maint-1.6.1
Junio C Hamano [Sat, 8 Aug 2009 03:44:02 +0000 (20:44 -0700)]
Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
  verify-pack -v: do not report "chain length 0"
  t5510: harden the way verify-pack is used

14 years agoverify-pack -v: do not report "chain length 0"
Junio C Hamano [Fri, 7 Aug 2009 22:36:31 +0000 (15:36 -0700)]
verify-pack -v: do not report "chain length 0"

When making a histogram of delta chain length in the pack, the program
collects number of objects whose delta depth exceeds the MAX_CHAIN limit
in histogram[0], and showed it as the number of items that exceeds the
limit correctly.  HOWEVER, it also showed the same number labeled as
"chain length = 0".

In fact, we are not showing the number of objects whose chain length is
zero, i.e. the base objects.  Correct this.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot5510: harden the way verify-pack is used
Junio C Hamano [Sat, 8 Aug 2009 03:12:13 +0000 (20:12 -0700)]
t5510: harden the way verify-pack is used

The test ignored the exit status from verify pack command, and also relied
on not seeing any delta chain statistics.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agodon't let the delta cache grow unbounded in 'git repack'
Nicolas Pitre [Wed, 5 Aug 2009 20:55:07 +0000 (16:55 -0400)]
don't let the delta cache grow unbounded in 'git repack'

I have 4GB of RAM on my system which should, in theory, be quite enough
to repack a 600 MB repository.  However the unbounded delta cache size
always pushes it into swap, at which point everything virtually comes to
a halt.  So unbounded caches are never a good idea.

A default of 256MB should be a good compromize between memory usage and
speed where medium sized repositories are still likely to fit in the
cache with a reasonable memory usage, and larger repositories are going
to take quite some time to repack already anyway.

While at it, clarify the associated config variable documentation
entries a bit.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint-1.6.3' into maint
Junio C Hamano [Wed, 5 Aug 2009 19:37:24 +0000 (12:37 -0700)]
Merge branch 'maint-1.6.3' into maint

* maint-1.6.3:
  Better usage string for reflog.
  hg-to-git: don't import the unused popen2 module
  send-email: remove debug trace
  config: Keep inner whitespace verbatim

14 years agogitweb: parse_commit_text encoding fix
Zoltán Füzesi [Sun, 2 Aug 2009 07:42:24 +0000 (09:42 +0200)]
gitweb: parse_commit_text encoding fix

Call to_utf8 when parsing author and committer names, otherwise they will appear
with bad encoding if they written by using chop_and_escape_str.

Signed-off-by: Zoltán Füzesi <zfuzesi@eaglet.hu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogitweb/README: Document $base_url
Jakub Narebski [Tue, 4 Aug 2009 15:54:32 +0000 (17:54 +0200)]
gitweb/README: Document $base_url

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocumentation: git submodule: add missing options to synopsis
Jens Lehmann [Sat, 1 Aug 2009 18:49:47 +0000 (20:49 +0200)]
Documentation: git submodule: add missing options to synopsis

The option --merge was missing for submodule update and --cached for
submodule summary.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoBetter usage string for reflog.
Matthieu Moy [Wed, 5 Aug 2009 15:36:28 +0000 (17:36 +0200)]
Better usage string for reflog.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agohg-to-git: don't import the unused popen2 module
Miklos Vajna [Mon, 3 Aug 2009 16:41:34 +0000 (18:41 +0200)]
hg-to-git: don't import the unused popen2 module

Importing the popen2 module in Python-2.6 results in the
"DeprecationWarning: The popen2 module is deprecated.  Use the
subprocess module." message. The module itself isn't used in fact, so
just removing it solves the problem.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agosend-email: remove debug trace
Erik Faye-Lund [Tue, 4 Aug 2009 21:57:34 +0000 (21:57 +0000)]
send-email: remove debug trace

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
14 years agoconfig: Keep inner whitespace verbatim
Björn Steinbrink [Thu, 30 Jul 2009 11:41:57 +0000 (13:41 +0200)]
config: Keep inner whitespace verbatim

Configuration values are expected to be quoted when they have leading or
trailing whitespace, but inner whitespace should be kept verbatim even if
the value is not quoted. This is already documented in git-config(1), but
the code caused inner whitespace to be collapsed to a single space,
breaking, for example, clones from a path that has two consecutive spaces
in it, as future fetches would only see a single space.

Reported-by: John te Bokkel <tanj.tanj@gmail.com>
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-recursive: don't segfault while handling rename clashes
Junio C Hamano [Fri, 31 Jul 2009 00:38:15 +0000 (17:38 -0700)]
merge-recursive: don't segfault while handling rename clashes

When a branch moves A to B while the other branch created B (or moved C to
B), the code tried to rename one of them to B~something to preserve both
versions, and failed to register temporary resolution for the original
path B at stage#0 during virtual ancestor computation.  This left the
index in unmerged state and caused a segfault.

A better solution is to merge these two versions of B's in place and use
the (potentially conflicting) result as the intermediate merge result in
the virtual ancestor.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoGIT 1.6.4 v1.6.4
Junio C Hamano [Wed, 29 Jul 2009 07:32:42 +0000 (00:32 -0700)]
GIT 1.6.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoSync with 1.6.3.4
Junio C Hamano [Wed, 29 Jul 2009 07:00:56 +0000 (00:00 -0700)]
Sync with 1.6.3.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoGIT 1.6.3.4 v1.6.3.4
Junio C Hamano [Wed, 29 Jul 2009 06:52:58 +0000 (23:52 -0700)]
GIT 1.6.3.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoconfig.txt: document add.ignore-errors
Stephen Boyd [Sun, 31 May 2009 05:08:02 +0000 (22:08 -0700)]
config.txt: document add.ignore-errors

Use the description of "--ignore-errors" from git-add.txt as
inspiration.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agorequest-pull: allow ls-remote to notice remote.$nickname.uploadpack
Tom Grennan [Wed, 29 Jul 2009 01:30:02 +0000 (18:30 -0700)]
request-pull: allow ls-remote to notice remote.$nickname.uploadpack

The location to pull from should be converted from the configured nickname
to URL in the message, but ls-remote should be fed the nickname so that
the command uses remote.$nickname.* variables, most notably "uploadpack".

Signed-off-by: Tom Grennan <tgrennan@redback.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoUpdate the documentation of the raw diff output format
David Kågedal [Tue, 28 Jul 2009 08:32:18 +0000 (10:32 +0200)]
Update the documentation of the raw diff output format

This includes mentioning the initial hash output of diff-tree, and
changes the header to "raw output format" which is more descriptive.

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit-rerere.txt: Clarify ambiguity of the config variable
Michael J Gruber [Tue, 28 Jul 2009 14:42:15 +0000 (16:42 +0200)]
git-rerere.txt: Clarify ambiguity of the config variable

Use the less ambiguous
"set variable foo in order to enable bar"
rather than
"set variable foo to enable bar" which may trick users into
assuming that "enable" is a good value for "foo".

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot9143: do not fail if Compress::Zlib is missing
Eric Wong [Sun, 26 Jul 2009 10:01:52 +0000 (03:01 -0700)]
t9143: do not fail if Compress::Zlib is missing

"git svn gc" will not compress unhandled.log files if
Compress::Zlib is missing.  However, leftover index files should
always be removed, so add a test for this behavior as well.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoTrivial path quoting fixes in git-instaweb
Sean Estabrooks [Sat, 18 Jul 2009 16:45:44 +0000 (09:45 -0700)]
Trivial path quoting fixes in git-instaweb

Bodo Schlecht noticed that Instaweb didn't propely quote all
path instances in the Apache config file it generated.

Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'gp/maint-rebase-p-onto'
Junio C Hamano [Sun, 26 Jul 2009 18:24:13 +0000 (11:24 -0700)]
Merge branch 'gp/maint-rebase-p-onto'

* gp/maint-rebase-p-onto:
  Fix rebase -p --onto

14 years agoMerge branch 'en/fast-export'
Junio C Hamano [Sun, 26 Jul 2009 18:23:52 +0000 (11:23 -0700)]
Merge branch 'en/fast-export'

* en/fast-export:
  fast-export: Document the fact that git-rev-list arguments are accepted
  Add new fast-export testcases
  fast-export: Add a --tag-of-filtered-object option for newly dangling tags
  fast-export: Do parent rewriting to avoid dropping relevant commits
  fast-export: Make sure we show actual ref names instead of "(null)"
  fast-export: Omit tags that tag trees
  fast-export: Set revs.topo_order before calling setup_revisions

14 years agoGIT 1.6.4-rc3 v1.6.4-rc3
Junio C Hamano [Sun, 26 Jul 2009 07:04:50 +0000 (00:04 -0700)]
GIT 1.6.4-rc3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocumentation/config.txt: a variable can be defined on the section header line
Nanako Shiraishi [Sat, 25 Jul 2009 00:28:50 +0000 (09:28 +0900)]
Documentation/config.txt: a variable can be defined on the section header line

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge git://git.bogomips.org/git-svn
Junio C Hamano [Sun, 26 Jul 2009 05:54:03 +0000 (22:54 -0700)]
Merge git://git.bogomips.org/git-svn

* git://git.bogomips.org/git-svn:
  git svn: make minimize URL more reliable over http(s)
  git svn: avoid escaping '/' when renaming/copying files
  t9142: stop httpd after the test
  git svn: the branch command no longer needs the full path
  git svn: revert default behavior for --minimize-url
  git svn: add gc command

14 years agogit svn: make minimize URL more reliable over http(s)
Eric Wong [Sat, 25 Jul 2009 20:14:16 +0000 (13:14 -0700)]
git svn: make minimize URL more reliable over http(s)

In addition to path-based restrictions, Subversion servers over
http(s) may have access controls implemented via the LimitExcept
directive in Apache.  In some cases, LimitExcept may be
(arguably) misconfigured to not allow REPORT requests while
allowing OPTIONS and PROPFIND.

This caused problems with our existing minimize_url logic that
only issued OPTIONS and PROPFIND requests when connecting and
using SVN::Ra::get_latest_revnum.  We now call SVN::Ra::get_log
if get_latest_revnum succeeds, resulting in a REPORT request
being sent.  This will increase our chances of tripping access
controls before we start attempting to fetch history.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
14 years agoDisable asciidoc 8.4.1+ semantics for `{plus}` and friends
Thomas Rast [Sat, 25 Jul 2009 12:06:50 +0000 (14:06 +0200)]
Disable asciidoc 8.4.1+ semantics for `{plus}` and friends

asciidoc 8.4.1 changed the semantics of inline backtick quoting so
that they disable parsing of inline constructs, i.e.,

  Input: `{plus}`
  Pre 8.4.1: +
  Post 8.4.1: {plus}

Fix this by defining the asciidoc attribute 'no-inline-literal'
(which, per the 8.4.1 changelog, is the toggle to return to the old
behaviour) when under ASCIIDOC8.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit svn: avoid escaping '/' when renaming/copying files
Eric Wong [Sat, 25 Jul 2009 09:29:28 +0000 (02:29 -0700)]
git svn: avoid escaping '/' when renaming/copying files

Timothy Schaeffer reported the following:
> Git-svn has been giving me the following error for some time
> when calling "git svn dcommit":
>
> RA layer request failed: PROPFIND request failed on
> '/svn/stf/branches/dev/sw%2Fdpemu%2Finclude%2FNetCnxn.h': PROPFIND of
> '/svn/stf/branches/dev/sw%2Fdpemu%2Finclude%2FNetCnxn.h': 302 Found
> (https://oursvnrepo.net) at /usr/local/libexec/git-core/git-svn line 508
>
> This only occurred when git detected a rename or copy.
>
> Following the lead into git-svn.perl,
> and noticing that some of the '/'s in the path were hex-encoded
> and some were not,
> I changed the regex used to find chars
> to hex-encode in the relative part of the path
> to exclude '/'.
> It works, so far.
> I have included a patch.

While this has previous not been a problem in my experience,
newer versions of SVN may be stricter and this does not
introduce regressions in t9115.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
14 years agot9142: stop httpd after the test
Eric Wong [Sat, 25 Jul 2009 09:11:39 +0000 (02:11 -0700)]
t9142: stop httpd after the test

Otherwise it would fail in subsequent runs if the same
SVN_HTTPD_PORT was used.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
14 years agogit svn: the branch command no longer needs the full path
Eric Wong [Sat, 25 Jul 2009 08:36:06 +0000 (01:36 -0700)]
git svn: the branch command no longer needs the full path

This was introduced in 0b2af457a49e3b00d47d556d5301934d27909db8
("Fix branch detection when repository root is inaccessible")
but reintroduced in the previous commit.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
14 years agogit svn: revert default behavior for --minimize-url
Eric Wong [Sat, 25 Jul 2009 07:00:50 +0000 (00:00 -0700)]
git svn: revert default behavior for --minimize-url

This reverts the --minimize-url behavior change that
appeared recently in commit 0b2af457a49e3b00d47d556d5301934d27909db8
("Fix branch detection when repository root is inaccessible").

However, we now allow the option to be turned off by allowing
"--no-minimize-url" so people with limited-access setups can
still take advantage of the fix in
0b2af457a49e3b00d47d556d5301934d27909db8.

Also document the behavior and default settings of minimize-url
in the manpage for the first time.

This introduces a temporary UI regression to allow t9141 to pass
that will be reverted (fixed) in the next commit.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
14 years agogit svn: add gc command
Robert Allan Zeh [Sun, 19 Jul 2009 23:00:52 +0000 (18:00 -0500)]
git svn: add gc command

Add a git svn gc command that gzips all unhandled.log files, and
removes all index files under .git/svn.

Signed-off-by: Robert Allan Zeh <robert.a.zeh@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
14 years agoMerge branch 'maint'
Junio C Hamano [Sat, 25 Jul 2009 09:16:25 +0000 (02:16 -0700)]
Merge branch 'maint'

* maint:
  t8005: Nobody writes Russian in shift_jis

Conflicts:
t/t8005-blame-i18n.sh

14 years agot8005: Nobody writes Russian in shift_jis
Junio C Hamano [Fri, 19 Jun 2009 02:18:37 +0000 (19:18 -0700)]
t8005: Nobody writes Russian in shift_jis

The second and third tests of this script expected that Russian strings
are converted between ISO-8859-5 and Shift_JIS in the "blame --porcelain"
format output correctly.

Sure, many platforms may convert between such a combination, but that is
only because one of the base character set of Shift_JIS, JIS X 0208,
defines codepoints for Russian characters (among others); I do not think
anybody uses Shift_JIS when seriously writing Russian, and it is perfectly
understandable if iconv() libraries on some platforms fail converting
between this combination, as it does not matter in reality.

This patch changes the test to verify Japanese strings are converted
correctly between EUC-JP and Shift_JIS in the same procedure.  The point
of the test is not about verifying the platform's iconv() library, but to
see if "git blame" makes correct iconv() library calls when it should.

We could instead use ISO-8859-5 and KOI8-R as the combination, because
they are both meant to represent Russian, in order to make this test
meaningful on more platforms, but we already use Shift_JIS vs EUC-JP
combinations to test other programs in our test suite, so this combination
is safer from the point of view of the portability.  Besides, I do not
read nor write Russian; sorry ;-)

This change allows tests to pass on my (friend's) Solaris 5.11 box.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint'
Junio C Hamano [Sat, 25 Jul 2009 08:31:53 +0000 (01:31 -0700)]
Merge branch 'maint'

* maint:
  Fix severe breakage in "git-apply --whitespace=fix"

14 years agoFix severe breakage in "git-apply --whitespace=fix"
Junio C Hamano [Sat, 25 Jul 2009 08:29:20 +0000 (01:29 -0700)]
Fix severe breakage in "git-apply --whitespace=fix"

735c674 (Trailing whitespace and no newline fix, 2009-07-22) completely
broke --whitespace=fix, causing it to lose all the empty lines in a patch.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoUpdate release notes for 1.6.4
Junio C Hamano [Sat, 25 Jul 2009 07:51:21 +0000 (00:51 -0700)]
Update release notes for 1.6.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'js/maint-graft-unhide-true-parents'
Junio C Hamano [Sat, 25 Jul 2009 07:45:03 +0000 (00:45 -0700)]
Merge branch 'js/maint-graft-unhide-true-parents'

* js/maint-graft-unhide-true-parents:
  git repack: keep commits hidden by a graft
  Add a test showing that 'git repack' throws away grafted-away parents

Conflicts:
git-repack.sh

14 years agoMerge branch 'av/maint-config-reader'
Junio C Hamano [Sat, 25 Jul 2009 07:44:52 +0000 (00:44 -0700)]
Merge branch 'av/maint-config-reader'

* av/maint-config-reader:
  After renaming a section, print any trailing variable definitions
  Make section_name_match start on '[', and return the length on success

14 years agoMerge branch 'jk/maint-send-email-alias-loop'
Junio C Hamano [Sat, 25 Jul 2009 07:44:45 +0000 (00:44 -0700)]
Merge branch 'jk/maint-send-email-alias-loop'

* jk/maint-send-email-alias-loop:
  send-email: detect cycles in alias expansion

14 years agoAfter renaming a section, print any trailing variable definitions
Alex Vandiver [Fri, 24 Jul 2009 21:21:44 +0000 (17:21 -0400)]
After renaming a section, print any trailing variable definitions

Signed-off-by: Alex Vandiver <alex@chmrr.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMake section_name_match start on '[', and return the length on success
Alex Vandiver [Fri, 24 Jul 2009 21:21:43 +0000 (17:21 -0400)]
Make section_name_match start on '[', and return the length on success

Signed-off-by: Alex Vandiver <alex@chmrr.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agosend-email: detect cycles in alias expansion
Jeff King [Thu, 23 Jul 2009 11:09:29 +0000 (07:09 -0400)]
send-email: detect cycles in alias expansion

With the previous code, an alias cycle like:

  $ echo 'alias a b' >aliases
  $ echo 'alias b a' >aliases
  $ git config sendemail.aliasesfile aliases
  $ git config sendemail.aliasfiletype mutt

would put send-email into an infinite loop. This patch
detects the situation and complains to the user.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoShow the presence of untracked files in the bash prompt.
Daniel Trstenjak [Wed, 22 Jul 2009 08:31:34 +0000 (10:31 +0200)]
Show the presence of untracked files in the bash prompt.

Added the envvar GIT_PS1_SHOWUNTRACKEDFILES to 'git-completion.bash'.
When set to a nonempty value, then the char '%' will be shown next
to the branch name in the bash prompt.

Signed-off-by: Daniel Trstenjak <daniel.trstenjak@science-computing.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint'
Junio C Hamano [Fri, 24 Jul 2009 16:27:09 +0000 (09:27 -0700)]
Merge branch 'maint'

* maint:
  SunOS grep does not understand -C<n> nor -e
  Fix export_marks() error handling.
  git branch: clean up detached branch handling
  git branch: avoid unnecessary object lookups
  git branch: fix performance problem
  do_one_ref(): null_sha1 check is not about broken ref

Conflicts:
Makefile

14 years agoSunOS grep does not understand -C<n> nor -e
Junio C Hamano [Fri, 24 Jul 2009 05:30:07 +0000 (22:30 -0700)]
SunOS grep does not understand -C<n> nor -e

The first "grep -C1" test in t7002 does not pass on my SunOS-5.11-i86pc,
and that is not because our way to spawn external grep is broken, but
because the native grep does not understand -C<n>.

It turns out that Peff was also using this option himself because our
Makefile doesn't do that automatically.  Brandon Casey uses SUNWspro
compiler without having to set this, and it turns out that the compiler
does not define preprocessor macro __unix__ which made him always use the
built-in grep, never an external one.

Let's be more explicit and say that we do not use external grep on Suns.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoFix export_marks() error handling.
Matthias Andree [Fri, 24 Jul 2009 08:17:13 +0000 (10:17 +0200)]
Fix export_marks() error handling.

- Don't leak one FILE * on error per export_marks() call. Found with
  cppcheck and reported by Martin Ettl.

- Abort the potentially long for(;idnums.size;) loop on write errors.

- Record error if fprintf() fails for reasons not required to set the
  stream error indicator, such as ENOMEM.

- Add a trailing full-stop to error message when fopen() fails.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit repack: keep commits hidden by a graft
Johannes Schindelin [Thu, 23 Jul 2009 15:33:49 +0000 (17:33 +0200)]
git repack: keep commits hidden by a graft

When you have grafts that pretend that a given commit has different
parents than the ones recorded in the commit object, it is dangerous
to let 'git repack' remove those hidden parents, as you can easily
remove the graft and end up with a broken repository.

So let's play it safe and keep those parent objects and everything
that is reachable by them, in addition to the grafted parents.

As this behavior can only be triggered by git pack-objects, and as that
command handles duplicate parents gracefully, we do not bother to cull
duplicated parents that may result by using both true and grafted
parents.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoAdd a test showing that 'git repack' throws away grafted-away parents
Björn Steinbrink [Thu, 23 Jul 2009 15:33:45 +0000 (17:33 +0200)]
Add a test showing that 'git repack' throws away grafted-away parents

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit branch: clean up detached branch handling
Linus Torvalds [Thu, 23 Jul 2009 19:13:48 +0000 (12:13 -0700)]
git branch: clean up detached branch handling

Make the 'show detached branch info' a routine of its own.  And in the
process, avoid the object lookup that is unnecessary if the current
branch isn't detached.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit branch: avoid unnecessary object lookups
Linus Torvalds [Thu, 23 Jul 2009 19:05:34 +0000 (12:05 -0700)]
git branch: avoid unnecessary object lookups

They can be expensive in the cold-cache case, so don't bother looking up
the commits for all branches unless we really need them for some reason.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit branch: fix performance problem
Linus Torvalds [Thu, 23 Jul 2009 17:17:04 +0000 (10:17 -0700)]
git branch: fix performance problem

'git branch' looks at _all_ the refs, and verifies them.  Which means that
during cold-cache situations with a slow disk (and lots of tags, for
example) it can take several very annoying seconds (7.5s according to a
report by Carlos R.  Mafra).

This avoids most of it by simply doing the filtering before looking up
the commits, by using the "raw" version of for_each_ref.

Reported-by: Carlos R. Mafra <crmafra2@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit svn: fix shallow clone when upstream revision is too new
Eric Wong [Mon, 20 Jul 2009 09:06:24 +0000 (02:06 -0700)]
git svn: fix shallow clone when upstream revision is too new

Thanks to Ka-Hing Cheung for the initial bug report and patch:
> git-svn uses $ra->get_latest_revnum to find out the latest
> revision, but that can be problematic, because get_latest_revnum
> returns the latest revnum in the entire repository, not
> restricted by whatever URL you used to construct $ra. So if you
> do git svn clone -r HEAD svn://blah/blah/trunk, it won't work if
> the latest checkin is in one of the branches (it will try to
> fetch a rev that doesn't exist in trunk, making the clone
> useless).

Relying on SVN::Core::INVALID_REVNUM (-1) as the "start"
argument to SVN::Ra::get_log() proved unreliable with http(s)
URLs so the result of SVN::Ra::get_latest_revnum() is used as
the "start" argument instead.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
14 years agodo_one_ref(): null_sha1 check is not about broken ref
Junio C Hamano [Thu, 23 Jul 2009 06:07:05 +0000 (23:07 -0700)]
do_one_ref(): null_sha1 check is not about broken ref

f8948e2 (remote prune: warn dangling symrefs, 2009-02-08) introduced a
more dangerous variant of for_each_ref() family that skips the check for
dangling refs, but it also made another unrelated check optional by
mistake.

The check to see if a ref points at 0{40} is not about brokenness, but is
about a possible future plan to represent a deleted ref by writing 40 "0"
in a loose ref when there is a stale version of the same ref already in
.git/packed-refs, so that we can implement deletion of a ref without
having to rewrite the packed refs file excluding the ref being deleted.

This check has to live outside of the conditional.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoconfigure.ac: properly unset NEEDS_SSL_WITH_CRYPTO when sha1 func is missing v1.6.4-rc2
Brandon Casey [Wed, 22 Jul 2009 22:20:53 +0000 (17:20 -0500)]
configure.ac: properly unset NEEDS_SSL_WITH_CRYPTO when sha1 func is missing

The empty assignment NEEDS_SSL_WITH_CRYPTO= was mistakenly paired with the
assignment NEEDS_SSL_WITH_CRYPTO=YesPlease in the "action-if-found"
parameter of the AC_CHECK_LIB macro.  The empty assignment was intended for
the "action-if-not-found" section, since in that case, the necessary sha1
hash function was not found and the internal sha1 implementation will be
used instead.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agojanitor: useless checks before free
Pierre Habouzit [Wed, 22 Jul 2009 21:51:55 +0000 (23:51 +0200)]
janitor: useless checks before free

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agojanitor: add DIV_ROUND_UP and use it.
Pierre Habouzit [Wed, 22 Jul 2009 21:34:35 +0000 (23:34 +0200)]
janitor: add DIV_ROUND_UP and use it.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agorefactor: use bitsizeof() instead of 8 * sizeof()
Pierre Habouzit [Wed, 22 Jul 2009 21:34:34 +0000 (23:34 +0200)]
refactor: use bitsizeof() instead of 8 * sizeof()

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agojanitor: use NULL and not 0 for pointers.
Pierre Habouzit [Wed, 22 Jul 2009 21:34:33 +0000 (23:34 +0200)]
janitor: use NULL and not 0 for pointers.

Brought to you thanks to coccinelle:

    ---8<----
    @@
    expression *E;
    @@
    (
      E ==
    - 0
    + NULL
    |
      E !=
    - 0
    + NULL
    |
      E =
    - 0
    + NULL
    )

    @@
    identifier f;
    type T;
    @@
    T *f(...) {
    <...
    - return 0;
    + return NULL;
    ...>
    }
    --->8----

There are a lot more hits in compat/nedmallox and compat/regex but these
are borrowed code we rather do not want to maintain our own forks for,
and this patch refrains from touching them.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit stash: modernize use of "dashed" git-XXX calls
Martin Koegler [Wed, 22 Jul 2009 05:30:58 +0000 (07:30 +0200)]
git stash: modernize use of "dashed" git-XXX calls

Replace remaining git-XXX calls with git XXX.

Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Acked-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoImprove doc for format-patch threading options.
Yann Dirson [Wed, 22 Jul 2009 21:39:31 +0000 (23:39 +0200)]
Improve doc for format-patch threading options.

This hopefully makes the relationship between threading options of
format-patch and send-email easier to grasp.

Signed-off-by: Yann Dirson <ydirson@altern.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoList send-email config options in config.txt.
Yann Dirson [Wed, 22 Jul 2009 21:39:30 +0000 (23:39 +0200)]
List send-email config options in config.txt.

Also mention deprecated aliases that do not appear in the send-email
manpage.

Signed-off-by: Yann Dirson <ydirson@altern.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoconfigure.ac: rework/fix the NEEDS_RESOLV and NEEDS_LIBGEN tests
Brandon Casey [Tue, 21 Jul 2009 20:23:06 +0000 (15:23 -0500)]
configure.ac: rework/fix the NEEDS_RESOLV and NEEDS_LIBGEN tests

The "action" parameters for these two tests were supplied incorrectly for
the way the tests were implemented.  The tests check whether a program
which calls hstrerror() or basename() successfully links when -lresolv or
-lgen are used, respectively.  A successful linking would result in
NEEDS_RESOLV or NEEDS_LIBGEN being unset, and failure would result in
setting the respective variable.

Aside from that issue, the tests did not handle the case where neither
library was necessary for accessing the functions in question.  So solve
both of these issues by re-working the two tests so that their form is like
the NEEDS_SOCKET test which attempts to link with just the c library, and
if it fails then assumes that the additional library is necessary and sets
the appropriate variable.

Also an entry in the config.mak.in file is necessary for the NEEDS_LIBGEN
variable to appear in the config.mak.autogen file with the value assigned
by the configure script.  Without it, the generated shell script would
contain a snippet like this:

   for ac_lib in ; do
      ...

which is incorrect.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint'
Junio C Hamano [Thu, 23 Jul 2009 04:56:46 +0000 (21:56 -0700)]
Merge branch 'maint'

* maint:
  Trailing whitespace and no newline fix
  diff --cc: a lost line at the beginning of the file is shown incorrectly
  combine-diff.c: fix performance problem when folding common deleted lines

14 years agoTrailing whitespace and no newline fix
SZEDER Gábor [Thu, 23 Jul 2009 00:24:38 +0000 (19:24 -0500)]
Trailing whitespace and no newline fix

If a patch adds a new line to the end of a file and this line ends with
one trailing whitespace character and has no newline, then
'--whitespace=fix' currently does not remove that trailing whitespace.

This patch fixes this by removing the check for trailing whitespace at
the end of the line at a hardcoded offset which does not take the
eventual absence of newline into account.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agodiff --cc: a lost line at the beginning of the file is shown incorrectly
Junio C Hamano [Wed, 22 Jul 2009 21:48:29 +0000 (14:48 -0700)]
diff --cc: a lost line at the beginning of the file is shown incorrectly

When combine-diff inspected the diff from one parent to the merge result,
it misinterpreted a header in the form @@ -l,k +0,0 @@.

This hunk header means that K lines were removed from the beginning of the
file, so the lost lines must be queued to the sline that represents the
first line of the merge result, but we incremented our pointer incorrectly
and ended up queuing it to the second line, which in turn made the lossage
appear _after_ the first line.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agocombine-diff.c: fix performance problem when folding common deleted lines
Junio C Hamano [Wed, 22 Jul 2009 21:48:28 +0000 (14:48 -0700)]
combine-diff.c: fix performance problem when folding common deleted lines

For a deleted line in a patch with the parent we are looking at, the
append_lost() function finds the same line among a run of lines that were
deleted from the same location by patches from parents we previously
checked.  This is so that patches with two parents

    @@ -1,4 +1,3 @@    @@ -1,4 +1,3 @@
     one                   one
    -two                  -two
     three                 three
    -quatro               -fyra
    +four                 +four

can be coalesced into this sequence, reusing one line that describes the
removal of "two" for both parents.

   @@@ -1,4 -1,4 +1,3 @@@
     one
   --two
     three
   - quatro
    -frya
   ++four

While reading the second patch (that removes "two" and then "fyra"), after
finding where removal of the "two" matches, we need to find existing
removal of "fyra" (if exists) in the removal list, but the match has to
happen after all the existing matches (in this case "two").  The code used
a naïve O(n^2) algorithm to compute this by scanning the whole removal
list over and over again.

This patch remembers where the next scan should be started in the existing
removal list to avoid this.

Noticed by Linus Torvalds.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoFix rebase -p --onto
Greg Price [Wed, 22 Jul 2009 16:38:58 +0000 (12:38 -0400)]
Fix rebase -p --onto

In a rebase with --onto, the correct test for whether we can skip
rewriting a commit is if it is already on top of $ONTO, not $UPSTREAM.
Without --onto, this distinction does not exist and the behavior does
not change.

In a situation with two merged branches on a common base X:

 X---o---o---o---M
  \             /
   x---x---x---x

 Y

if we try to move the branches from their base on X to be based on Y,
so as to get

 X

 Y---o'--o'--o'--M'
  \             /
   x'--x'--x'--x'

then we fail.  The command `git rebase -p --onto Y X M` moves only the
first-parent chain, like so:

 X
  \
   x---x---x---x
                \
 Y---o'--o'--o'--M'

because it mistakenly drops the other branch(es) x---x---x---x from
the TODO file.  This tests and fixes this behavior.

Signed-off-by: Greg Price <price@ksplice.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit svn: fix reparenting when ugly http(s) URLs are used
Eric Wong [Mon, 20 Jul 2009 05:08:45 +0000 (22:08 -0700)]
git svn: fix reparenting when ugly http(s) URLs are used

Mishandling of http(s) in need of escaping was causing
t9118-git-svn-funky-branch-names to fail when SVN_HTTPD_PORT
 was defined.

This bug was exposed in (but not caused by)
commit 0b2af457a49e3b00d47d556d5301934d27909db8
(Fix branch detection when repository root is inaccessible)

Signed-off-by: Eric Wong <normalperson@yhbt.net>
14 years agogit svn: rename tests that had conflicting numbers
Eric Wong [Sun, 19 Jul 2009 10:08:27 +0000 (03:08 -0700)]
git svn: rename tests that had conflicting numbers

Some unrelated tests were developed simultaneously and resulted
in test numbers conflicting.  To avoid difficulty when referring
to tests via the "tXXXX" convention, rename the newer tests.

Suggested by Marc Branchaud.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
14 years agoshow: add space between multiple items
Jeff King [Sat, 18 Jul 2009 10:14:37 +0000 (06:14 -0400)]
show: add space between multiple items

When showing an annotated tag, "git show" will always
display the pointed-to object. However, it didn't separate
the two with whitespace, making it more difficult to notice
where the new object started. For example:

  $ git tag -m 'my message' foo
  $ git show foo
  tag foo
  Tagger: Jeff King <peff@peff.net>
  Date:   Fri Jul 17 18:46:25 2009 -0400

  my message
  commit 41cabf8fed2694ba33e01d64f9094f2fc5e5805a
  Author: Jeff King <peff@peff.net>
  Date:   Thu Jul 16 17:31:34 2009 -0400
  ...

This patch respects and sets the rev.shown_one member to
prepend a blank line before showing a second item. We use
this member of rev_info instead of a local flag, because the
log_tree_commit we call into for showing commits already
respects and sets that flag. Meaning that everything will be
spaced properly if you intermix commits and tags, like:

  $ git show v1.6.3 v1.6.2 HEAD

In that case, a single blank line will separate the first
tag, the commit it points to, the second tag, the commit
that one points to, and the final commit.

While we're at it, let's also support trees, so that even
something as crazy as

  $ git show HEAD^{tree} HEAD~1^{tree} HEAD

will also be spaced in an easy-to-read way. However, we
intentionally do _not_ insert blank lines for blobs, so
that specifying multiple blobs gives a strict concatenation.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoshow: suppress extra newline when showing annotated tag
Jeff King [Fri, 17 Jul 2009 23:18:34 +0000 (19:18 -0400)]
show: suppress extra newline when showing annotated tag

When showing a tag, our header parsing finishes with the
offset pointing to the newline separating the tag header
from the tag body. This means that the printed body will
always start with a newline.

However, we also add an extra newline when printing the
tagger information. This leads to an ugly double-newline:

    $ git show v1.6.3
    tag v1.6.3
    Tagger: Junio C Hamano <gitster@pobox.com>
    Date:   Wed May 6 18:16:47 2009 -0700

    GIT 1.6.3
    -----BEGIN PGP SIGNATURE-----
    ...

This patch removes the extra newline from the end of the
tagger headers. This is a better solution than suppressing
the separator newline, because it retains the behavior for
tags which have no tagger. E.g., "git show v0.99" will
continue to look like:

      $ git show v0.99
      tag v0.99

      Test-release for wider distribution.
      ...

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agopull: support rebased upstream + fetch + pull --rebase
Santi Béjar [Sun, 19 Jul 2009 07:45:16 +0000 (09:45 +0200)]
pull: support rebased upstream + fetch + pull --rebase

You cannot do a "git pull --rebase" with a rebased upstream, if you have
already run "git fetch".  Try to behave as if the "git fetch" was not run.

In other words, find the fork point of the current branch, where
the tip of upstream branch used to be, and use it as the upstream
parameter of "git rebase".

This patch computes the fork point by walking the reflog to find the first
commit which is an ancestor of the current branch.  Maybe there are
smarter ways to compute it, but this is a straight forward implementation.

Signed-off-by: Santi Béjar <santi@agolina.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot5520-pull: Test for rebased upstream + fetch + pull --rebase
Santi Béjar [Thu, 16 Jul 2009 00:09:14 +0000 (02:09 +0200)]
t5520-pull: Test for rebased upstream + fetch + pull --rebase

If your upstream has rebased you can do:

git pull --rebase

but only if you haven't fetch before.

Mark this case as test_expect_failure, in a later patch it will be
changed to test_expect_success.

Signed-off-by: Santi Béjar <santi@agolina.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>