Code

git.git
17 years agoMigrate git-am.sh to use git-rev-parse --parseopt
Pierre Habouzit [Sun, 4 Nov 2007 10:30:57 +0000 (11:30 +0100)]
Migrate git-am.sh to use git-rev-parse --parseopt

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoMigrate git-clone to use git-rev-parse --parseopt
Pierre Habouzit [Sun, 4 Nov 2007 10:30:56 +0000 (11:30 +0100)]
Migrate git-clone to use git-rev-parse --parseopt

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoMigrate git-clean.sh to use git-rev-parse --parseopt.
Pierre Habouzit [Sun, 4 Nov 2007 10:30:55 +0000 (11:30 +0100)]
Migrate git-clean.sh to use git-rev-parse --parseopt.

Also minor consistency tweaks in how errors are caught.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoUpdate git-sh-setup(1) to allow transparent use of git-rev-parse --parseopt
Pierre Habouzit [Sun, 4 Nov 2007 10:30:54 +0000 (11:30 +0100)]
Update git-sh-setup(1) to allow transparent use of git-rev-parse --parseopt

If you set OPTIONS_SPEC, git-sh-setups uses git-rev-parse --parseopt
automatically.

It also diverts usage to re-exec $0 with the -h option as parse-options.c
will catch that.

If you need git-rev-parse --parseopt to keep the `--` the user may have
passed to your command, set OPTIONS_KEEPDASHDASH to a non empty value
in your script.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoAdd a parseopt mode to git-rev-parse to bring parse-options to shell scripts.
Pierre Habouzit [Sun, 4 Nov 2007 10:30:53 +0000 (11:30 +0100)]
Add a parseopt mode to git-rev-parse to bring parse-options to shell scripts.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoMerge branch 'maint'
Junio C Hamano [Tue, 6 Nov 2007 06:03:47 +0000 (22:03 -0800)]
Merge branch 'maint'

* maint:
  Remove a couple of duplicated include
  grep with unmerged index
  git-daemon: fix remote port number in log entry
  git-svn: t9114: verify merge commit message in test
  git-svn: fix dcommit clobbering when committing a series of diffs

17 years agoFix comment in strbuf.h to use correct name strbuf_avail()
Steffen Prohaska [Sun, 4 Nov 2007 08:02:21 +0000 (09:02 +0100)]
Fix comment in strbuf.h to use correct name strbuf_avail()

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoRemove a couple of duplicated include
Marco Costalba [Sun, 4 Nov 2007 14:35:26 +0000 (15:35 +0100)]
Remove a couple of duplicated include

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogrep with unmerged index
Junio C Hamano [Tue, 6 Nov 2007 01:16:47 +0000 (17:16 -0800)]
grep with unmerged index

We called flush_grep() every time we saw an unmerged entry in
the index.  If we happen to find an unmerged entry before we saw
more than two paths, we incorrectly declared that the user had
too many non-paths options in front.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoMerge branch 'gp/maint-diffdoc' into maint
Junio C Hamano [Tue, 6 Nov 2007 02:56:55 +0000 (18:56 -0800)]
Merge branch 'gp/maint-diffdoc' into maint

* gp/maint-diffdoc:
  git-diff.txt: add section "output format" describing the diff formats

17 years agoSome better parse-options documentation.
Pierre Habouzit [Mon, 5 Nov 2007 12:03:22 +0000 (13:03 +0100)]
Some better parse-options documentation.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogit-daemon: fix remote port number in log entry
Gerrit Pape [Mon, 5 Nov 2007 09:16:22 +0000 (09:16 +0000)]
git-daemon: fix remote port number in log entry

The port number in struct sockaddr_in needs to be converted from network
byte order to host byte order (on some architectures).

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogc: --prune prunes unreferenced objects.
Junio C Hamano [Tue, 6 Nov 2007 00:39:00 +0000 (16:39 -0800)]
gc: --prune prunes unreferenced objects.

Brandon Casey correctly points out that we repack with -A without --prune
and with -a with --prune, so it is not just unreferenced loose objects
that are pruned away when the option is given.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agot3502: Disambiguate between file and rev by adding --
Brian Gernhardt [Sun, 4 Nov 2007 15:31:26 +0000 (10:31 -0500)]
t3502: Disambiguate between file and rev by adding --

On a case insensitive file system, this test fails because git-diff
doesn't know if it is asking for the file "A" or the tag "a".

Adding "--" at the end of the ambiguous commands allows the test to
finish properly.

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoAdd more tests for git-clean
Shawn Bohrer [Mon, 5 Nov 2007 04:28:12 +0000 (22:28 -0600)]
Add more tests for git-clean

Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoUse parseopts in builtin-push
Daniel Barkalow [Mon, 5 Nov 2007 03:35:37 +0000 (22:35 -0500)]
Use parseopts in builtin-push

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogit-svn: t9114: verify merge commit message in test
Eric Wong [Mon, 5 Nov 2007 11:21:48 +0000 (03:21 -0800)]
git-svn: t9114: verify merge commit message in test

It's possible that we end up with an incorrect commit message
in this test after making changes to fix the clobber bug
in dcommit.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogit-svn: fix dcommit clobbering when committing a series of diffs
Eric Wong [Mon, 5 Nov 2007 11:21:47 +0000 (03:21 -0800)]
git-svn: fix dcommit clobbering when committing a series of diffs

Our revision number sent to SVN is set to the last revision we
committed if we've made any previous commits in a dcommit
invocation.

Although our SVN Editor code uses the delta of two (old) trees
to generate information to send upstream, it'll still send
complete resultant files upstream; even if the tree they're
based against is out-of-date.

The combination of sending a file that does not include the
latest changes, but set with a revision number of a commit we
just made will cause SVN to accept the resultant file even if it
was generated against an old tree.

More trouble was caused when fixing this because we were
rebasing uncessarily at times.  We used git-diff-tree to check
the imported SVN revision against our HEAD, not the last tree we
committed to SVN.  The unnecessary rebasing caused merge commits
upstream to SVN to fail.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoSplit off the pretty print stuff into its own file
Johannes Schindelin [Sun, 4 Nov 2007 19:15:06 +0000 (19:15 +0000)]
Split off the pretty print stuff into its own file

The file commit.c got quite large, but it does not have to be: the
code concerning pretty printing is pretty well contained.  In fact,
this commit just splits it off into pretty.c, leaving commit.c with
just 672 lines.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoFix an infinite loop in sq_quote_buf().
Johannes Sixt [Sun, 4 Nov 2007 20:26:22 +0000 (21:26 +0100)]
Fix an infinite loop in sq_quote_buf().

sq_quote_buf() treats single-quotes and exclamation marks specially, but
it incorrectly parsed the input for single-quotes and backslashes.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoMerge branch 'jc/format-patch-encoding'
Junio C Hamano [Sun, 4 Nov 2007 08:28:46 +0000 (01:28 -0700)]
Merge branch 'jc/format-patch-encoding'

* jc/format-patch-encoding:
  test format-patch -s: make sure MIME content type is shown as needed
  format-patch -s: add MIME encoding header if signer's name requires so

17 years agoMerge branch 'jc/revert-merge'
Junio C Hamano [Sun, 4 Nov 2007 08:26:02 +0000 (01:26 -0700)]
Merge branch 'jc/revert-merge'

* jc/revert-merge:
  cherry-pick/revert -m: add tests
  revert/cherry-pick: work on merge commits as well

Conflicts:

builtin-revert.c

17 years agoMerge branch 'ss/mailsplit'
Junio C Hamano [Sun, 4 Nov 2007 08:17:50 +0000 (01:17 -0700)]
Merge branch 'ss/mailsplit'

* ss/mailsplit:
  Make mailsplit and mailinfo strip whitespace from the start of the input

17 years agoMerge branch 'np/pack'
Junio C Hamano [Sun, 4 Nov 2007 08:11:17 +0000 (01:11 -0700)]
Merge branch 'np/pack'

* np/pack:
  pack-objects: get rid of an ugly cast
  make the pack index version configurable

Conflicts:

builtin-pack-objects.c

17 years agoMerge branch 'jn/gitweb'
Junio C Hamano [Sun, 4 Nov 2007 08:10:08 +0000 (01:10 -0700)]
Merge branch 'jn/gitweb'

* jn/gitweb:
  gitweb: Use config file for repository description and URLs
  gitweb: Read repo config using 'git config -z -l'
  gitweb: Add tests for overriding gitweb config with repo config
  gitweb: Use href(-replay=>1, action=>...) to generate alternate views
  gitweb: Use href(-replay=>1, page=>...) to generate pagination links
  gitweb: Easier adding/changing parameters to current URL
  gitweb: Remove CGI::Carp::set_programname() call from t9500 gitweb test
  gitweb: Add 'status_str' to parse_difftree_raw_line output
  gitweb: Always set 'from_file' and 'to_file' in parse_difftree_raw_line

17 years agoMerge branch 'np/fetch'
Junio C Hamano [Sun, 4 Nov 2007 08:06:48 +0000 (01:06 -0700)]
Merge branch 'np/fetch'

* np/fetch:
  git-fetch: more terse fetch output

17 years agoMerge branch 'maint'
Junio C Hamano [Sun, 4 Nov 2007 06:50:54 +0000 (23:50 -0700)]
Merge branch 'maint'

* maint:
  RelNotes-1.5.3.5: fix typo
  Delay pager setup in git blame
  git-cvsimport: really convert underscores in branch names to dots with -u

17 years agogit-reset: do not be confused if there is nothing to reset
Johannes Schindelin [Sat, 3 Nov 2007 13:12:17 +0000 (13:12 +0000)]
git-reset: do not be confused if there is nothing to reset

The purpose of the function update_index_from_diff() (which is the
callback function we give do_diff_cache()) is to update those index
entries which differ from the given commit.

Since do_diff_cache() plays games with the in-memory index, this function
discarded the cache and reread it.

Then, back in the function read_from_tree() we wrote the index.

Of course, this broke down when there were no changes and
update_index_from_diff() was not called, and therefore the mangled index
was not discarded.

The solution is to move the index writing into the function
update_index_from_diff().

Noticed by Björn Steinbrink.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogit-clone: honor "--" to end argument parsing
Heikki Orsila [Thu, 1 Nov 2007 14:21:39 +0000 (16:21 +0200)]
git-clone: honor "--" to end argument parsing

Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
17 years agoRelNotes-1.5.3.5: fix typo
David D Kilzer [Sat, 3 Nov 2007 14:04:52 +0000 (07:04 -0700)]
RelNotes-1.5.3.5: fix typo

Signed-off-by: David D Kilzer <ddkilzer@kilzer.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogit-svn: sort the options in the --help message.
Benoit Sigoure [Sat, 3 Nov 2007 18:53:34 +0000 (19:53 +0100)]
git-svn: sort the options in the --help message.

"git svn <cmd> --help" gave options in the order they were found in a
Perl hash, which meant "randomly" to humans.

Signed-off-by: Benoit Sigoure <tsuna@lrde.epita.fr>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agobuiltin-fetch: Add "-q" as a synonym for "--quiet"
Steven Grimm [Sun, 4 Nov 2007 02:26:54 +0000 (19:26 -0700)]
builtin-fetch: Add "-q" as a synonym for "--quiet"

"-q" is the very first option described in the git-fetch manpage, and it
isn't supported.

Signed-off-by: Steven Grimm <koreth@midwinter.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoDelay pager setup in git blame
Mike Hommey [Sat, 3 Nov 2007 12:22:53 +0000 (13:22 +0100)]
Delay pager setup in git blame

This avoids to launch the pager when git blame fails for any reason.

Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogit-cvsimport: really convert underscores in branch names to dots with -u
Gerrit Pape [Sat, 3 Nov 2007 11:55:02 +0000 (11:55 +0000)]
git-cvsimport: really convert underscores in branch names to dots with -u

The documentation states for the -u option that underscores in tag and
branch names are converted to dots, but this was actually implemented
for the tag names only.

Kurt Roeckx reported this through
 http://bugs.debian.org/446495

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoerrors: "strict subset" -> "ancestor"
J. Bruce Fields [Sat, 3 Nov 2007 02:39:44 +0000 (22:39 -0400)]
errors: "strict subset" -> "ancestor"

The term "ancestor" is a bit more intuitive (and more consistent with
the documentation) than the term "strict subset".

Also, remove superfluous "ref", capitalize, and add some carriage
returns, changing:

    error: remote 'refs/heads/master' is not a strict subset of local ref 'refs/heads/master'. maybe you are not up-to-date and need to pull first?
    error: failed to push to 'ssh://linux-nfs.org/~bfields/exports/git.git'

to:

    error: remote 'refs/heads/master' is not an ancestor of
    local 'refs/heads/master'.
    Maybe you are not up-to-date and need to pull first?
    error: failed to push to 'ssh://linux-nfs.org/~bfields/exports/git.git'

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogit-fetch: more terse fetch output
Nicolas Pitre [Sat, 3 Nov 2007 05:32:48 +0000 (01:32 -0400)]
git-fetch: more terse fetch output

This makes the fetch output much more terse and prettier on a 80 column
display, based on a consensus reached on the mailing list.  Here's an
example output:

Receiving objects: 100% (5439/5439), 1.60 MiB | 636 KiB/s, done.
Resolving deltas: 100% (4604/4604), done.
From git://git.kernel.org/pub/scm/git/git
 ! [rejected]        html -> origin/html  (non fast forward)
   136e631..f45e867  maint -> origin/maint  (fast forward)
   9850e2e..44dd7e0  man -> origin/man  (fast forward)
   3e4bb08..e3d6d56  master -> origin/master  (fast forward)
   fa3665c..536f64a  next -> origin/next  (fast forward)
 + 4f6d9d6...768326f pu -> origin/pu  (forced update)
 * [new branch]      todo -> origin/todo

Some portions of this patch have been extracted from earlier proposals
by Jeff King and Shawn Pearce.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogitweb: Use config file for repository description and URLs
Jakub Narebski [Fri, 2 Nov 2007 23:41:20 +0000 (00:41 +0100)]
gitweb: Use config file for repository description and URLs

Allow to use configuration variable gitweb.description for repository
description if there is no $GIT_DIR/description file, and multivalued
configuration variable gitweb.url for URLs of a project (to clone or
fetch from) if there is no $GIT_DIR/cloneurl file.

While repository description is shown in the projects list page, so it
is better to use file and not config variable for performance, it is I
think better to use gitweb.url for URLs (as it is shown only on
project summary page).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogitweb: Read repo config using 'git config -z -l'
Jakub Narebski [Fri, 2 Nov 2007 23:41:19 +0000 (00:41 +0100)]
gitweb: Read repo config using 'git config -z -l'

Change git_get_project_config to run git-config only once per
repository, without changing its signature (its calling convention).
This means for example that it returns 'true' or 'false' when called
with second argument '--bool', and not true or false value.

Instead of calling 'git config [<type>] --get gitweb.<key>' once for
each config variable, call 'git config -z -l' only once, parsing and
saving its output to %config variable.  This makes possible to add new
per repository configuration without paying cost of forking once per
variable checked.  We can now allow repository description and
repository URLs to be stored in config file without badly affecting
gitweb performance.

For now only configuration variables for 'gitweb' section are stored.

Multiple values for single configuration variable are stored as
anonymous array reference; configuration variable with no value is
stored as undef.

Converting configuration variable values to boolean or integer value
are done in Perl.  Results differ from git-config in the fact that no
conversion error is ever raised.  For boolean values no value, 'true'
(any case) and 'false' (any case) are considered true, numbers are
true if not zero; all other values (even invalid for bool) are
considered false.  For integer values value suffix of 'k', 'm', or 'g'
following decimal number will cause the value to be multiplied by
1024, 1048576, or 1073741824; other values are returned as-is, only
whitespace stripped.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogitweb: Add tests for overriding gitweb config with repo config
Jakub Narebski [Fri, 2 Nov 2007 23:41:18 +0000 (00:41 +0100)]
gitweb: Add tests for overriding gitweb config with repo config

Make blame view and snapshot support overridable by repository
config. Test tree view with both features disabled, and with both
features enabled.

Test with features enabled also tests multiple formats snapshot
support (in tree view).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agotest format-patch -s: make sure MIME content type is shown as needed
Junio C Hamano [Sat, 3 Nov 2007 00:55:31 +0000 (17:55 -0700)]
test format-patch -s: make sure MIME content type is shown as needed

Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agocherry-pick/revert -m: add tests
Junio C Hamano [Sat, 3 Nov 2007 00:25:24 +0000 (17:25 -0700)]
cherry-pick/revert -m: add tests

This adds a new test to check cherry-pick/revert of a merge
commit.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoMerge branch 'maint'
Junio C Hamano [Fri, 2 Nov 2007 23:56:42 +0000 (16:56 -0700)]
Merge branch 'maint'

* maint:
  Fixing path quoting in git-rebase
  Remove unecessary hard-coding of EDITOR=':' VISUAL=':' in some test suites.
  Documentation: quote commit messages consistently.
  Remove escaping of '|' in manpage option sections

17 years agoMerge branch 'ph/parseopt'
Junio C Hamano [Fri, 2 Nov 2007 23:42:23 +0000 (16:42 -0700)]
Merge branch 'ph/parseopt'

* ph/parseopt: (24 commits)
  gc: use parse_options
  Fixed a command line option type for builtin-fsck.c
  Make builtin-pack-refs.c use parse_options.
  Make builtin-name-rev.c use parse_options.
  Make builtin-count-objects.c use parse_options.
  Make builtin-fsck.c use parse_options.
  Update manpages to reflect new short and long option aliases
  Make builtin-for-each-ref.c use parse-opts.
  Make builtin-symbolic-ref.c use parse_options.
  Make builtin-update-ref.c use parse_options
  Make builtin-revert.c use parse_options.
  Make builtin-describe.c use parse_options
  Make builtin-branch.c use parse_options.
  Make builtin-mv.c use parse-options
  Make builtin-rm.c use parse_options.
  Port builtin-add.c to use the new option parser.
  parse-options: allow callbacks to take no arguments at all.
  parse-options: Allow abbreviated options when unambiguous
  Add shortcuts for very often used options.
  parse-options: make some arguments optional, add callbacks.
  ...

Conflicts:

Makefile
builtin-add.c

17 years agoMerge branch 'np/progress'
Junio C Hamano [Fri, 2 Nov 2007 23:27:37 +0000 (16:27 -0700)]
Merge branch 'np/progress'

* np/progress:
  Show total transferred as part of throughput progress
  make sure throughput display gets updated even if progress doesn't move
  return the prune-packed progress display to the inner loop
  add throughput display to git-push
  add some copyright notice to the progress display code
  add throughput display to index-pack
  add throughput to progress display
  relax usage of the progress API
  make struct progress an opaque type
  prune-packed: don't call display_progress() for every file
  Stop displaying "Pack pack-$ID created." during git-gc
  Teach prune-packed to use the standard progress meter
  Change 'Deltifying objects' to 'Compressing objects'
  fix for more minor memory leaks
  fix const issues with some functions
  pack-objects.c: fix some global variable abuse and memory leaks
  pack-objects: no delta possible with only one object in the list
  cope with multiple line breaks within sideband progress messages
  more compact progress display

17 years agoFixing path quoting in git-rebase
Jonathan del Strother [Wed, 17 Oct 2007 09:31:35 +0000 (10:31 +0100)]
Fixing path quoting in git-rebase

git-rebase used to fail when run from a path containing a space.

Signed-off-by: Jonathan del Strother <jon.delStrother@bestbefore.tv>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
17 years agoMerge branch 'br/gccfix'
Junio C Hamano [Fri, 2 Nov 2007 23:14:00 +0000 (16:14 -0700)]
Merge branch 'br/gccfix'

* br/gccfix:
  transport.c: squelch a gcc 4.0.1 complaint about an uninitialized variable

17 years agoMerge branch 'gp/maint-diffdoc'
Junio C Hamano [Fri, 2 Nov 2007 23:12:04 +0000 (16:12 -0700)]
Merge branch 'gp/maint-diffdoc'

* gp/maint-diffdoc:
  git-diff.txt: add section "output format" describing the diff formats

17 years agoMerge branch 'bk/maint-cvsexportcommit' into maint
Junio C Hamano [Fri, 2 Nov 2007 22:40:54 +0000 (15:40 -0700)]
Merge branch 'bk/maint-cvsexportcommit' into maint

* bk/maint-cvsexportcommit:
  cvsexportcommit: fix for commits that do not have parents

17 years agoRemove unecessary hard-coding of EDITOR=':' VISUAL=':' in some test suites.
Kristian Høgsberg [Fri, 2 Nov 2007 15:33:07 +0000 (11:33 -0400)]
Remove unecessary hard-coding of EDITOR=':' VISUAL=':' in some test suites.

They are already set and exoprted by sourcing ./test-lib.sh
in all test scripts.

Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoDocumentation: quote commit messages consistently.
Sergei Organov [Fri, 2 Nov 2007 17:12:57 +0000 (20:12 +0300)]
Documentation: quote commit messages consistently.

Documentation quotes commit messages 14 times with double-quotes, and 7
times with single-quotes. The patch turns everything to double-quotes.

A nice side effect is that documentation becomes more Windoze-friendly
as AFAIK single quotes won't work there.

Signed-off-by: Sergei Organov <osv@javad.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoRemove escaping of '|' in manpage option sections
Jonas Fonseca [Fri, 2 Nov 2007 09:10:11 +0000 (10:10 +0100)]
Remove escaping of '|' in manpage option sections

The escaped were ending up verbatim in the generated documentation.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agotransport.c: squelch a gcc 4.0.1 complaint about an uninitialized variable
Blake Ramsdell [Fri, 2 Nov 2007 02:38:22 +0000 (19:38 -0700)]
transport.c: squelch a gcc 4.0.1 complaint about an uninitialized variable

The variable is always set if it is going to be used; gcc just does
not notice it.

Signed-off-by: Blake Ramsdell <blaker@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoMake mailsplit and mailinfo strip whitespace from the start of the input
Simon Sasburg [Thu, 1 Nov 2007 22:57:45 +0000 (23:57 +0100)]
Make mailsplit and mailinfo strip whitespace from the start of the input

Signed-off-by: Simon Sasburg <Simon.Sasburg@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agopack-objects: get rid of an ugly cast
Nicolas Pitre [Fri, 2 Nov 2007 03:43:24 +0000 (23:43 -0400)]
pack-objects: get rid of an ugly cast

... when calling write_idx_file().

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agomake the pack index version configurable
Nicolas Pitre [Fri, 2 Nov 2007 03:26:04 +0000 (23:26 -0400)]
make the pack index version configurable

It is a good idea to use pack index version 2 all the time since it has
proper protection against propagation of certain pack corruptions when
repacking which is not possible with index version 1, as demonstrated
in test t5302.

Hence this config option.

The default is still pack index version 1.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogc: use parse_options
James Bowes [Fri, 2 Nov 2007 01:02:27 +0000 (21:02 -0400)]
gc: use parse_options

Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogitweb: Use href(-replay=>1, action=>...) to generate alternate views
Jakub Narebski [Thu, 1 Nov 2007 12:06:29 +0000 (13:06 +0100)]
gitweb: Use href(-replay=>1, action=>...) to generate alternate views

Use href(action=>..., -replay=>1) to generate links to alternate views
of current page in the $formats_nav (bottom) part of page_nav
navigation bar.  This form is used only when all parameters are
repeated, and when the replay form is shorter.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogitweb: Use href(-replay=>1, page=>...) to generate pagination links
Jakub Narebski [Thu, 1 Nov 2007 12:06:28 +0000 (13:06 +0100)]
gitweb: Use href(-replay=>1, page=>...) to generate pagination links

Use href(-replay=>1, page=>$page-1) and href(-replay=>1, page=>$page+1)
to generate previous page and next page links.

Generate next page link only once.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogitweb: Easier adding/changing parameters to current URL
Jakub Narebski [Thu, 1 Nov 2007 12:06:27 +0000 (13:06 +0100)]
gitweb: Easier adding/changing parameters to current URL

Add boolean option '-replay' to href() subroutine, which is used to
generate links in gitweb.  This option "replays" current URL,
overriding it with provided parameters.  It means that current value
of each CGI parameter is used unless otherwise provided.

This change is meant to make it easier to generate links which differ
from current page URL only by one parameter, for example the same view
but sorted by different column:
  href(-replay=>1, order=>"age")
or view which differs by some option, e.g. in log views
  href(-replay=>1, extra_options=>"--no-merges")
or alternate view of the same object, e.g. in the 'blob' view
  href(-replay=>1, action=>"blob_plain")

Actual use of this functionality is left for later.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogitweb: Remove CGI::Carp::set_programname() call from t9500 gitweb test
Jakub Narebski [Thu, 1 Nov 2007 13:23:16 +0000 (14:23 +0100)]
gitweb: Remove CGI::Carp::set_programname() call from t9500 gitweb test

It does appear to do nothing; gitweb is run as standalone program
and not as CGI script in this test.  This call caused problems later.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogitweb: Add 'status_str' to parse_difftree_raw_line output
Jakub Narebski [Thu, 1 Nov 2007 11:38:09 +0000 (12:38 +0100)]
gitweb: Add 'status_str' to parse_difftree_raw_line output

Add 'status_str' to diffinfo output, which stores status (also for
merge commit) as a string.  This allows for easy checking if there is
given status among all for merge commit, e.g.
  $diffinfo->{'status_str'} =~ /D/;

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogitweb: Always set 'from_file' and 'to_file' in parse_difftree_raw_line
Jakub Narebski [Thu, 1 Nov 2007 11:38:08 +0000 (12:38 +0100)]
gitweb: Always set 'from_file' and 'to_file' in parse_difftree_raw_line

Always set 'from_file' and 'to_file' keys when parsing raw diff output
format line, even if filename didn't change (file was not renamed).
This allows for simpler code.

Previously, you would have written:

  $diffinfo->{'from_file'} || $diffinfo->{'file'}

but now you can just use

  $diffinfo->{'from_file'}

as 'from_file' is always defined.

While at it, replace (for merge commits)

  $diffinfo->{'from_file'}[$i] || $diffinfo->{'to_file'}

by

  defined $diffinfo->{'from_file'}[$i] ?
          $diffinfo->{'from_file'}[$i] :
          $diffinfo->{'to_file'};

to have no problems with file named '0'.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoformat-patch -s: add MIME encoding header if signer's name requires so
Junio C Hamano [Wed, 31 Oct 2007 21:55:17 +0000 (14:55 -0700)]
format-patch -s: add MIME encoding header if signer's name requires so

When the body of the commit log message contains a non-ASCII character,
format-patch correctly emitted the encoding header to mark the resulting
message as such.  However, if the original message was fully ASCII, the
command line switch "-s" was given to add a new sign-off, and
the signer's name was not ASCII only, the resulting message would have
contained non-ASCII character but was not marked as such.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoMerge branch 'maint'
Junio C Hamano [Fri, 2 Nov 2007 00:09:08 +0000 (17:09 -0700)]
Merge branch 'maint'

* maint:
  git-format-patch.txt: fix explanation of an example.
  git-filter-branch.txt: fix a typo.
  git-clone.txt: Improve --depth description.
  gitweb: Update config file example for snapshot feature in gitweb/INSTALL

17 years agogit-diff.txt: add section "output format" describing the diff formats
Gerrit Pape [Wed, 31 Oct 2007 13:59:16 +0000 (13:59 +0000)]
git-diff.txt: add section "output format" describing the diff formats

git-diff.txt includes diff-options.txt which for the -p option refers
to a section "generating patches.." which is missing from the git-diff
documentation.  This patch adapts diff-format.txt to additionally
mention the git-diff program, and includes diff-format.txt into
git-diff.txt.

Tino Keitel noticed this problem.

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoMerge branch 'bk/maint-cvsexportcommit'
Junio C Hamano [Thu, 1 Nov 2007 22:39:59 +0000 (15:39 -0700)]
Merge branch 'bk/maint-cvsexportcommit'

* bk/maint-cvsexportcommit:
  cvsexportcommit: fix for commits that do not have parents

17 years agoDo no colorify test output if stdout is not a terminal
Alex Riesen [Thu, 1 Nov 2007 14:01:58 +0000 (15:01 +0100)]
Do no colorify test output if stdout is not a terminal

like when the output is redirected into a file in a cron job.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoShow total transferred as part of throughput progress
Nicolas Pitre [Thu, 1 Nov 2007 20:59:57 +0000 (16:59 -0400)]
Show total transferred as part of throughput progress

Right now it is infeasible to offer to the user a reasonable concept
of when a clone will be complete as we aren't able to come up with
the final pack size until after we have actually transferred the
entire thing to the client.  However in many cases users can work
with a rough rule-of-thumb; for example it is somewhat well known
that git.git is about 16 MiB today and that linux-2.6.git is over
120 MiB.

We now show the total amount of data we have transferred over
the network as part of the throughput meter, organizing it in
"human friendly" terms like `ls -h` would do.  Users can glance at
this, see that the total transferred size is about 3 MiB, see the
throughput of X KiB/sec, and determine a reasonable figure of about
when the clone will be complete, assuming they know the rough size
of the source repository or are able to obtain it.

This is also a helpful indicator that there is progress being made
even if we stall on a very large object.  The thoughput meter may
remain relatively constant and the percentage complete and object
count won't be changing, but the total transferred will be increasing
as additional data is received for this object.

[from an initial proposal from Shawn O. Pearce]

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agomake sure throughput display gets updated even if progress doesn't move
Nicolas Pitre [Thu, 1 Nov 2007 20:59:56 +0000 (16:59 -0400)]
make sure throughput display gets updated even if progress doesn't move

Currently the progress/throughput display update happens only through
display_progress().  If the progress based on object count remains
unchanged because a large object is being received, the latest throughput
won't be displayed.  The display update should occur through
display_throughput() as well.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoreturn the prune-packed progress display to the inner loop
Nicolas Pitre [Thu, 1 Nov 2007 20:59:55 +0000 (16:59 -0400)]
return the prune-packed progress display to the inner loop

This reverts commit 0e549137966feb016927a827fb6e359aec8264a3 so to return
to the same state as commit b5d72f0a4cd3cce945ca0d37e4fa0ebbfcdcdb52.

On Wed, 31 Oct 2007, Shawn O. Pearce wrote:
> During my testing with a 40,000 loose object case (yea, I fully
> unpacked a git.git clone I had laying around) my system stalled
> hard in the first object directory.  A *lot* longer than 1 second.
> So I got no progress meter for a long time, and then a progress
> meter appeared on the second directory.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogit-format-patch.txt: fix explanation of an example.
Sergei Organov [Thu, 1 Nov 2007 14:21:39 +0000 (17:21 +0300)]
git-format-patch.txt: fix explanation of an example.

Signed-off-by: Sergei Organov <osv@javad.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogit-filter-branch.txt: fix a typo.
Sergei Organov [Thu, 1 Nov 2007 13:24:11 +0000 (16:24 +0300)]
git-filter-branch.txt: fix a typo.

Signed-off-by: Sergei Organov <osv@javad.com>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogit-clone.txt: Improve --depth description.
Ralf Wildenhues [Thu, 1 Nov 2007 08:46:02 +0000 (09:46 +0100)]
git-clone.txt: Improve --depth description.

Avoid abbreviation 'revs', improve the language a bit.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogitweb: Update config file example for snapshot feature in gitweb/INSTALL
Jakub Narebski [Thu, 1 Nov 2007 12:45:33 +0000 (13:45 +0100)]
gitweb: Update config file example for snapshot feature in gitweb/INSTALL

Commit a3c8ab30a54c30a6a434760bedf04548425416ef by Matt McCutchen
  "gitweb: snapshot cleanups & support for offering multiple formats"
introduced new format of $feature{'snapshot'}{'default'} value. Update
"Config file example" in gitweb/INSTALL accordingly.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoMerge branch 'js/forkexec'
Junio C Hamano [Thu, 1 Nov 2007 20:47:47 +0000 (13:47 -0700)]
Merge branch 'js/forkexec'

* js/forkexec:
  Use the asyncronous function infrastructure to run the content filter.
  Avoid a dup2(2) in apply_filter() - start_command() can do it for us.
  t0021-conversion.sh: Test that the clean filter really cleans content.
  upload-pack: Run rev-list in an asynchronous function.
  upload-pack: Move the revision walker into a separate function.
  Use the asyncronous function infrastructure in builtin-fetch-pack.c.
  Add infrastructure to run a function asynchronously.
  upload-pack: Use start_command() to run pack-objects in create_pack_file().
  Have start_command() create a pipe to read the stderr of the child.
  Use start_comand() in builtin-fetch-pack.c instead of explicit fork/exec.
  Use run_command() to spawn external diff programs instead of fork/exec.
  Use start_command() to run content filters instead of explicit fork/exec.
  Use start_command() in git_connect() instead of explicit fork/exec.
  Change git_connect() to return a struct child_process instead of a pid_t.

Conflicts:

builtin-fetch-pack.c

17 years agoMerge branch 'sp/mergetool'
Junio C Hamano [Thu, 1 Nov 2007 06:53:55 +0000 (23:53 -0700)]
Merge branch 'sp/mergetool'

* sp/mergetool:
  mergetool: avoid misleading message "Resetting to default..."
  mergetool: add support for ECMerge
  mergetool: use path to mergetool in config var mergetool.<tool>.path

17 years agoMerge branch 'sp/help'
Junio C Hamano [Thu, 1 Nov 2007 06:53:51 +0000 (23:53 -0700)]
Merge branch 'sp/help'

* sp/help:
  shell should call the new setup_path() to setup $PATH
  include $PATH in generating list of commands for "help -a"
  use only the $PATH for exec'ing git commands
  list_commands(): simplify code by using chdir()
  "current_exec_path" is a misleading name, use "argv_exec_path"
  remove unused/unneeded "pattern" argument of list_commands
  "git" returns 1; "git help" and "git help -a" return 0

17 years agoMerge branch 'kh/commit'
Junio C Hamano [Thu, 1 Nov 2007 06:53:22 +0000 (23:53 -0700)]
Merge branch 'kh/commit'

* kh/commit:
  Export rerere() and launch_editor().
  Introduce entry point add_interactive and add_files_to_cache
  Enable wt-status to run against non-standard index file.
  Enable wt-status output to a given FILE pointer.

17 years agocvsexportcommit: fix for commits that do not have parents
Brad King [Wed, 31 Oct 2007 20:55:13 +0000 (16:55 -0400)]
cvsexportcommit: fix for commits that do not have parents

Previously commits without parents would fail to export with a
message indicating that the commits had more than one parent.
Instead we should use the --root option for git-diff-tree in
place of a parent.

Signed-off-by: Brad King <brad.king@kitware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoMerge branch 'maint' to catch up with 1.5.3.5
Junio C Hamano [Wed, 31 Oct 2007 21:13:25 +0000 (14:13 -0700)]
Merge branch 'maint' to catch up with 1.5.3.5

17 years agoGIT 1.5.3.5 v1.5.3.5
Junio C Hamano [Wed, 31 Oct 2007 19:20:05 +0000 (12:20 -0700)]
GIT 1.5.3.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoMerge branch 'maint' into HEAD
Junio C Hamano [Wed, 31 Oct 2007 04:44:43 +0000 (21:44 -0700)]
Merge branch 'maint' into HEAD

* maint:
  Update GIT 1.5.3.5 Release Notes
  git-rebase--interactive.sh: Make 3-way merge strategies work for -p.
  git-rebase--interactive.sh: Don't pass a strategy to git-cherry-pick.
  Fix --strategy parsing in git-rebase--interactive.sh
  Make merge-recursive honor diff.renamelimit
  cherry-pick/revert: more compact user direction message
  core-tutorial: Use new syntax for git-merge.
  git-merge: document but discourage the historical syntax
  Prevent send-pack from segfaulting (backport from 'master')
  Documentation/git-cvsexportcommit.txt: s/mgs/msg/ in example

Conflicts:

git-rebase--interactive.sh

17 years agoMerge branch 'nd/worktree' into HEAD
Junio C Hamano [Wed, 31 Oct 2007 04:38:11 +0000 (21:38 -0700)]
Merge branch 'nd/worktree' into HEAD

* nd/worktree:
  git-sh-setup.sh: use "git rev-parse --show-cdup" to check for SUBDIRECTORY_OK

17 years agoMerge branch 'cc/skip' into HEAD
Junio C Hamano [Wed, 31 Oct 2007 04:38:07 +0000 (21:38 -0700)]
Merge branch 'cc/skip' into HEAD

* cc/skip:
  Bisect: add "skip" to the short usage string.
  Bisect run: "skip" current commit if script exit code is 125.
  Bisect: add a "bisect replay" test case.
  Bisect: add "bisect skip" to the documentation.
  Bisect: refactor "bisect_{bad,good,skip}" into "bisect_state".
  Bisect: refactor some logging into "bisect_write".
  Bisect: refactor "bisect_write_*" functions.
  Bisect: implement "bisect skip" to mark untestable revisions.
  Bisect: fix some white spaces and empty lines breakages.
  rev-list documentation: add "--bisect-all".
  rev-list: implement --bisect-all

17 years agoMerge branch 'jk/send-pack' into HEAD
Junio C Hamano [Wed, 31 Oct 2007 04:38:04 +0000 (21:38 -0700)]
Merge branch 'jk/send-pack' into HEAD

* jk/send-pack:
  t5516: test update of local refs on push
  send-pack: don't update tracking refs on error

17 years agoMerge branch 'lt/rename' into HEAD
Junio C Hamano [Wed, 31 Oct 2007 04:38:00 +0000 (21:38 -0700)]
Merge branch 'lt/rename' into HEAD

* lt/rename:
  Do the fuzzy rename detection limits with the exact renames removed
  Fix ugly magic special case in exact rename detection
  Do exact rename detection regardless of rename limits
  Do linear-time/space rename logic for exact renames
  copy vs rename detection: avoid unnecessary O(n*m) loops
  Ref-count the filespecs used by diffcore
  Split out "exact content match" phase of rename detection
  Add 'diffcore.h' to LIB_H

17 years agoMerge branch 'jn/web' into HEAD
Junio C Hamano [Wed, 31 Oct 2007 04:37:58 +0000 (21:37 -0700)]
Merge branch 'jn/web' into HEAD

* jn/web:
  gitweb: Fix and simplify "split patch" detection

17 years agoMerge branch 'ds/gitweb' into HEAD
Junio C Hamano [Wed, 31 Oct 2007 04:37:55 +0000 (21:37 -0700)]
Merge branch 'ds/gitweb' into HEAD

* ds/gitweb:
  gitweb: Use chop_and_escape_str in more places.
  gitweb: Refactor abbreviation-with-title-attribute code.
  gitweb: Provide title attributes for abbreviated author names.

17 years agoMerge branch 'js/rebase' into HEAD
Junio C Hamano [Wed, 31 Oct 2007 04:37:51 +0000 (21:37 -0700)]
Merge branch 'js/rebase' into HEAD

* js/rebase:
  Fixing path quoting in git-rebase

17 years agoNo longer install git-svnimport, move to contrib/examples
Gerrit Pape [Tue, 30 Oct 2007 14:24:27 +0000 (14:24 +0000)]
No longer install git-svnimport, move to contrib/examples

This has been proposed for a few times without much reaction
from the list.  Actually remove it to see who screams.

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoUpdate GIT 1.5.3.5 Release Notes
Junio C Hamano [Wed, 31 Oct 2007 04:32:49 +0000 (21:32 -0700)]
Update GIT 1.5.3.5 Release Notes

Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogit-rebase--interactive.sh: Make 3-way merge strategies work for -p.
Björn Steinbrink [Wed, 31 Oct 2007 02:20:32 +0000 (03:20 +0100)]
git-rebase--interactive.sh: Make 3-way merge strategies work for -p.

git-rebase--interactive.sh used to pass all parents of a merge commit to
git-merge, which means that we have at least 3 heads to merge: HEAD,
first parent and second parent. So 3-way merge strategies like recursive
wouldn't work.

Fortunately, we have checked out the first parent right before the merge
anyway, so that is HEAD. Therefore we can drop simply it from the list
of parents, making 3-way strategies work for merge commits with only
two parents.

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogit-rebase--interactive.sh: Don't pass a strategy to git-cherry-pick.
Björn Steinbrink [Wed, 31 Oct 2007 02:20:31 +0000 (03:20 +0100)]
git-rebase--interactive.sh: Don't pass a strategy to git-cherry-pick.

git-cherry-pick doesn't support a strategy paramter, so don't pass one.
This means that --strategy for interactive rebases is a no-op for
anything but merge commits, but that's still better than being broken. A
correct fix would probably need to port the --merge behaviour from plain
git-rebase.sh, but I have no clue how to integrate that cleanly.

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoFix --strategy parsing in git-rebase--interactive.sh
Björn Steinbrink [Wed, 31 Oct 2007 02:20:30 +0000 (03:20 +0100)]
Fix --strategy parsing in git-rebase--interactive.sh

For the --strategy/-s option, git-rebase--interactive.sh dropped the
parameter which it was trying to parse.

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoMake merge-recursive honor diff.renamelimit
Lars Hjemli [Tue, 25 Sep 2007 06:36:38 +0000 (08:36 +0200)]
Make merge-recursive honor diff.renamelimit

It might be a sign of source code management gone bad, but when two branches
has diverged almost beyond recognition and time has come for the branches to
merge, the user is going to need all the help his tool can give him. Honoring
diff.renamelimit has great potential as a painkiller in such situations.

The painkiller effect could have been achieved by e.g. 'merge.renamelimit',
but the flexibility gained by a separate option is questionable: our user
would probably expect git to detect renames equally good when merging as
when diffing (I known I did).

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agocherry-pick/revert: more compact user direction message
Nicolas Pitre [Tue, 30 Oct 2007 19:59:24 +0000 (15:59 -0400)]
cherry-pick/revert: more compact user direction message

A failed cherry-pick (and friend) currently says:

|Automatic cherry-pick failed.  After resolving the conflicts,
|mark the corrected paths with 'git-add <paths>'
|and commit the result.

This can obviously be displayed on two lines only.
While at it, change "git-add" to "git add".

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agocore-tutorial: Use new syntax for git-merge.
Sergei Organov [Tue, 30 Oct 2007 19:54:02 +0000 (22:54 +0300)]
core-tutorial: Use new syntax for git-merge.

"git-merge <msg> HEAD <other branches>" is still supported but
we shouldn't encourage its use.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agogit-merge: document but discourage the historical syntax
Junio C Hamano [Tue, 30 Oct 2007 18:54:11 +0000 (11:54 -0700)]
git-merge: document but discourage the historical syntax

Historically "git merge" took its command line arguments in a
rather strange order.  Document the historical syntax, and also
document clearly that it is not encouraged in new scripts.

There is no reason to deprecate the historical syntax, as the
current code can sanely tell which syntax the caller is using,
and existing scripts by people do use the historical syntax.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoPrevent send-pack from segfaulting (backport from 'master')
Junio C Hamano [Tue, 30 Oct 2007 18:30:43 +0000 (11:30 -0700)]
Prevent send-pack from segfaulting (backport from 'master')

4491e62ae932d5774f628d1bd3be663c11058a73 (Prevent send-pack from
segfaulting when a branch doesn't match) is hereby cherry-picked
back to 'maint'.

If we can't find a source match, and we have no destination, we
need to abort the match function early before we try to match
the destination against the remote.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 years agoFixed a command line option type for builtin-fsck.c
Emil Medve [Tue, 30 Oct 2007 19:15:21 +0000 (14:15 -0500)]
Fixed a command line option type for builtin-fsck.c

The typo was introduced by 5ac0a2063e8f824f6e8ffb4d18de74c55aae7131
(Make builtin-fsck.c use parse_options.)

Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Acked-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>