Commit graph

19896 commits

Author SHA1 Message Date
Junio C Hamano 178071baa7 Merge branch 'tf/doc-pt-br'
* tf/doc-pt-br:
  Documentation: update pt-BR
2009-10-18 23:00:58 -07:00
Junio C Hamano 37ce6b12ac Merge branch 'dk/blame-el'
* dk/blame-el:
  git-blame.el: Change how blame information is shown.
2009-10-18 23:00:51 -07:00
Junio C Hamano d9499c80c1 Merge branch 'mr/instaweb-cgid'
* mr/instaweb-cgid:
  instaweb: support mod_cgid for apache2
2009-10-18 23:00:45 -07:00
René Scharfe fb423da0e5 describe: load refnames before calling describe()
Get rid of the static variable that was used to prevent loading all
the refnames multiple times by moving that code out of describe(),
simply making sure it is only run once that way.

Also change the error message that is shown in case no refnames are
found to not include a hash any more, as the error condition is not
specific to any particular revision.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-18 23:00:02 -07:00
Junio C Hamano bcc9b7427d Merge branch 'maint'
* maint:
  git push: say that --tag can't be used with --all or --mirror in help text
  git push: remove incomplete options list from help text
  document push's new quiet option
  Makefile: clean block-sha1/ directory instead of mozilla-sha1/
2009-10-18 22:58:53 -07:00
Nanako Shiraishi 8ef4c28b8d git push: say that --tag can't be used with --all or --mirror in help text
This replaces an earlier patch by Björn Gustavsson,

  Message-ID: <4AD75029.1010109@gmail.com>

Signed-off-by: しらいし ななこ <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-18 22:47:48 -07:00
Nanako Shiraishi fcb044ee57 git push: remove incomplete options list from help text
'git push -h' shows usage text with incomplete list of options and then
has a separate list of options that are supported. Imitate the way other
commands (I looked at 'git diff' for an example) show their options.

Signed-off-by: しらいし ななこ <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-18 22:47:29 -07:00
Jeff King 989119d96e document push's new quiet option
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-18 22:44:22 -07:00
Carlos R. Mafra 3edd98ac65 Makefile: clean block-sha1/ directory instead of mozilla-sha1/
'make clean' should remove the object files from block-sha1/
instead of the non-existent mozilla-sha1/ directory.

Signed-off-by: Carlos R. Mafra <crmafra@aei.mpg.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-18 19:45:38 -07:00
Junio C Hamano ad12b81271 Start 1.6.6 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-17 00:11:43 -07:00
Junio C Hamano 9981c808b4 Merge branch 'jc/maint-blank-at-eof'
* jc/maint-blank-at-eof:
  diff -B: colour whitespace errors
  diff.c: emit_add_line() takes only the rest of the line
  diff.c: split emit_line() from the first char and the rest of the line
  diff.c: shuffling code around
  diff --whitespace: fix blank lines at end
  core.whitespace: split trailing-space into blank-at-{eol,eof}
  diff --color: color blank-at-eof
  diff --whitespace=warn/error: fix blank-at-eof check
  diff --whitespace=warn/error: obey blank-at-eof
  diff.c: the builtin_diff() deals with only two-file comparison
  apply --whitespace: warn blank but not necessarily empty lines at EOF
  apply --whitespace=warn/error: diagnose blank at EOF
  apply.c: split check_whitespace() into two
  apply --whitespace=fix: detect new blank lines at eof correctly
  apply --whitespace=fix: fix handling of blank lines at the eof
2009-10-17 00:11:03 -07:00
Junio C Hamano 7641eb400f Merge branch 'maint'
* maint:
  GIT 1.6.5.1
  grep: do not segfault when -f is used
2009-10-17 00:10:33 -07:00
Junio C Hamano b142da2a5d GIT 1.6.5.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-16 23:57:19 -07:00
Junio C Hamano 050dfc4535 Merge branch 'maint-1.6.4' into maint
* maint-1.6.4:
  grep: do not segfault when -f is used
2009-10-16 23:47:58 -07:00
Matt Kraai cfe370c647 grep: do not segfault when -f is used
"git grep" would segfault if its -f option was used because it would
try to use an uninitialized strbuf, so initialize the strbuf.

Thanks to Johannes Sixt <j.sixt@viscovery.net> for the help with the
test cases.

Signed-off-by: Matt Kraai <kraai@ftbfs.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-16 23:47:47 -07:00
Junio C Hamano c274db7057 Merge branch 'pv/maint-add-p-no-exclude'
* pv/maint-add-p-no-exclude:
  git-add--interactive: never skip files included in index
2009-10-14 16:13:20 -07:00
Junio C Hamano 695f9523dd Merge branch 'maint'
* maint:
  sha1_file: Fix infinite loop when pack is corrupted
2009-10-14 16:10:37 -07:00
Shawn O. Pearce b3118bdc91 sha1_file: Fix infinite loop when pack is corrupted
Some types of corruption to a pack may confuse the deflate stream
which stores an object.  In Andy's reported case a 36 byte region
of the pack was overwritten, leading to what appeared to be a valid
deflate stream that was trying to produce a result larger than our
allocated output buffer could accept.

Z_BUF_ERROR is returned from inflate() if either the input buffer
needs more input bytes, or the output buffer has run out of space.
Previously we only considered the former case, as it meant we needed
to move the stream's input buffer to the next window in the pack.

We now abort the loop if inflate() returns Z_BUF_ERROR without
consuming the entire input buffer it was given, or has filled
the entire output buffer but has not yet returned Z_STREAM_END.
Either state is a clear indicator that this loop is not working
as expected, and should not continue.

This problem cannot occur with loose objects as we open the entire
loose object as a single buffer and treat Z_BUF_ERROR as an error.

Reported-by: Andy Isaacson <adi@hexapodia.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-14 13:39:37 -07:00
Junio C Hamano 18a536476e Merge branch 'maint'
* maint:
  change throughput display units with fast links
  clone: Supply the right commit hash to post-checkout when -b is used
  remote-curl: add missing initialization of argv0_path
2009-10-14 01:54:51 -07:00
Nicolas Pitre 583371af1f change throughput display units with fast links
Switch to MiB/s when the connection is fast enough (i.e. on a LAN).

Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-14 01:19:29 -07:00
Björn Steinbrink d01a8e32fe clone: Supply the right commit hash to post-checkout when -b is used
When we use -b <branch>, we may checkout something else than what the
remote's HEAD references, but we still used remote_head to supply the
new ref value to the post-checkout hook, which is wrong.

So instead of using remote_head to find the value to be passed to the
post-checkout hook, we have to use our_head_points_at, which is always
correctly setup, even if -b is not used.

This also fixes a segfault when "clone -b <branch>" is used with a
remote repo that doesn't have a valid HEAD, as in such a case
remote_head is NULL, but we still tried to access it.

Reported-by: Devin Cofer <ranguvar@archlinux.us>
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-14 01:19:15 -07:00
Giuseppe Bilotta 452e2256d2 gitweb: fix esc_param
The custom CGI escaping done in esc_param failed to escape UTF-8
properly. Fix by using CGI::escape on each sequence of matched
characters instead of sprintf()ing a custom escaping for each byte.

Additionally, the space -> + escape was being escaped due to greedy
matching on the first substitution. Fix by adding space to the
list of characters not handled on the first substitution.

Finally, remove an unnecessary escaping of the + sign.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-14 01:14:45 -07:00
Johannes Sixt c6dfb39944 remote-curl: add missing initialization of argv0_path
All programs, in particular also the stand-alone programs (non-builtins)
must call git_extract_argv0_path(argv[0]) in order to help builds that
derive the installation prefix at runtime, such as the MinGW build.
Without this call, the program segfaults (or raises an assertion
failure).

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Tested-by: Michael Wookey <michaelwookey@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-13 23:24:58 -07:00
Christian Couder b0fa7ab51b git: add --no-replace-objects option to disable replacing
Commit dae556b (environment: add global variable to disable replacement)
adds a variable to enable/disable replacement, and it is enabled by
default for most commands.

So there is no way to disable it for some commands, which is annoying
when we want to get information about a commit that has been replaced.

For example:

$ git cat-file -p N

would output information about the replacement commit if commit N is
replaced.

With the "--no-replace-objects" option that this patch adds it is
possible to get information about the original commit using:

$ git --no-replace-objects cat-file -p N

While at it, let's add some documentation about this new option in the
"git replace" man page too.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-13 01:07:29 -07:00
Junio C Hamano 9ecb2a7f49 Merge branch 'maint'
* maint:
  git-stash documentation: mention default options for 'list'
2009-10-13 01:01:14 -07:00
Junio C Hamano 6ff9ae9f97 Merge branch 'maint-1.6.4' into maint
* maint-1.6.4:
  git-stash documentation: mention default options for 'list'
2009-10-13 01:01:04 -07:00
Jonathan Nieder 604e0cb5cb Documentation: describe check-ref-format --branch
Unless one already knew, it was not obvious what sort of shorthand
"git check-ref-format --branch" expands.  Explain it.

The --branch argument is not optional.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-12 16:28:42 -07:00
Thomas Rast 77abcbdc26 Let --decorate show HEAD position
'git log --graph --oneline --decorate --all' is a useful way to get a
general overview of the repository state, similar to 'gitk --all'.
Let it indicate the position of HEAD by loading that ref too, so that
the --decorate code can see it.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-12 16:22:35 -07:00
Miklos Vajna 0a0c342568 git-stash documentation: mention default options for 'list'
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-12 16:16:36 -07:00
Thomas Rast 17225c49d5 bash completion: complete refs for git-grep
Before the --, always attempt ref completion.  This helps with
entering the <treeish> arguments to git-grep.  As a bonus, you can
work around git-grep's current lack of --all by hitting M-*, ugly as
the resulting command line may be.

Strictly speaking, completing the regular expression argument (or
option argument) makes no sense.  However, we cannot prevent _all_
completion (it will fall back to filenames), so we dispense with any
additional complication to detect whether the user still has to enter
a regular expression.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-12 16:13:19 -07:00
Jeff King b5227d80ae ls-files: excludes should not impact tracked files
In all parts of git, .gitignore and other exclude files
impact only how we treat untracked files; they should have
no effect on files listed in the index.

This behavior was originally implemented very early on in
9ff768e, but only for --exclude-from. Later, commit 63d285c
accidentally caused us to trigger the behavior for
--exclude-per-directory.

This patch totally ignores excludes for files found in the
index. This means we are reversing the original intent of
9ff768e, while at the same time fixing the accidental
behavior of 63d285c. This is a good thing, though, as the
way that 9ff768e behaved does not really make sense with the
way exclusions are used in modern git.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-12 16:12:49 -07:00
Felipe Contreras 2775d92c53 diff.c: stylefix
Essentially; s/type* /type */ as per the coding guidelines.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-11 21:54:44 -07:00
SZEDER Gábor 3240269dd9 Documentation: add 'git replace' to main git manpage
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-11 21:52:22 -07:00
Pauli Virtanen b145b211ba git-add--interactive: never skip files included in index
Make "git add -p" to not skip files that are in index even if they are
excluded (by .gitignore etc.). This fixes the contradictory behavior
that "git status" and "git commit -a" listed such files as modified, but
"git add -p FILENAME" ignored them.

Signed-off-by: Pauli Virtanen <pav@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-10 14:56:13 -07:00
Junio C Hamano 78d553b7d7 GIT 1.6.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-10 00:05:19 -07:00
Simon Arlott 85886162f1 git-svn: hide find_parent_branch output in double quiet mode
Hide find_parent_branch logging when -qq is specified.
This eliminates more unnecessary output when run from cron, e.g.:

Found possible branch point:
http://undernet-ircu.svn.sourceforge.net/svnroot/undernet-ircu/ircu2/trunk =>
http://undernet-ircu.svn.sourceforge.net/svnroot/undernet-ircu/ircu2/branches/authz,
1919
Found branch parent: (authz) ea061d76aea985dc0208d36fa5e0b2249b698557
Following parent with do_switch
Successfully followed parent

Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-10 00:00:40 -07:00
Jonathan Nieder 33405be34b Documentation: clone: clarify discussion of initial branch
When saying the initial branch is equal to the currently active
remote branch, it is probably intended that the branch heads
point to the same commit.  Maybe it would be more useful to a
new user to emphasize that the tree contents and history are the
same.

More important, probably, is that this new branch is set up so
that "git pull" merges changes from the corresponding remote
branch.  The next paragraph addresses that directly.  What the
reader needs to know to begin with is that (1) the initial branch
is your own; if you do not pull, it won't get updated, and that
(2) the initial branch starts out at the same commit as the
upstream.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09 17:21:46 -07:00
Joe Perches 02461e0e28 git-send-email.perl: fold multiple entry "Cc:" and multiple single line "RCPT TO:"s
Some MTAs reject Cc: lines longer than 78 chars.
Avoid this by using the same join as "To:" ",\n\t"
so each subsequent Cc entry is on a new line.

RCPT TO: should have a single entry per line.
see: http://www.ietf.org/rfc/rfc2821.txt

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09 17:02:21 -07:00
Junio C Hamano a17a9606e4 Merge branch 'rs/maint-archive-prefix'
* rs/maint-archive-prefix:
  Git archive and trailing "/" in prefix
2009-10-09 16:27:16 -07:00
Junio C Hamano e12bfd86c1 Merge branch 'fc/mutt-alias'
* fc/mutt-alias:
  send-email: fix mutt regex for grouped aliases
2009-10-09 16:26:49 -07:00
Junio C Hamano c2c865684b Merge branch 'ef/msvc-noreturn'
* ef/msvc-noreturn:
  add NORETURN_PTR for function pointers
  increase portability of NORETURN declarations
2009-10-09 16:26:35 -07:00
Junio C Hamano 302e99b79a Merge branch 'jk/reflog-date'
* jk/reflog-date:
  improve reflog date/number heuristic
2009-10-09 16:26:11 -07:00
Junio C Hamano 170a4814d3 Merge branch 'ch/am-header'
* ch/am-header:
  git-am: force egrep to use correct characters set
  git-am: fixed patch_format detection according to RFC2822
2009-10-09 16:25:40 -07:00
Björn Gustavsson e1c1a0674b bash: add support for 'git replace'
Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09 15:36:41 -07:00
Stephen Boyd e0d7805954 completion: fix alias listings with newlines
Aliases with newlines have been a problem since commit 56fc25f (Bash
completion support for remotes in .git/config., 2006-11-05). The chance
of the problem occurring has been slim at best, until commit 518ef8f
(completion: Replace config --list with --get-regexp, 2009-09-11)
removed the case statement introduced by commit 56fc25f. Before removing
the case statement, most aliases with newlines would work unless they
were specially crafted as follows

[alias]
	foo = "log -1 --pretty='format:%s\nalias.error=broken'"

After removing the case statement, a more benign alias like

[alias]
	whowhat = "log -1 --pretty='format:%an <%ae>\n%s'"
	wont-complete = ...

would cause the completion to break badly.

For now, revert the removal of the case statement until someone comes up
with a better way to get keys from git-config.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09 15:00:40 -07:00
Stephen Boyd 427e586b19 completion: fix completion of git <TAB><TAB>
After commit 511a3fc (wrap git's main usage string., 2009-09-12), the
bash completion for git commands includes COMMAND and [ARGS] when it
shouldn't. Fix this by grepping more strictly for a line with git
commands. It's doubtful whether git will ever have commands starting
with anything besides numbers and letters so this should be fine. At
least by being stricter we'll know when we break the completion earlier.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09 15:00:24 -07:00
Ingmar Vanhassel b6aaaa4470 import-tars: Add missing closing bracket
This fixes an obvious syntax error that snuck in commit 7e787953:

  syntax error at /home/ingmar/bin//git-import-tars line 143, near "/^$/ { "
  syntax error at /home/ingmar/bin//git-import-tars line 145, near "} else"
  syntax error at /home/ingmar/bin//git-import-tars line 152, near "}"

Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
Acked-and-Tested-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09 14:58:13 -07:00
Jakub Narebski 1655c98790 gitweb: Do not show 'patch' link for merge commits
The 'patch' view is about generating text/plain patch that can be
given to "git am", and "git am" doesn't understand merges anyway.
Therefore link to 'patch' view should not be shown for merge commits.

Also call to git-format-patch inside the 'patch' action would fail
when 'patch' action is called for a merge commit, with "Reading
git-format-patch failed" text as 'patch' view body.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09 14:57:06 -07:00
Jonathan Nieder 989c530e7f racy-git.txt: explain nsec problem in more detail
Idealists may want USE_NSEC to be the default on Linux some day.
Point to a patch to better explain the requirements on
filesystem code for that to happen.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09 14:56:32 -07:00
Jonathan Nieder 580cbb58a2 Documentation: clarify "working tree" definition
It is not necessarily obvious to a git novice what it means for a
filesystem tree to be equal to the HEAD.  Spell it out.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09 14:54:55 -07:00