Code

git.git
16 years agorev-parse --verify: do not output anything on error
Christian Couder [Sun, 11 May 2008 16:28:25 +0000 (18:28 +0200)]
rev-parse --verify: do not output anything on error

Before this patch, when "git rev-parse --verify" was passed at least one
good rev and then anything, it would output something for the good rev
even if it would latter exit on error.

With this patch, we only output something if everything is ok.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agorev-parse: fix using "--default" with "--verify"
Christian Couder [Sun, 11 May 2008 16:27:36 +0000 (18:27 +0200)]
rev-parse: fix using "--default" with "--verify"

Before this patch, something like:

$ git rev-parse --verify HEAD --default master

did not work, while:

$ git rev-parse --default master --verify HEAD

worked.

This patch fixes that, so that they both work (assuming
HEAD and master can be parsed).

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agorev-parse: add test script for "--verify"
Christian Couder [Sun, 11 May 2008 16:27:10 +0000 (18:27 +0200)]
rev-parse: add test script for "--verify"

This patch documents the current behavior of "git rev-parse --verify".

This command is tested both with and without the "--quiet" and
"--default" options.

This shows some problems with the current behavior that will be fixed
in latter patches:

- in case of errors, there should be no good rev output on
stdout,
- with "--default" one test case is broken

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoAdd svn-compatible "blame" output format to git-svn
Steven Grimm [Sun, 11 May 2008 05:11:18 +0000 (22:11 -0700)]
Add svn-compatible "blame" output format to git-svn

git-svn blame produced output in the format of git blame; in environments
where there are scripts that read the output of svn blame, it's useful
to be able to use them with the output of git-svn. The git-compatible
format is still available using the new "--git-format" option.

This also fixes a bug in the initial git-svn blame implementation; it was
bombing out on uncommitted local changes.

Signed-off-by: Steven Grimm <koreth@midwinter.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agomergetool: Make ECMerge use the settings as specified by the user in the GUI
Sebastian Schuberth [Tue, 6 May 2008 10:53:56 +0000 (12:53 +0200)]
mergetool: Make ECMerge use the settings as specified by the user in the GUI

When run from the command line, ECMerge does not automatically use the same
settings for a merge / diff that it would use when starting the GUI and loading
files manually. In the first case the built-in factory defaults would be used,
while in the second case the settings the user has specified in the GUI would
be used, which can be misleading. Specifying the "--default" command line
option changes this behavior so that always the user specfified GUI settings
are used.

Signed-off-by: Sebastian Schuberth <sschuberth@visageimaging.com>
Tested-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-format-patch: add --no-binary to omit binary changes in the patch.
Caio Marcelo de Oliveira Filho [Fri, 9 May 2008 22:55:43 +0000 (19:55 -0300)]
git-format-patch: add --no-binary to omit binary changes in the patch.

Add a new option --no-binary to git-format-patch so that no binary
changes are included in the generated patches, only notices that those
files changed.  This generate patches that cannot be applied, but still
is useful for generating mails for code review purposes.

See also: commit e47f306d4bf964def1a0b29e8f7cea419471dffd, where --binary
option was turned on by default.

Signed-off-by: Caio Marcelo de Oliveira Filho <cmarcelo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoAllow tracking branches to set up rebase by default.
Dustin Sallings [Sat, 10 May 2008 22:36:29 +0000 (15:36 -0700)]
Allow tracking branches to set up rebase by default.

Change cd67e4d4 introduced a new configuration parameter that told
pull to automatically perform a rebase instead of a merge.  This
change provides a configuration option to enable this feature
automatically when creating a new branch.

If the variable branch.autosetuprebase applies for a branch that's
being created, that branch will have branch.<name>.rebase set to true.

Signed-off-by: Dustin Sallings <dustin@spy.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-svn: fix cloning of HTTP URLs with '+' in their path
Eric Wong [Sun, 11 May 2008 00:14:49 +0000 (17:14 -0700)]
git-svn: fix cloning of HTTP URLs with '+' in their path

With this, git svn clone -s http://svn.gnome.org/svn/gtk+
is successful.

Also modified the funky rename test for this, which _does_
include escaped '+' signs for HTTP URLs.  SVN seems to accept
either "+" or "%2B" in filenames and directories (just not the
main URL), so I'll leave it alone for now.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoalloc_ref_from_str(): factor out a common pattern of alloc_ref from string
Krzysztof Kowalczyk [Sat, 10 May 2008 23:26:58 +0000 (16:26 -0700)]
alloc_ref_from_str(): factor out a common pattern of alloc_ref from string

Also fix an underallocation in walker.c::interpret_target().

Signed-off-by: Krzysztof Kowalczyk <kkowalczyk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'maint'
Junio C Hamano [Fri, 9 May 2008 03:50:03 +0000 (20:50 -0700)]
Merge branch 'maint'

* maint:
  Documentation/config.txt: Mention branch.<name>.rebase applies to "git pull"
  doc: clarify definition of "update" for git-add -u

16 years agoMerge branch 'maint-1.5.4' into maint
Junio C Hamano [Fri, 9 May 2008 03:12:44 +0000 (20:12 -0700)]
Merge branch 'maint-1.5.4' into maint

* maint-1.5.4:
  Documentation/config.txt: Mention branch.<name>.rebase applies to "git pull"
  doc: clarify definition of "update" for git-add -u

16 years agoMerge branch 'sg/merge-options' (early part)
Junio C Hamano [Fri, 9 May 2008 03:06:36 +0000 (20:06 -0700)]
Merge branch 'sg/merge-options' (early part)

* 'sg/merge-options' (early part):
  merge, pull: add '--(no-)log' command line option
  fmt-merge-msg: add '--(no-)log' options and 'merge.log' config variable
  add 'merge.stat' config variable
  merge, pull: introduce '--(no-)stat' option
  doc: moved merge.* config variables into separate merge-config.txt

16 years agoMerge branch 'db/learn-HEAD'
Junio C Hamano [Fri, 9 May 2008 03:06:23 +0000 (20:06 -0700)]
Merge branch 'db/learn-HEAD'

* db/learn-HEAD:
  Make ls-remote http://... list HEAD, like for git://...
  Make walker.fetch_ref() take a struct ref.

16 years agoMerge branch 'jn/webfeed'
Junio C Hamano [Fri, 9 May 2008 03:06:15 +0000 (20:06 -0700)]
Merge branch 'jn/webfeed'

* jn/webfeed:
  gitweb: Use feed link according to current view

16 years agoMerge branch 'cc/help'
Junio C Hamano [Fri, 9 May 2008 03:06:11 +0000 (20:06 -0700)]
Merge branch 'cc/help'

* cc/help:
  documentation: web--browse: add a note about konqueror
  documentation: help: add info about "man.<tool>.cmd" config var
  help: use "man.<tool>.cmd" as custom man viewer command
  documentation: help: add "man.<tool>.path" config variable
  help: use man viewer path from "man.<tool>.path" config var

16 years agoMerge branch 'dm/cherry-pick-s'
Junio C Hamano [Fri, 9 May 2008 03:06:06 +0000 (20:06 -0700)]
Merge branch 'dm/cherry-pick-s'

* dm/cherry-pick-s:
  Allow cherry-pick (and revert) to add signoff line

16 years agoMerge branch 'lt/dirmatch-optim'
Junio C Hamano [Fri, 9 May 2008 03:05:43 +0000 (20:05 -0700)]
Merge branch 'lt/dirmatch-optim'

* lt/dirmatch-optim:
  Optimize match_pathspec() to avoid fnmatch()

16 years agocompat-util: avoid macro redefinition warning
Johannes Sixt [Thu, 8 May 2008 07:34:49 +0000 (09:34 +0200)]
compat-util: avoid macro redefinition warning

Some systems define fopen as a macro based on compiler settings, and
unconditionally redefining it triggers a compilation warning.

16 years agocompat/fopen.c: avoid clobbering the system defined fopen macro
Brandon Casey [Wed, 7 May 2008 17:34:18 +0000 (12:34 -0500)]
compat/fopen.c: avoid clobbering the system defined fopen macro

Some systems define fopen as a macro based on compiler settings.
The previous technique for reverting to the system fopen function
by merely undefining fopen is inadequate in this case. Instead,
avoid defining fopen entirely when compiling this source file.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Tested-by: Mike Ralphson <mike@abacus.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocumentation/config.txt: Mention branch.<name>.rebase applies to "git pull"
Dustin Sallings [Thu, 8 May 2008 18:28:07 +0000 (11:28 -0700)]
Documentation/config.txt: Mention branch.<name>.rebase applies to "git pull"

Signed-off-by: Dustin Sallings <dustin@spy.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agodoc: clarify definition of "update" for git-add -u
Jeff King [Thu, 8 May 2008 17:25:06 +0000 (13:25 -0400)]
doc: clarify definition of "update" for git-add -u

The "-u" option is described only in terms of "updating"
files, which in turn is described only as "similar to what
git commit -a does". Let's be a little more specific about
what updating entails.

Suggested by Geoffrey Irving.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocumentation: bisect: add a few "git bisect run" examples
Christian Couder [Wed, 7 May 2008 23:00:54 +0000 (01:00 +0200)]
Documentation: bisect: add a few "git bisect run" examples

Before this patch, there were no "git bisect run" example.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocumentation/config.txt: Add git-gui options
Gustaf Hendeby [Thu, 8 May 2008 08:55:02 +0000 (10:55 +0200)]
Documentation/config.txt: Add git-gui options

The 'git gui' has a number of options that can be specified using the
options dialog. Sometimes it is convenient to be able to specify these
from the command line, therefor document these options.

Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se>
Acked-by: Shawn O. Pearce <speace@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocumentation: improve "add", "pull" and "format-patch" examples
Christian Couder [Wed, 7 May 2008 04:29:28 +0000 (06:29 +0200)]
Documentation: improve "add", "pull" and "format-patch" examples

Before this patch in "git-add.txt" and "git-format-patch.txt", the
commands used in the examples were "git-CMD" instead of "git CMD".
This patch fixes that.

In "git-pull.txt" only the last example had the code sample in an
asciidoc "Listing Block", and in the other two files, none.
This patch fixes that by putting all code samples in listing
blocks.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoBe more careful with objects directory permissions on clone
Mark Hills [Mon, 5 May 2008 16:46:42 +0000 (17:46 +0100)]
Be more careful with objects directory permissions on clone

Honour the setgid and umask when re-creating the objects directory
at the destination.

cpio in copy-pass mode aims to copy file permissions which causes this
problem and cannot be disabled. Be explicit by copying the directory
structure first, honouring the permissions at the destination, then copy
the files with 0444 permissions. This also avoids bugs in some versions
of cpio.

Signed-off-by: Mark Hills <mark@pogo.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'jc/lstat'
Junio C Hamano [Tue, 6 May 2008 02:16:26 +0000 (19:16 -0700)]
Merge branch 'jc/lstat'

* jc/lstat:
  diff-files: mark an index entry we know is up-to-date as such
  write_index(): optimize ce_smudge_racily_clean_entry() calls with CE_UPTODATE

16 years agoMerge branch 'bc/filter-branch'
Junio C Hamano [Tue, 6 May 2008 02:16:20 +0000 (19:16 -0700)]
Merge branch 'bc/filter-branch'

* bc/filter-branch:
  filter-branch.sh: support nearly proper tag name filtering

16 years agoMerge branch 'lh/git-file'
Junio C Hamano [Tue, 6 May 2008 02:16:16 +0000 (19:16 -0700)]
Merge branch 'lh/git-file'

* lh/git-file:
  Teach GIT-VERSION-GEN about the .git file
  Teach git-submodule.sh about the .git file
  Teach resolve_gitlink_ref() about the .git file
  Add platform-independent .git "symlink"

16 years agoMerge branch 'jk/fetch-status'
Junio C Hamano [Tue, 6 May 2008 02:16:12 +0000 (19:16 -0700)]
Merge branch 'jk/fetch-status'

* jk/fetch-status:
  git-fetch: always show status of non-tracking-ref fetches

16 years agoMerge branch 'lh/branch-merged'
Junio C Hamano [Tue, 6 May 2008 02:16:06 +0000 (19:16 -0700)]
Merge branch 'lh/branch-merged'

* lh/branch-merged:
  Add tests for `branch --[no-]merged`
  git-branch.txt: compare --contains, --merged and --no-merged
  git-branch: add support for --merged and --no-merged

16 years agoMerge branch 'pb/remote-mirror-config'
Junio C Hamano [Tue, 6 May 2008 02:15:39 +0000 (19:15 -0700)]
Merge branch 'pb/remote-mirror-config'

* pb/remote-mirror-config:
  Add a remote.*.mirror configuration option

16 years agopost-merge: Add it's not executed if merge failed.
Jörg Sommer [Mon, 5 May 2008 09:06:49 +0000 (11:06 +0200)]
post-merge: Add it's not executed if merge failed.

Signed-off-by: J��rg Sommer <joerg@alea.gnuu.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocumentation: Add create-ignore to git svn manual
Gustaf Hendeby [Sun, 4 May 2008 22:33:10 +0000 (00:33 +0200)]
Documentation: Add create-ignore to git svn manual

Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-svn: Make create-ignore use git add -f
Gustaf Hendeby [Sun, 4 May 2008 22:33:09 +0000 (00:33 +0200)]
git-svn: Make create-ignore use git add -f

When having a svn:ignore that ignores the .gitignore file the -f
option to git add must be used to avoid git complaining about adding
an ignored file and hence stop the process of creating .gitignores.

Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoINSTALL: add a note about GNU interactive tools has been renamed
Miklos Vajna [Sun, 4 May 2008 14:55:11 +0000 (16:55 +0200)]
INSTALL: add a note about GNU interactive tools has been renamed

In recent versions GNU's git has been renamed to gnuit, document this
while talking about how to resolve the conflict.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoCleanup xread() loops to use read_in_full()
Heikki Orsila [Sat, 3 May 2008 13:27:26 +0000 (16:27 +0300)]
Cleanup xread() loops to use read_in_full()

Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'maint'
Junio C Hamano [Sun, 4 May 2008 05:15:09 +0000 (22:15 -0700)]
Merge branch 'maint'

* maint:
  checkout: don't rfc2047-encode oneline on detached HEAD
  filter-branch: Documentation fix.

16 years agoMerge branch 'maint-1.5.4' into maint
Junio C Hamano [Sun, 4 May 2008 01:55:33 +0000 (18:55 -0700)]
Merge branch 'maint-1.5.4' into maint

* maint-1.5.4:
  filter-branch: Documentation fix.

16 years agocheckout: don't rfc2047-encode oneline on detached HEAD
Jeff King [Fri, 2 May 2008 14:05:36 +0000 (10:05 -0400)]
checkout: don't rfc2047-encode oneline on detached HEAD

When calling pretty_print_commit, there is an implicit
assumption that passing in a non-NULL "subject" variable
for oneline or email formats means that the output is part
of a subject and therefore "subject" to rfc2047 encoding.
This is not the desired effect when reporting the movement
of detached HEAD.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocumentation: hooks: fix missing verb in pre-applypatch description
Christian Couder [Fri, 2 May 2008 03:30:41 +0000 (05:30 +0200)]
Documentation: hooks: fix missing verb in pre-applypatch description

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agofilter-branch: Documentation fix.
Florian Ragwitz [Wed, 30 Apr 2008 07:47:43 +0000 (09:47 +0200)]
filter-branch: Documentation fix.

It's --msg-filter, not --message-filter.

Signed-off-by: Florian Ragwitz <rafl@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agolog: print log entry terminator even if the message is empty
Adam Simpkins [Tue, 29 Apr 2008 08:33:00 +0000 (01:33 -0700)]
log: print log entry terminator even if the message is empty

This eliminates a special case in the show_log() function, to help
simplify the terminator semantics.  Now show_log() always prints a
newline after the log entry when use_terminator is set, even if the log
message is empty.

This change should only affect the --pretty=tformat output, since that
was the only way to trigger this special case.

Signed-off-by: Adam Simpkins <adam@adamsimpkins.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoRemove dead code: show_log() sep argument and diff_options.msg_sep
Adam Simpkins [Tue, 29 Apr 2008 08:32:59 +0000 (01:32 -0700)]
Remove dead code: show_log() sep argument and diff_options.msg_sep

These variables were made unnecessary by commit
3969cf7db1a13a78f3b7a36d8c1084bbe0a53459.

Signed-off-by: Adam Simpkins <adam@adamsimpkins.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-svn: Same default as cvsimport when using --use-log-author
Stephen R. van den Berg [Tue, 29 Apr 2008 21:20:32 +0000 (23:20 +0200)]
git-svn: Same default as cvsimport when using --use-log-author

When using git-cvsimport, the author is inferred from the cvs commit,
e.g. cvs commit logname is foobaruser, then the author field in git
results in:

Author: foobaruser <foobaruser>

Which is not perfect, but perfectly acceptable given the circumstances.

The default git-svn import however, results in:

Author: foobaruser <foobaruser@acf43c95-373e-0410-b603-e72c3f656dc1>

When using mixes of imports, from CVS and SVN into the same git
repository, you'd like to harmonise the imports to the format cvsimport
uses.
git-svn supports an experimental option --use-log-author which currently
results in the same logentry as without that option when no From: or
Signed-off-by: is found in the logentry ($email currently ends up empty,
and hence is generated again).

This patches harmonises the result with cvsimport, and makes
git-svn --use-log-author produce:

Author: foobaruser <foobaruser>

Signed-off-by: Stephen R. van den Berg <srb@cuci.nl>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'maint'
Junio C Hamano [Wed, 30 Apr 2008 18:43:37 +0000 (11:43 -0700)]
Merge branch 'maint'

* maint:
  fetch-pack: brown paper bag fix

16 years agofetch-pack: brown paper bag fix
Junio C Hamano [Wed, 30 Apr 2008 18:42:05 +0000 (11:42 -0700)]
fetch-pack: brown paper bag fix

When I applied Linus's patch from the list by hand somehow I ended
up reversing the logic by mistake.  This fixes it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocumentation: point git-prune users to git-gc
Jeff King [Tue, 29 Apr 2008 20:45:14 +0000 (16:45 -0400)]
Documentation: point git-prune users to git-gc

Most users should be using git-gc instead of directly
calling prune. For those who really do want more information
on pruning, let's point them at git-fsck, which goes into
slightly more detail on reachability.

And since we're pointing users there, let's make sure
reflogs are mentioned in git-fsck(1).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocumentation on --git-dir and --work-tree
Liu Yubao [Mon, 28 Apr 2008 20:09:20 +0000 (04:09 +0800)]
Documentation on --git-dir and --work-tree

16 years agoMake read_in_full() and write_in_full() consistent with xread() and xwrite()
Heikki Orsila [Sun, 27 Apr 2008 18:21:58 +0000 (21:21 +0300)]
Make read_in_full() and write_in_full() consistent with xread() and xwrite()

xread() and xwrite() return ssize_t values as their native POSIX
counterparts read(2) and write(2).

To be consistent, read_in_full() and write_in_full() should also return
ssize_t values.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocumentation gitk: Describe what --merge does
Richard Quirk [Mon, 28 Apr 2008 20:58:35 +0000 (22:58 +0200)]
Documentation gitk: Describe what --merge does

Signed-off-by: Richard Quirk <richard.quirk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoUse the modern syntax of git-diff-files in t2002-checkout-cache-u.sh
Alex Riesen [Sun, 27 Apr 2008 11:31:23 +0000 (13:31 +0200)]
Use the modern syntax of git-diff-files in t2002-checkout-cache-u.sh

As a nice side effect it also fixes t2002-checkout-cache-u.sh on FreeBSD 4,
/bin/sh of which has problems interpreting "! command" construction.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoAdd otherwise missing --strict option to unpack-objects summary.
Jon Loeliger [Wed, 23 Apr 2008 21:14:30 +0000 (16:14 -0500)]
Add otherwise missing --strict option to unpack-objects summary.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-svn: detect and fail gracefully when dcommitting to a void
Matthieu Moy [Thu, 24 Apr 2008 18:06:36 +0000 (20:06 +0200)]
git-svn: detect and fail gracefully when dcommitting to a void

The command

  git svn clone (URL of an empty SVN repo here)

works, creates an empty git repository. I can perform the initial
commit there, but then, "git svn dcommit" says :

Use of uninitialized value in concatenation (.) or string at .../git-svn line 414.
Committing to  ...
Unable to determine upstream SVN information from HEAD history

I guess a correct management of the initial commit in git-svn would be
hard to implement, but at least, the error message can be improved.
First step is something like the patch below, and better would be for
"git svn clone" to warn that it won't be able to do much with the
cloned repo.

Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agomake git-status use a pager
Bart Trojanowski [Thu, 24 Apr 2008 00:57:48 +0000 (20:57 -0400)]
make git-status use a pager

make git status act similar to git log and git diff by presenting long
output in a pager.

Signed-off-by: Bart Trojanowski <bart@jukie.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'maint'
Junio C Hamano [Wed, 30 Apr 2008 06:06:30 +0000 (23:06 -0700)]
Merge branch 'maint'

* maint:
  cvsimport: always pass user data to "system" as a list
  fix reflog approxidate parsing bug
  Fix use after free() in builtin-fetch
  fetch-pack: do not stop traversing an already parsed commit
  Use "=" instead of "==" in condition as it is more portable

16 years agoMerge branch 'maint-1.5.4' into maint
Junio C Hamano [Wed, 30 Apr 2008 05:55:07 +0000 (22:55 -0700)]
Merge branch 'maint-1.5.4' into maint

* maint-1.5.4:
  cvsimport: always pass user data to "system" as a list
  fix reflog approxidate parsing bug

16 years agocvsimport: always pass user data to "system" as a list
Jeff King [Wed, 30 Apr 2008 04:36:14 +0000 (00:36 -0400)]
cvsimport: always pass user data to "system" as a list

This avoids invoking the shell. Not only is it faster, but
it prevents the possibility of interpreting our arguments in
the shell.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agofix reflog approxidate parsing bug
Jeff King [Wed, 30 Apr 2008 04:13:58 +0000 (00:13 -0400)]
fix reflog approxidate parsing bug

In get_sha1_basic, we parse a string like

  HEAD@{10 seconds ago}:path/to/file

into its constituent ref, reflog date, and path components.
We never actually munge the string itself, but instead keep
offsets into the string with their associated lengths.

When we call approxidate on the contents inside braces,
however, we pass just a string without a length. This means
that approxidate could sometimes look past the closing brace
and (erroneously) interpret the rest of the string as part
of the date.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoFix use after free() in builtin-fetch
Alex Riesen [Mon, 28 Apr 2008 20:23:35 +0000 (22:23 +0200)]
Fix use after free() in builtin-fetch

As reported by Dave Jones:

Since master.kernel.org updated to latest, I noticed that I could crash
git-fetch by doing this..

export KERNEL=/pub/scm/linux/kernel/git/
git fetch $KERNEL/torvalds/linux-2.6 master:linus

(gdb) bt
 0  0x000000349fd6d44b in free () from /lib64/libc.so.6
 1  0x000000000048f4eb in transport_unlock_pack (transport=0x7ce530) at transport.c:811
 2  0x000000349fd31b25 in exit () from /lib64/libc.so.6
 3  0x00000000004043d8 in handle_internal_command (argc=3, argv=0x7fffea4449f0) at git.c:379
 4  0x0000000000404547 in main (argc=3, argv=0x7fffea4449f0) at git.c:443
 5  0x000000349fd1c784 in __libc_start_main () from /lib64/libc.so.6
 6  0x0000000000403ef9 in ?? ()
 7  0x00007fffea4449d8 in ?? ()
 8  0x0000000000000000 in ?? ()

I then remembered, my .bashrc has this..

export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))

which is handy for showing up such bugs.

More info on this glibc feature is at http://udrepper.livejournal.com/11429.html

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agofetch-pack: do not stop traversing an already parsed commit
Linus Torvalds [Mon, 28 Apr 2008 23:27:49 +0000 (16:27 -0700)]
fetch-pack: do not stop traversing an already parsed commit

f3ec549 (fetch-pack: check parse_commit/object results, 2008-03-03)
broke common ancestor computation by stopping traversal when it sees
an already parsed commit.  This should fix it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoUse "=" instead of "==" in condition as it is more portable
Alex Riesen [Mon, 28 Apr 2008 21:09:55 +0000 (23:09 +0200)]
Use "=" instead of "==" in condition as it is more portable

At least the dash from Ubuntu's /bin/sh says:

    test: 233: ==: unexpected operator

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDie for an early EOF in a file reading loop
Heikki Orsila [Sun, 27 Apr 2008 14:07:24 +0000 (17:07 +0300)]
Die for an early EOF in a file reading loop

The resulting data is zero terminated after the read loop, but
the subsequent loop that scans for '\n' will overrun the buffer.

Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocument functions xmemdupz(), xread() and xwrite()
Heikki Orsila [Sun, 27 Apr 2008 09:48:30 +0000 (12:48 +0300)]
Document functions xmemdupz(), xread() and xwrite()

Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'maint'
Junio C Hamano [Mon, 28 Apr 2008 04:47:51 +0000 (21:47 -0700)]
Merge branch 'maint'

* maint:
  clone: detect and fail on excess parameters
  Remove 'header' from --signoff option description

16 years agoclone: detect and fail on excess parameters
Junio C Hamano [Wed, 23 Apr 2008 17:53:47 +0000 (10:53 -0700)]
clone: detect and fail on excess parameters

"git clone [options] $src $dst excess-garbage" simply ignored
excess-garbage without giving any diagnostic message.  Fix it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'maint-1.5.4' into maint
Junio C Hamano [Mon, 28 Apr 2008 04:47:38 +0000 (21:47 -0700)]
Merge branch 'maint-1.5.4' into maint

* maint-1.5.4:
  Remove 'header' from --signoff option description

16 years agoRemove 'header' from --signoff option description
Dan McGee [Sun, 27 Apr 2008 00:43:20 +0000 (19:43 -0500)]
Remove 'header' from --signoff option description

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agobash: Add completion for gitk --merge
Richard Quirk [Sun, 27 Apr 2008 15:35:10 +0000 (17:35 +0200)]
bash: Add completion for gitk --merge

Option is only completed when .git/MERGE_HEAD is present.

Signed-off-by: Richard Quirk <richard.quirk@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agorev-parse: fix --verify to error out when passed junk after a good rev
Christian Couder [Sat, 26 Apr 2008 13:19:29 +0000 (15:19 +0200)]
rev-parse: fix --verify to error out when passed junk after a good rev

Before this patch something like:

$ git rev-parse --verify <good-rev> <junk>

worked whatever junk was as long as <good-rev> could be parsed
correctly.

This patch makes "git rev-parse --verify" error out when passed
any junk after a good rev.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit checkout: add -t alias for --track
Miklos Vajna [Wed, 23 Apr 2008 23:04:48 +0000 (01:04 +0200)]
git checkout: add -t alias for --track

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agorev-parse: teach "--verify" to be quiet when using "-q" or "--quiet"
Christian Couder [Sat, 26 Apr 2008 11:57:23 +0000 (13:57 +0200)]
rev-parse: teach "--verify" to be quiet when using "-q" or "--quiet"

Currently "git rev-parse --verify <something>" is often used with
its error output redirected to /dev/null. This patch makes it
easier to do that.

The -q|--quiet option is designed to work the same way as it does
for "git symbolic-ref".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogitweb: Use feed link according to current view
Jakub Narebski [Sun, 20 Apr 2008 20:09:48 +0000 (22:09 +0200)]
gitweb: Use feed link according to current view

Michael G. Noll said in comments to the "Switching my code repository from
Subversion (SVN) to git" article (http://tinyurl.com/37v67l) in his "My
digital moleskine" blog, that one of the things he is missing in gitweb
from SVN::Web is an RSS feed with news/information of the current view
(including RSS feed for single file or directory).

This is not exactly true, as since refactoring feed generation in af6feeb
(gitweb: Refactor feed generation, make output prettier, add Atom feed,
2006-11-19), gitweb can generate feeds (RSS or Atom) for history of a
given branch, history limited to a given directory, or history of a given
file.  Nevertheless this required handcrafting the URL to get wanted RSS
feed.

This commit makes gitweb select feed links in the HTML header and in
page footer depending on current view (action).  It is more elaborate,
and I guess more correct, than simple patch adding $hash ('h')
parameter to *all* URLs, including feed links, by Jean-Baptiste Quenot

  Subject: [PATCH] gitweb: Add hash parameter in feed URL when a hash
           is specified in the current request
  Message-ID: <ae63f8b50803211138y6355fd11pa64cda50a1f53011@mail.gmail.com>

If $hash ('h') or $hash_base ('hb') parameter is a branch name
(i.e. it starts with 'refs/heads/'; all generated URLs use this form
to discriminate between tags and heads), it is used in feed URLs; if
$file_name ('f') is defined, it is used in feed URLs.  Feed title is
set according to the kind of web feed: it is either 'log' for generic
feed, 'log of <branch>', 'history of <filename>' for generic history
(using implicit or explicit HEAD, i.e. current branch) or 'history of
<filename> on <branch>'.

There are special cases: 'heads' and 'forks' views should use OPML
providing list of available feeds; 'tags' probably also should use
OPML; there is no web feed equivalent to 'search' view.  Currently all
those cases fallback to (show) default feed.  Such feed link uses
"generic" class, and is shown in slightly lighter color for
distinction.

Currently feed can have but one starting point, and does not support
negative (exclude) commit arguments.  Therefore for now for *diff
views it is chosen that feed follow the "to" part: to-name, to-commit
for 'blobdiff', 'treediff' and 'commitdiff' views.

Generating parameters for href() for feed link was separated
(refactored) into get_feed_info() subroutine.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoOptimize match_pathspec() to avoid fnmatch()
Linus Torvalds [Sat, 19 Apr 2008 21:22:38 +0000 (14:22 -0700)]
Optimize match_pathspec() to avoid fnmatch()

"git add *" is actually fundamentally different from "git add .", and
yeah, you should generally use the latter.

The reason? The argument list is actually something different from what
you think it is. For git, it's a "pathspec", so what actualy happens is
that in *both* cases, it will really traverse the whole tree, and then
match every file it finds against the pathspec.

So think of the arguments not as a file list, but as a random bunch of
patterns to match against the files you have!

Which is why the cost is actually approximately O(n*m), where "n" is the
size of the working tree, and "m" is the number of pathspecs.

So the reason "git add ." is fast is actually that "m" in that case is
just 1 (just one trivial pattern), and then "git add *" is slow because
"m" is large (lots of complicated patterns). In both cases, 'n' is the
same (== the whole set of files in your working tree).

Anyway, here's a trivial patch that doesn't change this fundamental fact,
but that avoids doing anything *expensive* until we've done some cheap
initial tests. It may or may not help your test-case, but it's pretty
simple and it matches the other git optimizations in this area (ie
"conceptually handle the general case, but optimize the simple cases where
we can exit early")

Notice how this patch doesn' actually change the fundamental O(n^2)
behaviour, but it makes it much cheaper by generally avoiding the
expensive 'fnmatch' and 'strlen/strncmp' when they are obviously not
needed.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMake ls-remote http://... list HEAD, like for git://...
Daniel Barkalow [Sat, 26 Apr 2008 19:53:12 +0000 (15:53 -0400)]
Make ls-remote ... list HEAD, like for git://...

This makes a struct ref able to represent a symref, and makes http.c
able to recognize one, and makes transport.c look for "HEAD" as a ref
in the list, and makes it dereference symrefs for the resulting ref,
if any.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMake walker.fetch_ref() take a struct ref.
Daniel Barkalow [Sat, 26 Apr 2008 19:53:09 +0000 (15:53 -0400)]
Make walker.fetch_ref() take a struct ref.

This simplifies a few things, makes a few things slightly more
complicated, but, more importantly, allows that, when struct ref can
represent a symref, http_fetch_ref() can return one.

Incidentally makes the string that http_fetch_ref() gets include "refs/"
(if appropriate), because that's how the name field of struct ref works.
As far as I can tell, the usage in walker:interpret_target() wouldn't have
worked previously, if it ever would have been used, which it wouldn't
(since the fetch process uses the hash instead of the name of the ref
there).

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agodocumentation: web--browse: add a note about konqueror
Christian Couder [Fri, 25 Apr 2008 06:25:41 +0000 (08:25 +0200)]
documentation: web--browse: add a note about konqueror

This note explains how to work around the fact that we try to use
kfmclient to launch konqueror.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agodocumentation: help: add info about "man.<tool>.cmd" config var
Christian Couder [Fri, 25 Apr 2008 06:25:35 +0000 (08:25 +0200)]
documentation: help: add info about "man.<tool>.cmd" config var

This patch also describes the current behavior for "konqueror" and
how to modify it using "man.<tool>.cmd" if needed.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agohelp: use "man.<tool>.cmd" as custom man viewer command
Christian Couder [Fri, 25 Apr 2008 06:24:58 +0000 (08:24 +0200)]
help: use "man.<tool>.cmd" as custom man viewer command

Currently "git help -m GITCMD" is restricted to a set of man viewers
defined at compile time. You can subvert the "man.<tool>.path" to
force "git help -m" to use a different man, viewer, but if you have a
man viewer whose invocation syntax does not match one of the current
tools then you would have to write a wrapper script for it.

This patch adds a git config variable "man.<tool>.cmd" which allows a
more flexible man viewer choice.

If you run "git help -m GITCMD" with the "man.viewer" config variable
set to an unrecognized tool then it will query the "man.<tool>.cmd"
config variable. If this variable exists, then the specified tool will
be treated as a custom man viewer and it will be run in a shell with
the man page name of the GITCMD added as extra parameter.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agodocumentation: help: add "man.<tool>.path" config variable
Christian Couder [Fri, 25 Apr 2008 06:24:41 +0000 (08:24 +0200)]
documentation: help: add "man.<tool>.path" config variable

This patch documents the "man.<tool>.path" configuration
variable.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agohelp: use man viewer path from "man.<tool>.path" config var
Christian Couder [Fri, 25 Apr 2008 06:24:22 +0000 (08:24 +0200)]
help: use man viewer path from "man.<tool>.path" config var

This patch implements reading values from "man.<tool>.path"
configuration variables, and using these values as pathes to
the man viewer <tool>s when lauching them.

This makes it possible to use different version of the tools
than the one on the current PATH, or maybe a custom script.

In this patch we also try to launch "konqueror" using
"kfmclient" even if a path to a konqueror binary is given
in "man.konqueror.path".

The "man_viewer_list" becomes a simple string list to simplify
things for the following patches.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoAllow cherry-pick (and revert) to add signoff line
Dan McGee [Sat, 26 Apr 2008 20:14:28 +0000 (15:14 -0500)]
Allow cherry-pick (and revert) to add signoff line

I often find myself pulling patches off of other peoples trees using
cherry-pick, and following it with an immediate 'git commit --amend -s'
command.  Eliminate the need for a double commit by allowing signoff on a
cherry-pick or revert.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'ho/shared'
Junio C Hamano [Fri, 25 Apr 2008 19:17:45 +0000 (12:17 -0700)]
Merge branch 'ho/shared'

* ho/shared:
  Make core.sharedRepository more generic

16 years agoMerge branch 'maint'
Junio C Hamano [Fri, 25 Apr 2008 05:40:02 +0000 (22:40 -0700)]
Merge branch 'maint'

* maint:
  remote: create fetch config lines with '+'
  push: allow unqualified dest refspecs to DWIM
  doc/git-gc: add a note about what is collected
  t5516: remove ambiguity test (1)
  Linked glossary from cvs-migration page
  write-tree: properly detect failure to write tree objects

16 years agoremote: create fetch config lines with '+'
Jeff King [Tue, 22 Apr 2008 11:11:13 +0000 (07:11 -0400)]
remote: create fetch config lines with '+'

Since git-remote always uses remote tracking branches, it
should be safe to always force updates of those branches.
I.e., we should generate

  fetch = +refs/heads/*:refs/remotes/$remote/*

instead of

  fetch = refs/heads/*:refs/remotes/$remote/*

This was the behavior of the perl version, which seems to
have been lost in the C rewrite.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agopush: allow unqualified dest refspecs to DWIM
Jeff King [Wed, 23 Apr 2008 09:16:06 +0000 (05:16 -0400)]
push: allow unqualified dest refspecs to DWIM

Previously, a push like:

  git push remote src:dst

would go through the following steps:

  1. check for an unambiguous 'dst' on the remote; if it
     exists, then push to that ref
  2. otherwise, check if 'dst' begins with 'refs/'; if it
     does, create a new ref
  3. otherwise, complain because we don't know where in the
     refs hierarchy to put 'dst'

However, in some cases, we can guess about the ref type of
'dst' based on the ref type of 'src'. Specifically, before
complaining we now check:

  2.5. if 'src' resolves to a ref starting with refs/heads
       or refs/tags, then prepend that to 'dst'

So now this creates a new branch on the remote, whereas it
previously failed with an error message:

  git push master:newbranch

Note that, by design, we limit this DWIM behavior only to
source refs which resolve exactly (including symrefs which
resolve to existing refs). We still complain on a partial
destination refspec if the source is a raw sha1, or a ref
expression such as 'master~10'.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'maint-1.5.4' into maint
Junio C Hamano [Fri, 25 Apr 2008 04:50:48 +0000 (21:50 -0700)]
Merge branch 'maint-1.5.4' into maint

* maint-1.5.4:
  t5516: remove ambiguity test (1)
  Linked glossary from cvs-migration page
  write-tree: properly detect failure to write tree objects

16 years agodoc/git-gc: add a note about what is collected
Jeff King [Thu, 24 Apr 2008 01:28:36 +0000 (21:28 -0400)]
doc/git-gc: add a note about what is collected

It seems to be a FAQ that people try running git-gc, and
then get puzzled about why the size of their .git directory
didn't change. This note mentions the reasons why things
might unexpectedly get kept.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agot5516: remove ambiguity test (1)
Jeff King [Wed, 23 Apr 2008 09:21:45 +0000 (05:21 -0400)]
t5516: remove ambiguity test (1)

This test tried to push into a remote with ambiguous refs in
remotes/$x/master and remotes/$y/master. However, the remote
never actually tells us about the refs/remotes hierarchy, so
we don't even see this ambiguity.

The test happened to pass because we were simply looking for
failure, and the test fails for another reason: the dst
refspec does not exist and does not begin with refs/, making
it invalid.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoLinked glossary from cvs-migration page
Matt Graham [Wed, 23 Apr 2008 13:13:51 +0000 (09:13 -0400)]
Linked glossary from cvs-migration page

Coming from CVS, I found the git glossary vital to learning git and learning
how terms in git correlate to the cvs terminology with which I am familiar.

This patch links the glossary from the cvs-migration page so cvs users will
be able to fine the glossary as soon as they start looking at git documents.

Signed-off-by: Matt Graham <mdg149@gmail.com>
Acked-by: J. Bruce Fields <bfields@fieldses.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agowrite-tree: properly detect failure to write tree objects
Junio C Hamano [Wed, 23 Apr 2008 16:47:17 +0000 (09:47 -0700)]
write-tree: properly detect failure to write tree objects

Tomasz Fortuna reported that "git commit" does not error out properly when
it cannot write tree objects out.  "git write-tree" shares the same issue,
as the failure to notice the error is deep in the logic to write tree
objects out recursively.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'maint'
Junio C Hamano [Wed, 23 Apr 2008 07:03:56 +0000 (00:03 -0700)]
Merge branch 'maint'

* maint:
  Amend git-push refspec documentation
  git-gc --prune is deprecated
  svn-git: Use binmode for reading/writing binary rev maps
  diff options documentation: refer to --diff-filter in --name-status
  Don't force imap.host to be set when imap.tunnel is set
  git-clone.txt: Adjust note to --shared for new pruning behavior of git-gc
  git-svn bug with blank commits and author file
  archive.c: format_subst - fixed bogus argument to memchr
  copy.c: copy_fd - correctly report write errors
  gitattributes: Fix subdirectory attributes specified from root directory

16 years agoMerge branch 'maint-1.5.4' into maint
Junio C Hamano [Wed, 23 Apr 2008 06:37:06 +0000 (23:37 -0700)]
Merge branch 'maint-1.5.4' into maint

* maint-1.5.4:
  svn-git: Use binmode for reading/writing binary rev maps
  diff options documentation: refer to --diff-filter in --name-status
  git-svn bug with blank commits and author file
  archive.c: format_subst - fixed bogus argument to memchr
  copy.c: copy_fd - correctly report write errors
  gitattributes: Fix subdirectory attributes specified from root directory

16 years agoAmend git-push refspec documentation
Sam Vilain [Mon, 21 Apr 2008 03:31:24 +0000 (15:31 +1200)]
Amend git-push refspec documentation

These paragraphs are a little confusing.  Also, make it clearer when
you have to specify the full name for <dst>

Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-gc --prune is deprecated
Dmitry Potapov [Mon, 14 Apr 2008 12:17:31 +0000 (16:17 +0400)]
git-gc --prune is deprecated

25ee9731c137d0a24b0f4879eb0b0cce9b77d5b0 made the '--prune' option
deprecated and removed its description from the git-gc man page. This
patch removes all references to this option from the rest of the Git
documentation.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agosvn-git: Use binmode for reading/writing binary rev maps
Michael Weber [Fri, 18 Apr 2008 13:12:04 +0000 (15:12 +0200)]
svn-git: Use binmode for reading/writing binary rev maps

Otherwise, there is a possible interaction with UTF-8 locales in
combination with PERL_UNICODE, resulting in "inconsistent size: 40" or
"read:"-type errors.

See also:
    perldoc -f binmode
    <http://perldoc.perl.org/perl581delta.html#UTF-8-no-longer-default-under-UTF-8-locales>

Signed-off-by: Michael Weber <michaelw@foldr.org>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agodiff options documentation: refer to --diff-filter in --name-status
Miklos Vajna [Tue, 22 Apr 2008 12:23:48 +0000 (14:23 +0200)]
diff options documentation: refer to --diff-filter in --name-status

git diff --name-status outputs letters, but the meaning of those letters
is documented elsewhere. Add a note to make the manpage more intuitive.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDon't force imap.host to be set when imap.tunnel is set
Jeff King [Tue, 22 Apr 2008 10:41:47 +0000 (06:41 -0400)]
Don't force imap.host to be set when imap.tunnel is set

The documentation for git-imap-send suggests a tunnel setting such as

  Tunnel = "ssh -q user@server.com /usr/bin/imapd ./Maildir 2> /dev/null"

which works wonderfully and doesn't require a username, password or port
setting.

However, git-imap-send currently requires that the imap.host variable be
set in the config even when it was unused.  This patch changes imap-send
to only require that the imap.host setting is set if imap.tunnel is not
set.  Otherwise, server.host is set to "tunnel" for reporting purposes.

Acked-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-clone.txt: Adjust note to --shared for new pruning behavior of git-gc
Brandon Casey [Thu, 3 Apr 2008 18:26:13 +0000 (13:26 -0500)]
git-clone.txt: Adjust note to --shared for new pruning behavior of git-gc

Since git-gc now always calls prune, even with --auto, unreferenced objects
may be removed by more operations than just git-gc. This is important for
clones created using --shared or --reference.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-svn bug with blank commits and author file
Thomas Guyot-Sionnest [Tue, 22 Apr 2008 10:07:47 +0000 (06:07 -0400)]
git-svn bug with blank commits and author file

When trying to import from svn using an author file, git-svn bails out
if it encounters a blank author. The attached patch changes this
behavior and allow using the author file with blanks authors.

I came across this bug while importing from a cvs2svn repo where the
initial revision (1) has a blank author. This doesn't break the behavior
of bailing out when an unknown author is encountered.

Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoarchive.c: format_subst - fixed bogus argument to memchr
Ariel Badichi [Wed, 23 Apr 2008 01:06:27 +0000 (04:06 +0300)]
archive.c: format_subst - fixed bogus argument to memchr

Also removed a superfluous test.

Signed-off-by: Ariel Badichi <abadichi@bezeqint.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>