Commit graph

9243 commits

Author SHA1 Message Date
Junio C Hamano aa453216d1 Do not bother documenting fetch--tool
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-30 01:03:09 -07:00
Junio C Hamano a208362fad Update draft release notes for 1.5.1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-30 00:56:36 -07:00
Junio C Hamano e881192934 Merge branch 'maint'
* maint:
  git-upload-pack: make sure we close unused pipe ends
  Documentation/git-rev-parse.txt: fix example in SPECIFYING RANGES.
  Documentation/git-svnimport.txt: fix typo.
2007-03-29 23:44:30 -07:00
Francis Daly b275a0c9e7 git-quiltimport /bin/sh-ism fix
Bryan Wu reported
/usr/local/bin/git-quiltimport: 114: Syntax error: Missing '))'

Most bourne-ish shells I have here accept
 x=$((echo x)|cat)
but all bourne-ish shells I have here accept
 x=$( (echo x)|cat)
because $(( might mean arithmetic expansion.

Signed-off-by: Francis Daly <francis@daoine.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-29 23:11:33 -07:00
Christian Couder 6f01e6b370 Bisect: Improve error message in "bisect_next_check".
So we can remove the specific message in "bisect_run".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-29 23:10:21 -07:00
Junio C Hamano 18acb3e6c7 Merge branch 'master' of git://repo.or.cz/git/mergetool.git
* 'master' of git://repo.or.cz/git/mergetool.git:
  mergetool: Clean up description of files and prompts for merge resolutions
  mergetool: Make git-rm quiet when resolving a deleted file conflict
  mergetool: Add support for Apple Mac OS X's opendiff command
  mergetool: Fix abort command when resolving symlinks and deleted files
  mergetool: Remove spurious error message if merge.tool config option not set
  mergetool: factor out common code
  mergetool: portability fix: don't use reserved word function
  mergetool: portability fix: don't assume true is in /bin
  mergetool: Don't error out in the merge case where the local file is deleted
  mergetool: Replace use of "echo -n" with printf(1) to be more portable
  Fix minor formatting issue in man page for git-mergetool
2007-03-29 23:09:40 -07:00
Theodore Ts'o 27090aa1ea mergetool: Clean up description of files and prompts for merge resolutions
This fixes complaints from Junio for how messages and prompts are
printed when resolving symlink and deleted file merges.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-03-29 22:46:16 -04:00
Theodore Ts'o 1346c99963 mergetool: Make git-rm quiet when resolving a deleted file conflict
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-03-29 12:29:54 -04:00
Theodore Ts'o 365cf979c4 mergetool: Add support for Apple Mac OS X's opendiff command
Signed-off-by: Arjen Laarhoven <arjen@yaph.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-03-29 12:29:53 -04:00
Theodore Ts'o 5a174f1a2e mergetool: Fix abort command when resolving symlinks and deleted files
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-03-29 12:29:52 -04:00
Theodore Ts'o b7b36f92fd mergetool: Remove spurious error message if merge.tool config option not set
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-03-29 12:29:48 -04:00
Theodore Ts'o ddc0c49753 mergetool: factor out common code
Create common function check_unchanged(), save_backup() and
remove_backup().

Also fix some minor whitespace issues while we're at it.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-03-29 12:29:33 -04:00
Theodore Ts'o 262c981ea7 mergetool: portability fix: don't use reserved word function
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-03-29 12:23:01 -04:00
Theodore Ts'o d1dc6959bb mergetool: portability fix: don't assume true is in /bin
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-03-29 12:22:50 -04:00
Theodore Ts'o ce5b6d752b mergetool: Don't error out in the merge case where the local file is deleted
If the file we are trying to merge resolve is in git-ls-files -u, then
skip the file existence test.  If the file isn't reported in
git-ls-files, then check to see if the file exists or not to give an
appropriate error message.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-03-29 12:22:48 -04:00
Theodore Ts'o 20fa04ea6b mergetool: Replace use of "echo -n" with printf(1) to be more portable
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-03-29 12:22:44 -04:00
Theodore Ts'o e15b484f6a Fix minor formatting issue in man page for git-mergetool
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-03-29 10:06:28 -04:00
H. Peter Anvin 3ac53e0d13 git-upload-pack: make sure we close unused pipe ends
Right now, we don't close the read end of the pipe when git-upload-pack
runs git-pack-object, so we hang forever (why don't we get SIGALRM?)
instead of dying with SIGPIPE if the latter dies, which seems to be the
norm if the client disconnects.

Thanks to Johannes Schindelin <Johannes.Schindelin@gmx.de> for
pointing out where this close() needed to go.

This patch has been tested on kernel.org for several weeks and appear
to resolve the problem of git-upload-pack processes hanging around
forever.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
(cherry picked from commit 465b3518a9)
2007-03-29 01:41:23 -07:00
Gerrit Pape c2c6d9302a Documentation/git-rev-parse.txt: fix example in SPECIFYING RANGES.
Please see http://bugs.debian.org/404795:

 In git-rev-parse(1), there is an example commit tree, which is used twice.
 The explanation for this tree is very clear: B and C are commit *parents* to
 A.

 However, when the tree is reused as an example in the SPECIFYING RANGES, the
 manpage author screws up and uses A as a commit *parent* to B and C!  I.e.,
 he inverts the tree.

 And the fact that for this example you need to read the tree backwards is
 not explained anywhere (and it would be confusing even if it was).

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-29 01:38:28 -07:00
Gerrit Pape 3e63e0df4f Documentation/git-svnimport.txt: fix typo.
This was noticed by Frederik Schwarzer.  SVN's repository by default has
trunk, tags/, and branch_es_/.

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-29 01:38:11 -07:00
Junio C Hamano 7685227e97 GIT 1.5.1-rc3 2007-03-28 15:58:09 -07:00
Junio C Hamano 43a8e4fe8e Update main git.html page to point at 1.5.0.6 documentation
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-28 15:40:17 -07:00
Junio C Hamano 0a98f9d138 Merge branch 'maint' to synchronize with 1.5.0.6 2007-03-28 15:39:57 -07:00
Junio C Hamano 9529a2524a GIT 1.5.0.6 2007-03-28 15:28:14 -07:00
Jeff King d0e50cb4cb commit: fix pretty-printing of messages with "\nencoding "
The function replace_encoding_header is given the whole
commit buffer, including the commit message. When looking
for the encoding header, if none was found in the header, it
would locate any line in the commit message matching
"\nencoding " and remove it.

Instead, we now make sure to search only to the end of the
header.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-28 15:06:18 -07:00
Johannes Schindelin 75c962c99a t4118: be nice to non-GNU sed
Elias Pipping:
> I'm on a mac, hence /usr/bin/sed is not gnu sed, which makes
> t4118 fail.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Ack'd-by: Elias Pipping <pipping@macports.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-28 14:54:30 -07:00
Jeff King 03bcaacaad t/t6006: add tests for a slightly more complex commit messages
Especially this tests i18n messages and encoding header.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-28 14:28:00 -07:00
Jeff King 6a5ea2d023 Fix "--pretty=format:" encoding item
It printed the header "encoding " instead of just showing
the encoding, as all other items do.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-28 14:27:43 -07:00
Junio C Hamano 542e165cdc Fix "--pretty=format:" for parent related items.
There are two breakages in the %P/%p interpolation.  It appended
an excess SP at the end of the list, and it gave uninitialized
contents of a buffer on the stack for root commits.

This fixes it, while updating the t6006 test which expected the
wrong output.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-28 13:44:04 -07:00
Gerrit Pape 9c880b3ea5 http-fetch: remove path_len from struct alt_base, it was computed but never used
Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-28 04:44:23 -07:00
Gerrit Pape 2afea3bcd2 http-fetch: don't use double-slash as directory separator in URLs
Please see http://bugs.debian.org/409887

http-fetch expected the URL given at the command line to have a trailing
slash anyway, and then added '/objects...' when requesting objects files
from the http server.

Now it doesn't require the trailing slash in <url> anymore, and strips
trailing slashes if given nonetheless.

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-28 04:44:16 -07:00
Junio C Hamano d3e41ebff4 git-commit: "read-tree -m HEAD" is not the right way to read-tree quickly
It still looks at the working tree and checks for locally
modified paths.  When are preparing a temporary index from HEAD,
we do not want any of that.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-28 03:34:55 -07:00
Jeff King fa21b60232 Add some basic tests of rev-list --pretty=format
These could stand to be a little more complex, but it should
at least catch obvious problems (like the recently fixed %ct
bug).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-27 18:57:01 -07:00
H. Peter Anvin 465b3518a9 git-upload-pack: make sure we close unused pipe ends
Right now, we don't close the read end of the pipe when git-upload-pack
runs git-pack-object, so we hang forever (why don't we get SIGALRM?)
instead of dying with SIGPIPE if the latter dies, which seems to be the
norm if the client disconnects.

Thanks to Johannes Schindelin <Johannes.Schindelin@gmx.de> for
pointing out where this close() needed to go.

This patch has been tested on kernel.org for several weeks and appear
to resolve the problem of git-upload-pack processes hanging around
forever.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-27 17:05:12 -07:00
Jeff King 4621af3716 --pretty=format: fix broken %ct and %at interpolation
A pointer arithmetic error in fill_person caused random data
from the commit object to be included with the timestamp,
which looked something like:

    $ git-rev-list --pretty=format:%ct origin/next | head
    commit 98453bdb3db10db26099749bc4f2dc029bed9aa9
    1174977948 -0700

    Merge branch 'master' into next

    * master:
      Bisect: Use
    commit c0ce981f5e
    1174889646 -0700

Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-27 17:04:26 -07:00
James Bowes c6e0caa384 use xrealloc in help.c
Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-27 16:57:57 -07:00
James Bowes aa4cfa8516 read-tree: use xcalloc
Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-27 16:57:26 -07:00
Linus Torvalds 608d48b220 Fix "getaddrinfo()" buglet
At least in Linux glibc, "getaddrinfo()" has a very irritating feature (or
bug, who knows..).

Namely if you pass it in an empty string for the service name, it will
happily and quietly consider it identical to a NULL port pointer, and
return port number zero and no errors. Which obviously will not work.

Maybe that's what it's really expected to do, although the man-page for
getaddrinfo() certainly implies that it's a bug.

So when somebody passes me a "please pull" request pointing to something
like the following

	git://git.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git

(note the extraneous colon at the end of the host name), git would happily
try to connect to port 0, which would generally just cause the remote to
not even answer, and the "connect()" will take a long time to time out.

So to work around the glibc feature/bug, just notice this empty port case
automatically. Also, add the port information to the error information
when it fails to look up (maybe it's the host-name that fails, maybe it's
the port-name - we should print out both).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-27 13:00:13 -07:00
Gerrit Pape 66d5871ead Makefile: remove test-chmtime program in target clean.
While running 'make test', the test-chmtime program is created, and should
be cleaned up on 'make clean'.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-27 12:58:46 -07:00
Jakub Narebski f73bbb2d0c gitweb: Cleanup and uniquify die_error calls
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-27 12:58:23 -07:00
Junio C Hamano e82973cfb0 sha1_file.c (write_sha1_file): Detect close failure
This is in the same spirit as earlier fix to write_sha1_from_fd().

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-27 12:56:01 -07:00
Alexandre Julliard b704e589f4 git.el: Display some information about the HEAD commit.
Use git-log --pretty=oneline to print a short description of the
current HEAD (and merge heads if any) in the buffer header.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-27 12:52:41 -07:00
Junio C Hamano 89d5892389 Document git-log --first-parent
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-27 12:51:13 -07:00
Christian Couder 8302012097 Bisect: add checks at the beginning of "git bisect run".
We may be able to "run" with only one good revision given
and then verify that the result of the first run is bad.
And perhaps also the other way around.

But for now let's check that we have at least one bad and
one good revision before we start to run.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-27 12:48:30 -07:00
Jim Meyering 0d315468f3 sha1_file.c (write_sha1_from_fd): Detect close failure.
I stumbled across this in the context of the fchmod 0444 patch.
At first, I was going to unlink and call error like the two subsequent
tests do, but a failed write (above) provokes a "die", so I made
this do the same.  This is testing for a write failure, after all.

Signed-off-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-27 12:43:49 -07:00
Jeff King e4d9516b21 git-rm: don't remove newly added file without -f
Given this set of commands:

  $ echo "newly added file" >new
  $ git add new
  $ git rm new

the file "new" was previously removed from the working
directory and the index. Because it was not in HEAD, it is
available only by searching for unreachable objects.

Instead, we now err on the safe side and refuse to remove
a file which is not referenced by HEAD.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-27 12:43:39 -07:00
Christian Couder c0ce981f5e Bisect: Use "git-show-ref --verify" when reseting.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-25 23:14:06 -07:00
Jakub Narebski 52c813f22f gitweb: Add example of config file and how to generate projects list to gitweb/INSTALL
Add simple example of config file (turning on and allowing override of
a few %features). Also example config file and script to generate list
of projects in a format that can be used as GITWEB_LIST / $projects_list.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-25 22:22:33 -07:00
Junio C Hamano b6da18b1d1 GIT 1.5.1-rc2
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-25 18:01:50 -07:00
Eric Wong 0b59451c1b git-svn: fix rel_path() when not connected to the repository root
This should fix fetching for people who did not use
"git svn --minimize" or cannot connect to the repository root
due to the lack of permissions.

I'm not sure what I was on when I made the change to the
rel_path() function in 4e9f6cc78e
that made it die() when we weren't connected to the repository
root :x

Thanks to Sven Verdoolaege for reporting this bug.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-25 18:01:28 -07:00