Commit graph

8635 commits

Author SHA1 Message Date
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
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
Junio C Hamano fd2a75972e Merge branch 'maint' of git://linux-nfs.org/~bfields/git into maint
* 'maint' of git://linux-nfs.org/~bfields/git:
  user-manual: introduce "branch" and "branch head" differently
  glossary: clean up cross-references
  glossary: stop generating automatically
  user-manual: Use def_ instead of ref_ for glossary references.
  user-manual.txt: fix a tiny typo.
  user-manual: run xsltproc without --nonet option
2007-03-25 15:07:27 -07:00
Jakub Narebski cd67c8e0bc gitweb: Add some installation notes in gitweb/INSTALL
Add some installation and configuration notes for gitweb in
gitweb/INSTALL. Make use of filling gitweb configuration by
Makefile.

It does not cover (yet?) all the configuration variables and
options.

Some of contents duplicates information in gitweb/README file
(it is referred from gitweb/INSTALL).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-24 22:26:33 -07:00
Jakub Narebski 4ae89b7625 gitweb: Fix not marking signoff lines in "log" view
The CSS selector for signoff lines style was too strict: in the "log"
view the commit message is not encompassed in container "page_body"
div.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-24 22:25:55 -07:00
Jakub Narebski 346d5e1835 gitweb: Don't escape attributes in CGI.pm HTML methods
There is no need to escape HTML tag's attributes in CGI.pm
HTML methods (like CGI::a()), because CGI.pm does attribute
escaping automatically.

  $cgi->a({ ... -attribute => atribute_value }, tag_contents)

is translated to

  <a ... attribute="attribute_value">tag_contents</a>

The rules for escaping attribute values (which are string contents) are
different. For example you have to take care about escaping embedded '"'
and "'" characters; CGI::a() does that for us automatically.

CGI::a() does not HTML escape tag_contents; we would need to write

  <a href="URL">some <b>bold</b> text</a>

for example. So we use esc_html (or esc_path) to escape tag_contents
as needed.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-24 22:25:47 -07:00
Li Yang 290b1467a3 gitweb: Change to use explicitly function call cgi->escapHTML()
Change to use explicitly function call cgi->escapHTML().
This fix the problem on some systems that escapeHTML() is not
functioning, as default CGI is not setting 'escape' parameter.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-24 22:25:40 -07:00
Jakub Narebski f9308a182e gitweb: Fix "next" link in commit view
Fix copy'n'paste error in commit c9d193df which caused that "next"
link for merge commits in "commit" view
  (merge: _commit_ _commit_ ...)
was to "commitdiff" view instead of being to "commit" view.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-23 14:54:52 -07:00
Peter Eriksen 979ea5856c Documentation/pack-format.txt: Clear up description of types.
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-22 03:05:19 -07:00
Michael S. Tsirkin a947ab79d4 fix typo in git-am manpage
Fix typo in git-am manpage

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-21 02:22:28 -07:00
J. Bruce Fields 81b6c950de user-manual: introduce "branch" and "branch head" differently
I was using "branch" to mean "head", but that's perhaps a little
sloppy; so instead start by using the terms "branch head" and "head",
while still quickly falling back on "branch", since that's what
people actually say more frequently.

Also include glossary references on the first uses of "head" and "tag".

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-03-18 23:06:00 -04:00
J. Bruce Fields cbd919221f glossary: clean up cross-references
Manual clean-up of cross-references, and also clean up a few definitions (e.g.
git-rebase).

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-03-18 23:06:00 -04:00
J. Bruce Fields f562e6f316 glossary: stop generating automatically
The sort_glossary.pl script sorts the glossary, checks for duplicates,
and automatically adds cross-references.

But it's not so hard to do all that by hand, and sometimes the automatic
cross-references are a little wrong; so let's run the script one last
time and check in its output.

Note: to make the output fit better into the user manual I also deleted
the acknowledgements at the end, which was maybe a little rude; feel
free to object and I can find a different solution.

Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-03-18 23:06:00 -04:00
J. Bruce Fields 06e7ea3787 user-manual: Use def_ instead of ref_ for glossary references.
I'd like to start using references to the glossary in the user manual.
The "ref_" prefix for these references seems a little generic; so
replace with "def_".

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-03-18 21:53:50 -04:00
Jim Meyering 21f13ee203 user-manual.txt: fix a tiny typo.
"file patch" was doubtless intended to be "file path",
but "directory name" is clearer.

Signed-off-by: Jim Meyering <jim@meyering.net>
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-03-18 21:53:29 -04:00
J. Bruce Fields 0a3985dcfb user-manual: run xsltproc without --nonet option
The --nonet option prevents xsltproc from going to the network to find
anything.  But it always tries to find them locally first, so for a
user with the necessary docbook stylesheets installed the build will
work just fine without xsltproc attempting to use the network; all
--nonet does is make it fail rather than falling back on that.  That
doesn't seem particularly helpful.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-03-18 21:53:19 -04:00
Junio C Hamano 6bf035f278 GIT 1.5.0.5
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-18 14:43:29 -07:00
Santi Béjar 2be08a84ba git-merge: finish when git-read-tree fails
The message formating (commit v1.5.0.3-28-gbe242d5) broke the && chain.

Noticed by Dmitry Torokhov.

Signed-off-by: Santi Béjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-16 04:34:17 -07:00
Junio C Hamano 3d4e1932f2 GIT 1.5.0.4
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-14 15:56:49 -07:00
Yann Dirson 9debca9aac Clarify doc for git-config --unset-all.
Previous formulation could make it appear as removing all lines
matching a regexp (at least, I was looking for such a flag, and
confused this flag for what I was looking for).

Signed-off-by: Yann Dirson <ydirson@altern.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-14 14:38:38 -07:00
Junio C Hamano 41f5d73391 git-checkout: fix "eval" used for merge labelling.
The symbolic notation of the fork point can contain whitespaces (e.g.
"git checkout -m 'HEAD@{9 hours ago}'").  Quote strings properly
when using eval to prepare GITHEAD_$new

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-14 09:48:13 -07:00
Frank Lichtenheld ad0f8c9ea7 cvsserver: asciidoc formatting changes
Format some lists really as lists. Improves both html and man
output.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-13 21:16:05 -07:00
Junio C Hamano 65d61e5f51 Merge branch 'maint' of git://repo.or.cz/git/fastimport into maint
* 'maint' of git://repo.or.cz/git/fastimport:
  fast-import: grow tree storage more aggressively
2007-03-12 23:08:27 -07:00
Jeff King f022f85f6d fast-import: grow tree storage more aggressively
When building up a tree for a commit, fast-import
dynamically allocates memory for the tree entries. When more
space is needed, the allocated memory is increased by a
constant amount. For very large trees, this means
re-allocating and memcpy()ing the memory O(n) times.

To compound this problem, releasing the previous tree
resource does not free the memory; it is kept in a pool
for future trees. This means that each of the O(n)
allocations will consume increasing amounts of memory,
giving O(n^2) memory consumption.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-03-12 15:01:44 -04:00
Shawn O. Pearce 115f0fe499 Don't package the git-gui credits file anymore
Since git-gui 0.6.4 the credits file is no longer produced.
This file was removed from git-gui due to build issues that
a lot of users and Git developers have reported running into.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-12 11:44:46 -07:00
Junio C Hamano 3ed02de2f4 Merge branch 'maint' of git://repo.or.cz/git-gui into maint
* 'maint' of git://repo.or.cz/git-gui:
  git-gui: Allow 'git gui version' outside of a repository
  git-gui: Revert "git-gui: Display all authors of git-gui."
  git-gui: Revert "Don't modify CREDITS-FILE if it hasn't changed."
  git-gui: Allow committing empty merges
2007-03-12 11:43:22 -07:00
Shawn O. Pearce 756d846fea git-gui: Allow 'git gui version' outside of a repository
I got a little surprise one day when I tried to run 'git gui version'
outside of a Git repository to determine what version of git-gui was
installed on that system.  Turns out we were doing the repository
check long before we got around to command line argument handling.

We now look to see if the only argument we have been given is
'version' or '--version', and if so, print out the version and
exit immediately; long before we consider looking at the Git
version or working directory.  This way users can still get to
the git-gui version number even if Git's version cannot be read.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-03-12 13:26:06 -04:00
Shawn O. Pearce bb616ddd15 git-gui: Revert "git-gui: Display all authors of git-gui."
This reverts commit 871f4c97ad.

Too many users have complained about the credits generator in
git-gui, so I'm backing the entire thing out.  This revert will
finish that series.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-03-12 13:26:04 -04:00
Shawn O. Pearce 56a7fde16e git-gui: Revert "Don't modify CREDITS-FILE if it hasn't changed."
This reverts commit 92446aba47.

Too many users have complained about the credits generator in
git-gui, so I'm backing the entire thing out.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-03-12 13:25:58 -04:00
Shawn O. Pearce c7bafad10d git-gui: Allow committing empty merges
Johannes Sixt noticed that git-gui would not let the user commit
a merge created by `git merge -s ours` as the ours strategy does
not alter the tree (that is HEAD^1^{tree} = HEAD^{tree} after the
merge).  The same issue arises from amending such a merge commit.

We now permit an empty commit (no changed files) if we are doing
a merge commit.  Core Git does this with its command line based
git-commit tool, so it makes sense for the GUI to do the same.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-03-12 13:03:47 -04:00
Avi Kivity fc095242b1 git-send-email: Document configuration options
Wishing to implement an email aliases file, I found that they were already
implmented.  Document them for the next user.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-11 23:52:03 -07:00
J. Bruce Fields be242d576c git-merge: warn when -m provided on a fast forward
Warn the user that the "-m" option is ignored in the case of a fast
forward.  That may save some confusion in the case where the user
doesn't know about fast forwards yet and may not realize that the
behavior here is intentional.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-11 23:49:20 -07:00
Alexandre Julliard 60fa08ed61 git.el: Retrieve commit log information from .dotest directory.
If a git-am or git-rebase is in progress, fill the commit log buffer
from the commit information found in the various files in the .dotest
directory.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-10 21:58:26 -08:00
Alexandre Julliard 3844814755 git.el: Avoid appending a signoff line that is already present.
Also avoid inserting an extra newline if other signoff lines are
present.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-10 21:58:21 -08:00
Matthias Lederhofer 96a5702409 setup_git_directory_gently: fix off-by-one error
don't tell getcwd that the buffer has one spare byte for an extra /

Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-10 21:47:45 -08:00
Junio C Hamano 8bb2b516d5 Merge branch 'maint' of git://linux-nfs.org/~bfields/git into maint
* 'maint' of git://linux-nfs.org/~bfields/git:
  user-manual: install user manual stylesheet with other web documents
  user-manual: fix rendering of history diagrams
  user-manual: fix missing colon in git-show example
  user-manual: fix inconsistent use of pull and merge
  user-manual: fix inconsistent example
  glossary: fix overoptimistic automatic linking of defined terms
2007-03-10 21:47:01 -08:00
J. Bruce Fields 8ce9d83b78 user-manual: install user manual stylesheet with other web documents
Install the stylesheet needed for the user manual.  This should solve
the problem of, e.g.,

	http://www.kernel.org/pub/software/scm/git/docs/user-manual.html

lacking a lot of formatting.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-03-10 23:05:02 -05:00
J. Bruce Fields 1dc71a9155 user-manual: fix rendering of history diagrams
Asciidoc appears to interpret a backslash at the end of a line as
escaping the end-of-line character, which screws up the display of
history diagrams like

 o--o--o
	\
	 o--...

The obvious fix (replacing "\" by "\\") doesn't work.  The only
workaround I've found is to include all such diagrams in a LiteralBlock.
Asciidoc claims that should be equivalent to a literal paragraph, so I
don't understand why the difference--perhaps it's an asciidoc bug.

Cc: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-03-10 23:05:01 -05:00
J. Bruce Fields ed4eb0d8f3 user-manual: fix missing colon in git-show example
There should be a colon in this git-show example.

Cc: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-03-10 23:05:01 -05:00
J. Bruce Fields fabbd8f6ca user-manual: fix inconsistent use of pull and merge
I used "git pull ." instead of "git merge" here without any explanation.
Stick instead to "git merge" for now (the equivalent pull syntax is
still covered in a later chapter).

Cc: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-03-10 23:05:01 -05:00
J. Bruce Fields 923642fe1b user-manual: fix inconsistent example
The configuration file fragment here is inconsistent with the text
above.  Thanks to Ramsay Jones for the correction.

Cc: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-03-10 23:05:01 -05:00
J. Bruce Fields c816eb1784 glossary: fix overoptimistic automatic linking of defined terms
The script sort_glossary.pl turns each use of "term" into a link to the
definition of "term".  To avoid mangling links like

	gitlink:git-term[1]

it doesn't replace any occurence of "term" preceded by "link:git-".
This fails for gitlink:git-symbolic-ref[1] when substituting for "ref".

So instead just refuse to replace anything preceded by a "-".
That could result in missing some opportunities, but that's a less
annoying error.

Actually I find the automatic substitution a little distracting; some
day maybe we should just run it once and commit the result, so it can
be hand-tuned.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-03-10 23:05:01 -05:00
Jeff King c4431d380c Documentation: s/seperator/separator/
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-09 17:27:43 -08:00
Matthias Kestenholz 443b92b6e5 Adjust reflog filemode in shared repository
Without this, committing in a group-shared repository would not work
even though all developers are in the same group.

Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-09 16:46:53 -08:00
Shawn O. Pearce ef203f0856 Catch write_ref_sha1 failure in receive-pack
This failure to catch the failure of write_ref_sha1 was noticed
by Bill Lear.  The ref will not update if the log file could not
be appended to (due to file permissions problems).  Such a failure
should be flagged as a failure to update the ref, so that the client
knows the push did not succeed.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-07 10:01:44 -08:00
Johannes Schindelin 58db64f73c make t8001 work on Mac OS X again
The test was recently broken to expect sed to leave the
incomplete line at the end without newline.

POSIX says that output of the pattern space is to be followed by
a newline, while GNU adds the newline back only when it was
stripped when input.  GNU behaviour is arguably more intuitive
and nicer, but we should not depend on it.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-06 17:09:53 -08:00
Junio C Hamano eec102524f Merge branch 'master' of git://repo.or.cz/git-gui into maint
* 'master' of git://repo.or.cz/git-gui:
  git-gui: Make 'make' quieter by default
  git-gui: Remove unnecessary /dev/null redirection.
  git-gui: Don't create empty (same tree as parent) commits.
  git-gui: Add Reset to the Branch menu.
  git-gui: Relocate the menu/transport menu code.
2007-03-06 00:39:52 -08:00
Shawn O. Pearce 0b5ea163d2 git-gui: Make 'make' quieter by default
To fit nicely into the output of the git.git project's own quieter
Makefile, we want to make the git-gui Makefile nice and quiet too.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-03-06 02:13:23 -05:00
Junio C Hamano c93d88a574 git-commit: cd to top before showing the final stat
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-05 23:11:19 -08:00