Code

git.git
16 years agoavoid null SHA1 in oldest reflog
Jeff King [Tue, 8 Jul 2008 04:38:54 +0000 (00:38 -0400)]
avoid null SHA1 in oldest reflog

When the user specifies a ref by a reflog entry older than
one we have (e.g., "HEAD@{20 years ago"}), we issue a
warning and give them the "from" value of the oldest reflog
entry. That is, we say "we don't know what happened before
this entry, but before this we know we had some particular
SHA1".

However, the oldest reflog entry is often a creation event
such as clone or branch creation. In this case, the entry
claims that the ref went from "00000..." (the null sha1) to
the new value, and the reflog lookup returns the null sha1.

While this is technically correct (the entry tells us that
the ref didn't exist at the specified time) it is not
terribly useful to the end user. What they probably want
instead is "the oldest useful sha1 that this ref ever had".
This patch changes the behavior such that if the oldest ref
would return the null sha1, it instead returns the first
value the ref ever had.

We never discovered this problem in the test scripts because
we created "fake" reflogs that had only a specified segment
of history. This patch updates the tests with a creation
event at the beginning of history.

Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocumentation: fix broken "linkgit" links
Eric Hanchrow [Tue, 8 Jul 2008 20:02:11 +0000 (13:02 -0700)]
Documentation: fix broken "linkgit" links

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agouser-manual: typo and grammar fixes
Eric Hanchrow [Tue, 8 Jul 2008 20:00:30 +0000 (13:00 -0700)]
user-manual: typo and grammar fixes

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'qq/maint'
Junio C Hamano [Mon, 7 Jul 2008 23:42:08 +0000 (16:42 -0700)]
Merge branch 'qq/maint'

* qq/maint:
  run_command(): respect GIT_TRACE

Conflicts:

run-command.c

16 years agogitweb: Describe projects_index format in more detail
Jakub Narebski [Mon, 7 Jul 2008 22:07:53 +0000 (00:07 +0200)]
gitweb: Describe projects_index format in more detail

Update and extend information about $projects_list file format in
gitweb/README and in gitweb/INSTALL.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'js/maint-daemon-syslog'
Junio C Hamano [Mon, 7 Jul 2008 23:32:46 +0000 (16:32 -0700)]
Merge branch 'js/maint-daemon-syslog'

* js/maint-daemon-syslog:
  git daemon: avoid calling syslog() from a signal handler

16 years agoMerge branch 'maint'
Junio C Hamano [Mon, 7 Jul 2008 23:31:55 +0000 (16:31 -0700)]
Merge branch 'maint'

* maint:
  git-svn.perl: workaround assertions in svn library 1.5.0

16 years agoMerge branch 'qq/maint' (early part) into maint
Junio C Hamano [Mon, 7 Jul 2008 23:09:17 +0000 (16:09 -0700)]
Merge branch 'qq/maint' (early part) into maint

* 'qq/maint' (early part):
  git-svn.perl: workaround assertions in svn library 1.5.0
  mailinfo: feed the correct line length to decode_transfer_encoding()
  git-clone: remove leftover debugging fprintf().
  Fix "config_error_nonbool" used with value instead of key
  clone -q: honor "quiet" option over native transports.
  attribute documentation: keep EXAMPLE at end
  builtin-commit.c: Use 'git_config_string' to get 'commit.template'
  http.c: Use 'git_config_string' to clean up SSL config.
  diff.c: Use 'git_config_string' to get 'diff.external'
  convert.c: Use 'git_config_string' to get 'smudge' and 'clean'
  builtin-log.c: Use 'git_config_string' to get 'format.subjectprefix' and 'format.suffix'
  Documentation cvs: Clarify when a bare repository is needed
  Documentation: be precise about which date --pretty uses

16 years agorun_command(): respect GIT_TRACE
Johannes Schindelin [Mon, 7 Jul 2008 13:41:34 +0000 (14:41 +0100)]
run_command(): respect GIT_TRACE

When GIT_TRACE is set, the user is most likely wanting to see an external
command that is about to be executed.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-svn.perl: workaround assertions in svn library 1.5.0
Gerrit Pape [Sun, 6 Jul 2008 19:28:50 +0000 (19:28 +0000)]
git-svn.perl: workaround assertions in svn library 1.5.0

With subversion 1.5.0 (C and perl libraries) the git-svn selftest
t9101-git-svn-props.sh fails at test 25 and 26.  The following commands
cause assertions in the svn library

 $ cd deeply
 $ git-svn propget svn:ignore .
 perl: /build/buildd/subversion-1.5.0dfsg1/subversion/libsvn_ra/ra_loader.c:674: svn_ra_get_dir: Assertion `*path != '/'' failed.
 Aborted

 $ git-svn propget svn:ignore ..
 perl: /build/buildd/subversion-1.5.0dfsg1/subversion/libsvn_subr/path.c:120: svn_path_join: Assertion `is_canonical(component, clen)' failed.

With this commit, git-svn makes sure the path doesn't start with a
slash, and is not a dot, working around these assertions.

The breakage was reported by Lucas Nussbaum through
 http://bugs.debian.org/489108

Signed-off-by: Gerrit Pape <pape@smarden.org>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoUpdate draft release notes for 1.6.0
Junio C Hamano [Mon, 7 Jul 2008 08:39:28 +0000 (01:39 -0700)]
Update draft release notes for 1.6.0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'jc/rerere'
Junio C Hamano [Mon, 7 Jul 2008 09:17:28 +0000 (02:17 -0700)]
Merge branch 'jc/rerere'

* jc/rerere:
  rerere.autoupdate
  t4200: fix rerere test
  rerere: remove dubious "tail_optimization"
  git-rerere: detect unparsable conflicts
  rerere: rerere_created_at() and has_resolution() abstraction

16 years agoMerge branch 'dr/ceiling'
Junio C Hamano [Mon, 7 Jul 2008 09:17:23 +0000 (02:17 -0700)]
Merge branch 'dr/ceiling'

* dr/ceiling:
  Eliminate an unnecessary chdir("..")
  Add support for GIT_CEILING_DIRECTORIES
  Fold test-absolute-path into test-path-utils
  Implement normalize_absolute_path

Conflicts:

cache.h
setup.c

16 years agoMerge branch 'db/no-git-config'
Junio C Hamano [Mon, 7 Jul 2008 09:17:14 +0000 (02:17 -0700)]
Merge branch 'db/no-git-config'

* db/no-git-config:
  Only use GIT_CONFIG in "git config", not other programs

Conflicts:

Documentation/RelNotes-1.6.0.txt

16 years agoMerge branch 'js/import-zip'
Junio C Hamano [Mon, 7 Jul 2008 09:16:55 +0000 (02:16 -0700)]
Merge branch 'js/import-zip'

* js/import-zip:
  Add another fast-import example, this time for .zip files

16 years agoMerge branch 'maint'
Junio C Hamano [Mon, 7 Jul 2008 09:11:28 +0000 (02:11 -0700)]
Merge branch 'maint'

* maint:
  Fix grammar in git-rev-parse(1).

16 years agoMerge branch 'qq/maint'
Junio C Hamano [Mon, 7 Jul 2008 09:09:38 +0000 (02:09 -0700)]
Merge branch 'qq/maint'

* qq/maint:
  mailinfo: feed the correct line length to decode_transfer_encoding()
  git-clone: remove leftover debugging fprintf().

16 years agocompletion.bash: add 'skip' and 'run' to git-bisect
Dmitry Potapov [Wed, 2 Jul 2008 13:29:50 +0000 (17:29 +0400)]
completion.bash: add 'skip' and 'run' to git-bisect

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agomailinfo: feed the correct line length to decode_transfer_encoding()
Junio C Hamano [Mon, 7 Jul 2008 05:26:45 +0000 (22:26 -0700)]
mailinfo: feed the correct line length to decode_transfer_encoding()

When handling a MIME multipart message, multi-part boundary lines are eaten
by a call to handle_boundary() function from the main loop of handle_body(),
and after that happens, we should update the line length correctly, because
handle_boundary() udpates line[] with new data.

This was caused by a thinko in 9aa2309 (mailinfo: apply the same fix not
to lose NULs in BASE64 and QP codepaths, 2008-05-25).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-clone: remove leftover debugging fprintf().
Alex Riesen [Sun, 6 Jul 2008 22:56:49 +0000 (00:56 +0200)]
git-clone: remove leftover debugging fprintf().

Acked-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoFix grammar in git-rev-parse(1).
Mikael Magnusson [Sun, 6 Jul 2008 20:34:21 +0000 (22:34 +0200)]
Fix grammar in git-rev-parse(1).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit daemon: avoid calling syslog() from a signal handler
Johannes Schindelin [Thu, 3 Jul 2008 15:27:24 +0000 (16:27 +0100)]
git daemon: avoid calling syslog() from a signal handler

Signal handlers should never call syslog(), as that can raise signals
of its own.

Instead, call the syslog() from the master process.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge git://repo.or.cz/git-gui
Junio C Hamano [Sun, 6 Jul 2008 19:55:34 +0000 (12:55 -0700)]
Merge git://repo.or.cz/git-gui

* git://repo.or.cz/git-gui:
  git-gui: Implement "Stage/Unstage Line"
  git-gui: Don't select the wrong file if the last listed file is staged.
  git-gui: Fix accidental staged state toggle when clicking top pixel row
  git-gui: Move on to the next filename after staging/unstaging a change

16 years agoMerge branch 'qq/maint'
Junio C Hamano [Sun, 6 Jul 2008 07:35:13 +0000 (00:35 -0700)]
Merge branch 'qq/maint'

* qq/maint:
  Fix "config_error_nonbool" used with value instead of key

16 years agohg-to-git: use git init instead of git init-db
Miklos Vajna [Sun, 6 Jul 2008 03:15:20 +0000 (05:15 +0200)]
hg-to-git: use git init instead of git init-db

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agohg-to-git: rewrite "git-frotz" to "git frotz"
Miklos Vajna [Sun, 6 Jul 2008 03:15:19 +0000 (05:15 +0200)]
hg-to-git: rewrite "git-frotz" to "git frotz"

This is not just nice but necessary since git-frotz is no longer in
PATH.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agohg-to-git: abort if the project directory is not a hg repo
Miklos Vajna [Sun, 6 Jul 2008 03:15:18 +0000 (05:15 +0200)]
hg-to-git: abort if the project directory is not a hg repo

Check the exit code of the first hg command, and abort to avoid a later
ValueError exception.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agohg-to-git: avoid raising a string exception
Miklos Vajna [Sun, 6 Jul 2008 03:15:17 +0000 (05:15 +0200)]
hg-to-git: avoid raising a string exception

This fixes the following warning:
hg-to-git.py:92: DeprecationWarning: raising a string exception is deprecated

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoINSTALL: Update section about git-frotz form.
Miklos Vajna [Sun, 6 Jul 2008 04:28:41 +0000 (06:28 +0200)]
INSTALL: Update section about git-frotz form.

The old text stated that 'git-frotz' can be always used instead of 'git
frotz' which is no longer true.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoFix "config_error_nonbool" used with value instead of key
Christian Couder [Sun, 6 Jul 2008 04:10:04 +0000 (06:10 +0200)]
Fix "config_error_nonbool" used with value instead of key

The function "config_error_nonbool", that is defined in "config.c",
is used to report an error when a config key in the config file
should have a corresponding value but it hasn't.

So the parameter to this function should be the key and not the
value, because the value is undefined. And it could crash if the
value is used.

This patches fixes two occurences where the value was passed
instead of the key.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoFix "config_error_nonbool" used with value instead of key
Christian Couder [Sun, 6 Jul 2008 04:10:04 +0000 (06:10 +0200)]
Fix "config_error_nonbool" used with value instead of key

The function "config_error_nonbool", that is defined in "config.c",
is used to report an error when a config key in the config file
should have a corresponding value but it hasn't.

So the parameter to this function should be the key and not the
value, because the value is undefined. And it could crash if the
value is used.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'qq/maint'
Junio C Hamano [Sun, 6 Jul 2008 01:33:16 +0000 (18:33 -0700)]
Merge branch 'qq/maint'

* qq/maint:
  clone -q: honor "quiet" option over native transports.
  attribute documentation: keep EXAMPLE at end
  builtin-commit.c: Use 'git_config_string' to get 'commit.template'
  http.c: Use 'git_config_string' to clean up SSL config.
  diff.c: Use 'git_config_string' to get 'diff.external'
  convert.c: Use 'git_config_string' to get 'smudge' and 'clean'
  builtin-log.c: Use 'git_config_string' to get 'format.subjectprefix' and 'format.suffix'
  Documentation cvs: Clarify when a bare repository is needed
  Documentation: be precise about which date --pretty uses

Conflicts:

Documentation/gitattributes.txt

16 years agoclone -q: honor "quiet" option over native transports.
Junio C Hamano [Sun, 6 Jul 2008 00:58:50 +0000 (17:58 -0700)]
clone -q: honor "quiet" option over native transports.

The earlier built-in conversion seems to have broken "git-clone"; this
teaches the command to honor the "-q" option again when talking to the
remote end over native transports (file://, git:// and ssh://).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoattribute documentation: keep EXAMPLE at end
Junio C Hamano [Sun, 6 Jul 2008 01:14:27 +0000 (18:14 -0700)]
attribute documentation: keep EXAMPLE at end

The document gives overall definition of states in DESCRIPTION, describes
various aspects of git operations that can be influenced in EFFECTS, and
finally gives examples in the EXAMPLE section.  Archive creation however
was somehow documented after the EXAMPLE section, not insode EFFECTS.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agobuiltin-commit.c: Use 'git_config_string' to get 'commit.template'
Brian Hetro [Sat, 5 Jul 2008 05:24:40 +0000 (01:24 -0400)]
builtin-commit.c: Use 'git_config_string' to get 'commit.template'

Signed-off-by: Brian Hetro <whee@smaertness.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agohttp.c: Use 'git_config_string' to clean up SSL config.
Brian Hetro [Sat, 5 Jul 2008 05:24:44 +0000 (01:24 -0400)]
http.c: Use 'git_config_string' to clean up SSL config.

Signed-off-by: Brian Hetro <whee@smaertness.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agodiff.c: Use 'git_config_string' to get 'diff.external'
Brian Hetro [Sat, 5 Jul 2008 05:24:43 +0000 (01:24 -0400)]
diff.c: Use 'git_config_string' to get 'diff.external'

Signed-off-by: Brian Hetro <whee@smaertness.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoconvert.c: Use 'git_config_string' to get 'smudge' and 'clean'
Brian Hetro [Sat, 5 Jul 2008 05:24:42 +0000 (01:24 -0400)]
convert.c: Use 'git_config_string' to get 'smudge' and 'clean'

Signed-off-by: Brian Hetro <whee@smaertness.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agobuiltin-log.c: Use 'git_config_string' to get 'format.subjectprefix' and 'format...
Brian Hetro [Sat, 5 Jul 2008 05:24:41 +0000 (01:24 -0400)]
builtin-log.c: Use 'git_config_string' to get 'format.subjectprefix' and 'format.suffix'

Signed-off-by: Brian Hetro <whee@smaertness.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocumentation cvs: Clarify when a bare repository is needed
Matthew Ogilvie [Sat, 5 Jul 2008 04:43:41 +0000 (22:43 -0600)]
Documentation cvs: Clarify when a bare repository is needed

New users sometimes import a project and then immediately
try to use the imported repository as a central shared repository.
This provides pointers about setting up a bare repository for that
in the parts of the documentation dealing with CVS migration.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMove read_revisions_from_stdin from builtin-rev-list.c to revision.c
Adam Brewster [Sat, 5 Jul 2008 21:26:39 +0000 (17:26 -0400)]
Move read_revisions_from_stdin from builtin-rev-list.c to revision.c

Reading rev-list parameters from the command line can be reused by
commands other than rev-list.  Move this function to more "library-ish"
place to promote code reuse.

Signed-off-by: Adam Brewster <asb@bu.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoFix some warnings (on cygwin) to allow -Werror
Ramsay Jones [Thu, 3 Jul 2008 15:52:09 +0000 (16:52 +0100)]
Fix some warnings (on cygwin) to allow -Werror

When printing valuds of type uint32_t, we should use PRIu32, and should
not assume that it is unsigned int.  On 32-bit platforms, it could be
defined as unsigned long. The same caution applies to ntohl().

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocumentation: be precise about which date --pretty uses
Nikolaus Schulz [Sat, 5 Jul 2008 00:00:13 +0000 (02:00 +0200)]
Documentation: be precise about which date --pretty uses

This makes it explicit that the --pretty formats 'medium' and 'email' use the
author date (and ignore the committer date).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agomanpages: use teletype font for sample command lines
Jonathan Nieder [Thu, 3 Jul 2008 06:06:23 +0000 (01:06 -0500)]
manpages: use teletype font for sample command lines

I think that some of these uses of italics were meant to be
rendered in quotation marks, anyway.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agomanpages: italicize git subcommand names (which were in teletype font)
Jonathan Nieder [Thu, 3 Jul 2008 05:59:09 +0000 (00:59 -0500)]
manpages: italicize git subcommand names (which were in teletype font)

Italicize those git subcommand names already in teletype we missed.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agomanpages: italicize nongit command names (if they are in teletype font)
Jonathan Nieder [Thu, 3 Jul 2008 05:55:07 +0000 (00:55 -0500)]
manpages: italicize nongit command names (if they are in teletype font)

Some manual pages use teletype font to set command names. We
change them to use italics, instead.  This creates a visual
distinction between names of commands and command lines that
can be typed at the command line. It is also more consistent
with other man pages outside Git.

In this patch, the commands named are non-git commands like bash.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agomanpages: italicize gitk's name (where it was in teletype font)
Jonathan Nieder [Thu, 3 Jul 2008 05:49:55 +0000 (00:49 -0500)]
manpages: italicize gitk's name (where it was in teletype font)

The name `gitk` is sometimes meant to be entered at the command
prompt, but most uses are just referring to the program with that
name (not the incantation to start it).

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agomanpages: italicize git command names (which were in teletype font)
Jonathan Nieder [Thu, 3 Jul 2008 05:41:41 +0000 (00:41 -0500)]
manpages: italicize git command names (which were in teletype font)

The names of git commands are not meant to be entered at the
commandline; they are just names. So we render them in italics,
as is usual for command names in manpages.

Using

doit () {
  perl -e 'for (<>) { s/\`(git-[^\`.]*)\`/'\''\1'\''/g; print }'
}
for i in git*.txt config.txt diff*.txt blame*.txt fetch*.txt i18n.txt \
        merge*.txt pretty*.txt pull*.txt rev*.txt urls*.txt
do
  doit <"$i" >"$i+" && mv "$i+" "$i"
done
git diff

.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agomanpages: italicize command names
Jonathan Nieder [Thu, 3 Jul 2008 05:37:18 +0000 (00:37 -0500)]
manpages: italicize command names

This includes nongit commands like RCS 'merge'.  This patch only
italicizes names of commands if they had no formatting before.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agomanpages: italicize command names in synopses
Jonathan Nieder [Thu, 3 Jul 2008 05:36:04 +0000 (00:36 -0500)]
manpages: italicize command names in synopses

To tell command names from options in a glance.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogitdiffcore(7): fix awkward wording
Jonathan Nieder [Thu, 3 Jul 2008 05:30:25 +0000 (00:30 -0500)]
gitdiffcore(7): fix awkward wording

The phrase "diff outputs" sounds awkward to my ear (I think
"output" is meant to be used as a substantive noun.)

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocumentation: more "git-" versus "git " changes
Jonathan Nieder [Thu, 3 Jul 2008 05:28:15 +0000 (00:28 -0500)]
Documentation: more "git-" versus "git " changes

With git-commands moving out of $(bindir), it is useful to make a
clearer distinction between the git subcommand 'git-whatever' and
the command you type, `git whatever <options>`.  So we use a dash
after "git" when referring to the former and not the latter.

I already sent a patch doing this same thing, but I missed some
spots.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocumentation: rewrap to prepare for "git-" vs "git " change
Jonathan Nieder [Thu, 3 Jul 2008 05:20:21 +0000 (00:20 -0500)]
Documentation: rewrap to prepare for "git-" vs "git " change

Rewrap lines in preparation for added dashes.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-commit(1): depersonalize description
Jonathan Nieder [Thu, 3 Jul 2008 05:13:45 +0000 (00:13 -0500)]
git-commit(1): depersonalize description

The intent is to make git-commit(1) feel more like a manual page.  The
change also makes the page four words shorter.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit(1): add comma
Jonathan Nieder [Thu, 3 Jul 2008 05:08:12 +0000 (00:08 -0500)]
git(1): add comma

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agomanpages: fix bogus whitespace
Jonathan Nieder [Thu, 3 Jul 2008 05:03:54 +0000 (00:03 -0500)]
manpages: fix bogus whitespace

It's distracting.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocumentation: fix gitlinks
Jonathan Nieder [Thu, 3 Jul 2008 04:54:38 +0000 (23:54 -0500)]
Documentation: fix gitlinks

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-format-patch(1): fix stray \ in output
Jonathan Nieder [Thu, 3 Jul 2008 04:47:05 +0000 (23:47 -0500)]
git-format-patch(1): fix stray \ in output

In listing blocks (set off by rows of dashes), the usual
formatting characters of asciidoc are instead rendered verbatim.
When the escaped double-hyphen of olden days is moved into such a
block along with other formatting improvements, it becomes
backslash-dash-dash.

So we remove the backslash.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoRetire 'stupid' merge strategy
Miklos Vajna [Sat, 5 Jul 2008 14:43:51 +0000 (16:43 +0200)]
Retire 'stupid' merge strategy

As pointed out by Linus, this strategy tries to take the best merge
base, but 'recursive' just does it better. If one needs something more
than 'resolve' then he/she should really use 'recursive' and not
'stupid'.

Cf. Message-ID: <alpine.LFD.1.10.0807030947360.18105@woody.linux-foundation.org>

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoFix apply --recount handling of no-EOL line
Thomas Rast [Fri, 4 Jul 2008 19:10:14 +0000 (21:10 +0200)]
Fix apply --recount handling of no-EOL line

If a patch modifies the last line of a file that previously had no
terminating '\n', it looks like

    -old text
    \ No newline at end of file
    +new text

Hence, a '\' line does not signal the end of the hunk.  This modifies
'git apply --recount' to take this into account.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'maint'
Junio C Hamano [Fri, 4 Jul 2008 08:59:57 +0000 (01:59 -0700)]
Merge branch 'maint'

* maint:
  GIT 1.5.6.2
  Fix executable bits in t/ scripts
  Work around gcc warnings from curl headers

16 years agoGIT 1.5.6.2 v1.5.6.2
Junio C Hamano [Fri, 4 Jul 2008 08:12:54 +0000 (01:12 -0700)]
GIT 1.5.6.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoFix executable bits in t/ scripts
Junio C Hamano [Fri, 4 Jul 2008 08:38:34 +0000 (01:38 -0700)]
Fix executable bits in t/ scripts

Pointed out by Ramsay Jones.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agot4127-apply-same-fn: Avoid sed -i
Johannes Sixt [Fri, 4 Jul 2008 06:43:19 +0000 (08:43 +0200)]
t4127-apply-same-fn: Avoid sed -i

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoWork around gcc warnings from curl headers
Junio C Hamano [Fri, 4 Jul 2008 07:37:40 +0000 (00:37 -0700)]
Work around gcc warnings from curl headers

After master.k.org upgrade, I started seeing these warning messages:

    transport.c: In function 'get_refs_via_curl':
    transport.c:458: error: call to '_curl_easy_setopt_err_write_callback' declared with attribute warning: curl_easy_setopt expects a curl_write_callback argument for this option

It appears that the curl header wants to enforce the function signature
for callback function given to curl_easy_setopt() to be compatible with
that of (*curl_write_callback) or fwrite.  This patch seems to work the
issue around.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agofast-export --export-marks: fix off by one error
Junio C Hamano [Thu, 3 Jul 2008 07:25:23 +0000 (00:25 -0700)]
fast-export --export-marks: fix off by one error

The export_marks() function iterated over a (potentially sparsely
populated) hashtable, but it accessed it starting from offset 1 and one
element beyond the end.

Noticed by SungHyun Nam.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-send-email: Do not attempt to STARTTLS more than once
Thomas Rast [Wed, 2 Jul 2008 22:11:31 +0000 (00:11 +0200)]
git-send-email: Do not attempt to STARTTLS more than once

With the previous TLS patch, send-email would attempt to STARTTLS at
the beginning of every mail, despite reusing the last connection.  We
simply skip further encryption checks after successful TLS initiation.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'j6t/mingw'
Junio C Hamano [Thu, 3 Jul 2008 04:57:52 +0000 (21:57 -0700)]
Merge branch 'j6t/mingw'

* j6t/mingw: (38 commits)
  compat/pread.c: Add a forward declaration to fix a warning
  Windows: Fix ntohl() related warnings about printf formatting
  Windows: TMP and TEMP environment variables specify a temporary directory.
  Windows: Make 'git help -a' work.
  Windows: Work around an oddity when a pipe with no reader is written to.
  Windows: Make the pager work.
  When installing, be prepared that template_dir may be relative.
  Windows: Use a relative default template_dir and ETC_GITCONFIG
  Windows: Compute the fallback for exec_path from the program invocation.
  Turn builtin_exec_path into a function.
  Windows: Use a customized struct stat that also has the st_blocks member.
  Windows: Add a custom implementation for utime().
  Windows: Add a new lstat and fstat implementation based on Win32 API.
  Windows: Implement a custom spawnve().
  Windows: Implement wrappers for gethostbyname(), socket(), and connect().
  Windows: Work around incompatible sort and find.
  Windows: Implement asynchronous functions as threads.
  Windows: Disambiguate DOS style paths from SSH URLs.
  Windows: A rudimentary poll() emulation.
  Windows: Implement start_command().
  ...

16 years agoMerge branch 'maint'
Junio C Hamano [Thu, 3 Jul 2008 04:57:50 +0000 (21:57 -0700)]
Merge branch 'maint'

* maint:
  Fix describe --tags --long so it does not segfault

16 years agoMerge branch 'js/maint-clone-insteadof' into maint
Junio C Hamano [Thu, 3 Jul 2008 04:32:44 +0000 (21:32 -0700)]
Merge branch 'js/maint-clone-insteadof' into maint

* js/maint-clone-insteadof:
  clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig
  clone: respect url.insteadOf setting in global configs

16 years agoMerge branch 'jk/maint-fetch-ref-hier' into maint
Junio C Hamano [Thu, 3 Jul 2008 04:32:44 +0000 (21:32 -0700)]
Merge branch 'jk/maint-fetch-ref-hier' into maint

* jk/maint-fetch-ref-hier:
  fetch: give a hint to the user when local refs fail to update
  fetch: report local storage errors in status table

16 years agoMerge branch 'jc/maint-reset' into maint
Junio C Hamano [Thu, 3 Jul 2008 04:32:44 +0000 (21:32 -0700)]
Merge branch 'jc/maint-reset' into maint

* jc/maint-reset:
  Allow "git-reset path" when unambiguous

16 years agoFix describe --tags --long so it does not segfault
Shawn O. Pearce [Thu, 3 Jul 2008 02:32:45 +0000 (02:32 +0000)]
Fix describe --tags --long so it does not segfault

If we match a lightweight (non-annotated tag) as the name to
output and --long was requested we do not have a tag, nor do
we have a tagged object to display.  Instead we must use the
object we were passed as input for the long format display.

Reported-by: Mark Burton <markb@ordern.com>
Backtraced-by: Mikael Magnusson <mikachu@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit fetch-pack: do not complain about "no common commits" in an empty repo
Johannes Schindelin [Wed, 2 Jul 2008 17:06:56 +0000 (18:06 +0100)]
git fetch-pack: do not complain about "no common commits" in an empty repo

If the repo is empty, it is obvious that there are no common commits
when fetching from _anywhere_.

So there is no use in saying it in that case, and it can even be
annoying.  Therefore suppress the message unilaterally if the repository
is empty prior to the fetch.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocumentation: Point to gitcli(7) from git(1)
Brian Gernhardt [Wed, 2 Jul 2008 14:13:35 +0000 (10:13 -0400)]
Documentation: Point to gitcli(7) from git(1)

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-gui: Implement "Stage/Unstage Line"
Johannes Sixt [Fri, 27 Jun 2008 07:22:01 +0000 (09:22 +0200)]
git-gui: Implement "Stage/Unstage Line"

This adds a context menu entry below "Stage/Unstage Hunk" that stages or
unstages just the line under the mouse pointer.

This is by itself useful, for example, if there are unrelated changes in
the same hunk and the hunk cannot be split by reducing the context.

The feature can also be used to split a hunk by staging a number of
additions (or unstaging a number of removals) until there are enough
context lines that the hunk gets split.

The implementation reads the complete hunk that the line lives in, and
constructs a new hunk by picking existing context lines, removing unneeded
change lines and transforming other change lines to context lines. The
resulting hunk is fed through 'git apply' just like in the "Stage/Unstage
Hunk" case.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agoUpdate draft release notes for 1.6.0
Junio C Hamano [Wed, 2 Jul 2008 00:21:12 +0000 (17:21 -0700)]
Update draft release notes for 1.6.0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogitcli: Document meaning of --cached and --index
Nanako Shiraishi [Tue, 1 Jul 2008 14:02:40 +0000 (23:02 +0900)]
gitcli: Document meaning of --cached and --index

We saw this explanation repeated on the mailing list a few times.  Even
though the description of individual options to particular commands are
explained in their manual pages, the reason behind choosing which is which
has not been clearly explained in any of the documentation.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocumentation formatting and cleanup
Jonathan Nieder [Mon, 30 Jun 2008 18:56:34 +0000 (13:56 -0500)]
Documentation formatting and cleanup

Following what appears to be the predominant style, format
names of commands and commandlines both as `teletype text`.

While we're at it, add articles ("a" and "the") in some
places, italicize the name of the command in the manual page
synopsis line, and add a comma or two where it seems appropriate.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocumentation: be consistent about "git-" versus "git "
Jonathan Nieder [Mon, 30 Jun 2008 06:09:04 +0000 (01:09 -0500)]
Documentation: be consistent about "git-" versus "git "

Since the git-* commands are not installed in $(bindir), using
"git-command <parameters>" in examples in the documentation is
not a good idea. On the other hand, it is nice to be able to
refer to each command using one hyphenated word. (There is no
escaping it, anyway: man page names cannot have spaces in them.)

This patch retains the dash in naming an operation, command,
program, process, or action. Complete command lines that can
be entered at a shell (i.e., without options omitted) are
made to use the dashless form.

The changes consist only of replacing some spaces with hyphens
and vice versa. After a "s/ /-/g", the unpatched and patched
versions are identical.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocumentation: prepare to be consistent about "git-" versus "git "
Jonathan Nieder [Mon, 30 Jun 2008 22:17:07 +0000 (17:17 -0500)]
Documentation: prepare to be consistent about "git-" versus "git "

With the dashed forms of git commands not in $(bindir), we have
to change many instances of "git-command" to "git command". Also,
for consistency it is at times appropriate to make the opposite
change. In some cases, the change is not so simple as changing one
character.

This patch gets rid of some of those cases by rewrapping lines.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-daemon(1): don't assume git-daemon is in /usr/bin
Jonathan Nieder [Mon, 30 Jun 2008 22:15:57 +0000 (17:15 -0500)]
git-daemon(1): don't assume git-daemon is in /usr/bin

In the example inetd.conf lines in git-daemon(1), it was
assumed that `git-daemon` resides in the user's /usr/bin.
With this patch, we only assume `git` is in /usr/bin.

The stronger assumption fails in the default installation
nowadays.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocumentation: complicate example of "man git-command"
Jonathan Nieder [Mon, 30 Jun 2008 22:10:25 +0000 (17:10 -0500)]
Documentation: complicate example of "man git-command"

The manual page for the command invoked as "git clone" is named
git-clone(1), and similarly for the rest of the git commands.
Make sure our first example of this in tutorials makes it clear
that it is the first two words of a command line that make up the
command's name (that is: for example, the effect of "git svn
dcommit" is described in git-svn(1)).

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agowhitespace fix in Documentation/git-repack.txt
Jonathan Nieder [Mon, 30 Jun 2008 22:05:15 +0000 (17:05 -0500)]
whitespace fix in Documentation/git-repack.txt

Change leading spaces to tabs to match the rest of the file.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocumentation: fix links to tutorials and other new manual pages
Jonathan Nieder [Mon, 30 Jun 2008 22:01:21 +0000 (17:01 -0500)]
Documentation: fix links to tutorials and other new manual pages

With the conversion of HTML documentation to man pages

tutorial.html -> gittutorial (7)
tutorial-2.html -> gittutorial-2 (7)
cvs-migration.html -> gitcvs-migration (7)
diffcore.html -> gitdiffcore (7)
repository-layout.html -> gitrepository-layout (5)
hooks.html -> githooks (5)
glossary.html -> gitglossary (7)
core-tutorial.html -> gitcore-tutorial (7)

and the automatic update of references to these pages,
a little debris was left behind. We clear it away.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge maint in
Junio C Hamano [Wed, 2 Jul 2008 00:19:34 +0000 (17:19 -0700)]
Merge maint in

16 years agoStart draft release notes for 1.5.6.2
Junio C Hamano [Wed, 2 Jul 2008 00:09:21 +0000 (17:09 -0700)]
Start draft release notes for 1.5.6.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoFix 'git show' on signed tag of signed tag of commit
Thomas Rast [Tue, 1 Jul 2008 09:47:04 +0000 (11:47 +0200)]
Fix 'git show' on signed tag of signed tag of commit

The cmd_show loop resolves tags by showing them, then pointing the
object to the 'tagged' member.  However, this object is not fully
initialized; it only contains the SHA1.  (This resulted in a segfault
if there were two levels of tags.)  We apply parse_object to get a
full object.

Noticed by Kalle Olavi Niemitalo on IRC.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'ph/mergetool'
Junio C Hamano [Tue, 1 Jul 2008 23:22:42 +0000 (16:22 -0700)]
Merge branch 'ph/mergetool'

* ph/mergetool:
  Remove the use of '--' in merge program invocation

16 years agoMerge branch 'js/apply-recount'
Junio C Hamano [Tue, 1 Jul 2008 23:22:39 +0000 (16:22 -0700)]
Merge branch 'js/apply-recount'

* js/apply-recount:
  Allow git-apply to recount the lines in a hunk (AKA recountdiff)

16 years agoMerge branch 'jc/checkdiff'
Junio C Hamano [Tue, 1 Jul 2008 23:22:35 +0000 (16:22 -0700)]
Merge branch 'jc/checkdiff'

* jc/checkdiff:
  Fix t4017-diff-retval for white-space from wc
  Update sample pre-commit hook to use "diff --check"
  diff --check: detect leftover conflict markers
  Teach "diff --check" about new blank lines at end
  checkdiff: pass diff_options to the callback
  check_and_emit_line(): rename and refactor
  diff --check: explain why we do not care whether old side is binary

16 years agoMerge branch 'kb/send-email-fifo'
Junio C Hamano [Tue, 1 Jul 2008 23:22:29 +0000 (16:22 -0700)]
Merge branch 'kb/send-email-fifo'

* kb/send-email-fifo:
  git-send-email: Accept fifos as well as files

16 years agoMerge branch 'tr/send-email-ssl'
Junio C Hamano [Tue, 1 Jul 2008 23:22:25 +0000 (16:22 -0700)]
Merge branch 'tr/send-email-ssl'

* tr/send-email-ssl:
  git-send-email: prevent undefined variable warnings if no encryption is set
  git-send-email: add support for TLS via Net::SMTP::SSL

16 years agoMerge branch 'js/maint-clone-insteadof'
Junio C Hamano [Tue, 1 Jul 2008 23:22:22 +0000 (16:22 -0700)]
Merge branch 'js/maint-clone-insteadof'

* js/maint-clone-insteadof:
  clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig
  clone: respect url.insteadOf setting in global configs

16 years agoMerge branch 'jc/maint-reset'
Junio C Hamano [Tue, 1 Jul 2008 23:22:19 +0000 (16:22 -0700)]
Merge branch 'jc/maint-reset'

* jc/maint-reset:
  Allow "git-reset path" when unambiguous

16 years agoMerge branch 'jk/maint-fetch-ref-hier'
Junio C Hamano [Tue, 1 Jul 2008 23:22:14 +0000 (16:22 -0700)]
Merge branch 'jk/maint-fetch-ref-hier'

* jk/maint-fetch-ref-hier:
  fetch: give a hint to the user when local refs fail to update
  fetch: report local storage errors in status table

16 years agoMerge branch 'dz/apply-again'
Junio C Hamano [Tue, 1 Jul 2008 23:22:10 +0000 (16:22 -0700)]
Merge branch 'dz/apply-again'

* dz/apply-again:
  git-apply: handle a patch that touches the same path more than once better

16 years agoMerge branch 'np/pack-default'
Junio C Hamano [Tue, 1 Jul 2008 23:22:07 +0000 (16:22 -0700)]
Merge branch 'np/pack-default'

* np/pack-default:
  pack.indexversion config option now defaults to 2
  repack.usedeltabaseoffset config option now defaults to "true"

16 years agoMerge branch 'jc/dashless' (early part)
Junio C Hamano [Tue, 1 Jul 2008 22:21:52 +0000 (15:21 -0700)]
Merge branch 'jc/dashless' (early part)

* 'jc/dashless' (early part):
  Prepare execv_git_cmd() for removal of builtins from the filesystem
  git-shell: accept "git foo" form

16 years agoMerge branch 'nd/dashless'
Junio C Hamano [Tue, 1 Jul 2008 22:21:40 +0000 (15:21 -0700)]
Merge branch 'nd/dashless'

* nd/dashless:
  Keep some git-* programs in $(bindir)
  Move all dashed-form commands to libexecdir