Commit graph

21390 commits

Author SHA1 Message Date
Ramkumar Ramachandra 4916c8f953 imap-send: Remove limitation on message body
There is a documented limitation on the body of any email not being
able to contain lines starting with "From ". This patch removes that
limitation by improving the parser to search for "From", "Date", and
"Subject" fields in the email before considering it to be an email.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-24 11:00:25 -07:00
Junio C Hamano 0b3dcfe721 Git 1.7.0.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-21 17:01:22 -07:00
Junio C Hamano d16a5dafdc Merge branch 'maint-1.6.6' into maint
* maint-1.6.6:
  Documentation/git-clone: Transform description list into item list
  Documentation/urls: Remove spurious example markers
  Documentation/gitdiffcore: Remove misleading date in heading
  Documentation/git-reflog: Fix formatting of command lists
2010-03-21 17:00:22 -07:00
Michael J Gruber 11f54989da .mailmap: Map the the first submissions of MJG by e-mail
so that git shortlog with '-e' coalesces all my commits.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-21 16:30:17 -07:00
Michael J Gruber 476386858c Documentation/git-clone: Transform description list into item list
so that the list of examples is formatted in the same way as for
git-fetch, and, more importantly, the different identation for the
code blocks in the examples (compared to the immediately preceding code
blocks from url.txt) doesn't look like misformatted, but is clarified by
the items' bullets.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-21 14:45:05 -07:00
Michael J Gruber a3cfb7f83f Documentation/urls: Remove spurious example markers
In urls.txt (which is included from git-{clone,fetch,push}.txt)
several item lists are surrounded by example block markers. This is
problematic for two reasons:

- None of these lists are example lists, so they should not be marked as
  such semantically.
- The html output looks weird (bulleted list with left sidebar).

Therefore, remove the example block markers. Output by the man backend
is unaffected.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-21 14:42:24 -07:00
Michael J Gruber dddfb3f126 Documentation/gitdiffcore: Remove misleading date in heading
Ever since the automatic conversion into man form, the heading
contained a misidentified subheading reading "June 2005".
Remove this since the documentation is more recent, and the correct
date is in the footer.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-21 14:40:18 -07:00
Michael J Gruber b6c7c41b17 Documentation/git-reflog: Fix formatting of command lists
A misplaced list continuation mark appears literally in the
rendered doc. Fix this by removing it.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-21 14:40:02 -07:00
Junio C Hamano 8fe5d87622 Update draft release notes to 1.7.0.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-20 11:29:13 -07:00
Andreas Gruenbacher 730b020030 fetch: Fix minor memory leak
A temporary struct ref is allocated in store_updated_refs() but not
freed.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-20 09:28:48 -07:00
Andreas Gruenbacher 8da61a2ab4 fetch: Future-proof initialization of a refspec on stack
The open-coded version to initialize each and every member will break
when a new member is added to the structure.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-20 09:27:17 -07:00
Andreas Gruenbacher aac1d7b889 fetch: Check for a "^{}" suffix with suffixcmp()
Otherwise, we will check random bytes for ref names < 3 characters.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-20 09:25:25 -07:00
Imre Deak e9bd323510 daemon: parse_host_and_port SIGSEGV if port is specified
This typo will lead to git-daemon dying any time the connect
string includes a port after the host= attribute. This can lead
for example to one of the following error messages on the client
side when someone tries git clone git://...:<port>.

When the daemon is running on localhost:
  fatal: The remote end hung up unexpectedly

or when the daemon is connected through an ssh tunnel:
  fatal: protocol error: bad line length character: erro

In the latter case 'erro' comes from the daemon's reply:
  error: git-daemon died of signal 11

Signed-off-by: Imre Deak <imre.deak@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-20 08:49:31 -07:00
Jonathan Nieder c40d92e4c7 Makefile: Fix CDPATH problem
If CDPATH is set, "cd" prints its destination to stdout, causing
the common (cd a && tar cf - .) | (cd b && tar xf -) idiom to fail.
For example:

 make -C templates DESTDIR='' install
 make[1]: Entering directory `/users/e477610/exptool/src/git-1.7.0.2/templates'
 install -d -m 755 '/home/e477610/exptool/share/git-core/templates'
 (cd blt && gtar cf - .) | \
	(cd '/home/e477610/exptool/share/git-core/templates' && umask 022 && gtar xof -)
 gtar: This does not look like a tar archive

Most git scripts already protect against use of CDPATH through
git-sh-setup, but the Makefile doesn’t.

Reported-by: Michael Cox <mhcox@bluezoosoftware.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-20 08:25:31 -07:00
Stephen Boyd 0d12e59f63 pull: replace unnecessary sed invocation
Getting the shortened branch name is as easy as using the shell's
parameter expansion.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-20 07:25:02 -07:00
Thomas Rast 7d182f52f1 Documentation: receive.denyCurrentBranch defaults to 'refuse'
acd2a45 (Refuse updating the current branch in a non-bare repository
via push, 2009-02-11) changed the default to refuse such a push, but
it forgot to update the docs.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-17 11:07:06 -07:00
Ian Ward Comfort d23e7570a7 bash: complete *_HEAD refs if present
We already complete HEAD, of course, and might as well complete the other
common refs mentioned in the rev-parse man page: FETCH_HEAD, ORIG_HEAD, and
MERGE_HEAD.

Signed-off-by: Ian Ward Comfort <icomfort@stanford.edu>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-17 11:03:44 -07:00
Michael J Gruber 7325283987 Documentation/git-read-tree: clarify 2-tree merge
Clarify the description of the 2-tree merge by defining the terms
which are used in the table, and by applying some small linguistic
changes.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-15 15:25:17 -07:00
Michael J Gruber 71928f7f11 Documentation/git-read-tree: fix table layout
Asciidoc takes the first non-space character in the first line of the
paragraph as a reference point for preformatted layout, so adjust to
that to make the table align.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-15 15:20:03 -07:00
Dave Olszewski 8fcaca3ff2 don't use default revision if a rev was specified
If a revision is specified, it happens not to have any commits, don't
use the default revision.  By doing so, surprising and undesired
behavior can happen, such as showing the reflog for HEAD when a branch
was specified.

[jc: squashed a test from René]

Signed-off-by: Dave Olszewski <cxreg@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-13 21:23:43 -08:00
René Scharfe 8ca7880356 for_each_recent_reflog_ent(): use strbuf, fix offset handling
As Vladimir reported, "git log -g refs/stash" surprisingly showed the reflog
of HEAD if the message in the reflog file was too long.  To fix this, convert
for_each_recent_reflog_ent() to use strbuf_getwholeline() instead of fgets(),
for safety and to avoid any size limits for reflog entries.

Also reverse the logic of the part of the function that only looks at file
tails.  It used to close the file if fgets() succeeded.  The following
fgets() call in the while loop was likely to fail in this case, too, so
passing an offset to for_each_recent_reflog_ent() never worked.  Change it to
error out if strbuf_getwholeline() fails instead.

Reported-by: Vladimir Panteleev <vladimir@thecybershadow.net>
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-13 13:18:09 -08:00
Junio C Hamano 34b383e7cd t/Makefile: remove test artifacts upon "make clean"
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-13 12:41:20 -08:00
René Scharfe 00fb3d214c blame: fix indent of line numbers
Correct the calculation of the number of digits for line counts of the
form 10^n-1 (9, 99, ...) in lineno_width().  This makes blame stop
printing an extra space before the line numbers of files with that many
total lines.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-13 12:04:17 -08:00
Junio C Hamano 4a2284b999 t9400: Use test_cmp when appropriate
Consistently using test_cmp would make debugging test scripts far easier,
as output from them run under "-v" option becomes readable.

Besides, some platforms' "diff" implementations lack "-q" option.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-11 21:40:33 -08:00
Junio C Hamano 7ff8b790bb Merge accumulated fixes to prepare for 1.7.0.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-08 00:50:37 -08:00
Junio C Hamano 6eb3adff9e Merge branch 'mw/maint-gcc-warns-unused-write' into maint
* mw/maint-gcc-warns-unused-write:
  run-command.c: fix build warnings on Ubuntu
2010-03-08 00:36:02 -08:00
Junio C Hamano 990169b9b1 Merge branch 'fn/maint-mkdtemp-compat' into maint
* fn/maint-mkdtemp-compat:
  Fix gitmkdtemp: correct test for mktemp() return value
2010-03-08 00:36:02 -08:00
Junio C Hamano bd08ecc487 Merge branch 'gb/maint-submodule-env' into maint
* gb/maint-submodule-env:
  is_submodule_modified(): clear environment properly
  submodules: ensure clean environment when operating in a submodule
  shell setup: clear_local_git_env() function
  rev-parse: --local-env-vars option
  Refactor list of of repo-local env vars
2010-03-08 00:36:02 -08:00
Junio C Hamano 030bc0aa8b Merge branch 'as/maint-expire' into maint
* as/maint-expire:
  reflog: honor gc.reflogexpire=never
  prune: honor --expire=never
2010-03-08 00:36:01 -08:00
Junio C Hamano 193c7aaf5f Merge branch 'ml/maint-grep-doc' into maint
* ml/maint-grep-doc:
  grep docs: document --no-index option
  grep docs: --cached and <tree>... are incompatible
  grep docs: use AsciiDoc literals consistently
  grep docs: pluralize "Example" section
2010-03-08 00:36:01 -08:00
Junio C Hamano 57c118c268 Merge branch 'jk/maint-push-tracking-wo-remote' into maint
* jk/maint-push-tracking-wo-remote:
  push: fix segfault for odd config
2010-03-08 00:36:01 -08:00
Junio C Hamano 2dd96ea21f Merge branch 'jc/fetch-param' into maint
* jc/fetch-param:
  fetch --all/--multiple: keep all the fetched branch information
  builtin-fetch --all/--multi: propagate options correctly
  t5521: fix and modernize
2010-03-08 00:36:00 -08:00
Junio C Hamano 162b4643b6 Merge branch 'ne/pack-local-doc' into maint
* ne/pack-local-doc:
  pack-objects documentation: Fix --honor-pack-keep as well.
  pack-objects documentation: reword "objects that appear in the standard input"
  Documentation: pack-objects: Clarify --local's semantics.
2010-03-08 00:36:00 -08:00
Junio C Hamano 919451330b Merge branch 'jk/maint-add--interactive-delete' into maint
* jk/maint-add--interactive-delete:
  add-interactive: fix bogus diff header line ordering
2010-03-08 00:36:00 -08:00
Junio C Hamano 493e433277 Merge branch 'mm/mkstemps-mode-for-packfiles' into maint
* mm/mkstemps-mode-for-packfiles:
  Use git_mkstemp_mode instead of plain mkstemp to create object files
  git_mkstemps_mode: don't set errno to EINVAL on exit.
  Use git_mkstemp_mode and xmkstemp_mode in odb_mkstemp, not chmod later.
  git_mkstemp_mode, xmkstemp_mode: variants of gitmkstemps with mode argument.
  Move gitmkstemps to path.c
  Add a testcase for ACL with restrictive umask.
2010-03-08 00:36:00 -08:00
Junio C Hamano 6ae611fa8d Merge branch 'jc/maint-fix-mailinfo-strip' into maint
* jc/maint-fix-mailinfo-strip:
  mailinfo: do not strip leading spaces even for a header line
2010-03-08 00:35:59 -08:00
Junio C Hamano 1f54d693fd Merge branch 'jc/grep-author-all-match-implicit' into maint
* jc/grep-author-all-match-implicit:
  "log --author=me --grep=it" should find intersection, not union
2010-03-08 00:35:59 -08:00
Junio C Hamano 89cd4aa862 Merge branch 'jc/checkout-detached' into maint
* jc/checkout-detached:
  Reword "detached HEAD" notification
2010-03-08 00:35:59 -08:00
Junio C Hamano 4ac23f375f Merge branch 'maint-1.6.6' into maint
* maint-1.6.6:
2010-03-08 00:35:58 -08:00
Junio C Hamano c214f2c80c Merge branch 'jc/maint-fix-test-perm' into maint-1.6.6
* jc/maint-fix-test-perm:
  lib-patch-mode.sh: Fix permission
  t6000lib: Fix permission
2010-03-07 14:54:05 -08:00
Junio C Hamano 8499da0476 Merge branch 'sp/maint-push-sideband' into maint-1.6.6
* sp/maint-push-sideband:
  receive-pack: Send internal errors over side-band #2
  t5401: Use a bare repository for the remote peer
  receive-pack: Send hook output over side band #2
  receive-pack: Wrap status reports inside side-band-64k
  receive-pack: Refactor how capabilities are shown to the client
  send-pack: demultiplex a sideband stream with status data
  run-command: support custom fd-set in async
  run-command: Allow stderr to be a caller supplied pipe
2010-03-07 14:54:01 -08:00
Junio C Hamano 47b333f759 Merge branch 'hm/maint-imap-send-crlf' into maint-1.6.6
* hm/maint-imap-send-crlf:
  git-imap-send: Convert LF to CRLF before storing patch to draft box
2010-03-07 14:53:57 -08:00
Junio C Hamano b7380fa7a9 Merge branch 'gf/maint-sh-setup-nongit-ok' into maint-1.6.6
* gf/maint-sh-setup-nongit-ok:
  require_work_tree broken with NONGIT_OK
2010-03-07 14:53:53 -08:00
Junio C Hamano cb16bcc369 Merge branch 'jk/maint-rmdir-fix' into maint-1.6.6
* jk/maint-rmdir-fix:
  rm: fix bug in recursive subdirectory removal
2010-03-07 14:53:50 -08:00
Junio C Hamano 11a1a49a16 Merge branch 'rs/optim-text-wrap' into maint-1.6.6
* rs/optim-text-wrap:
  utf8.c: speculatively assume utf-8 in strbuf_add_wrapped_text()
  utf8.c: remove strbuf_write()
  utf8.c: remove print_spaces()
  utf8.c: remove print_wrapped_text()
2010-03-07 14:53:45 -08:00
Junio C Hamano 7b576f9910 Merge branch 'tr/maint-cherry-pick-list' into maint-1.6.6
* tr/maint-cherry-pick-list:
  cherry_pick_list: quit early if one side is empty
2010-03-07 14:53:40 -08:00
Junio C Hamano 7f43e75adc Merge branch 'cc/maint-bisect-paths' into maint-1.6.6
* cc/maint-bisect-paths:
  bisect: error out when passing bad path parameters
2010-03-07 14:53:35 -08:00
Junio C Hamano 97222d9634 Git 1.7.0.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-07 11:07:51 -08:00
Bert Wesarg 5565f47c40 unset GREP_OPTIONS in test-lib.sh
I used to set GREP_OPTIONS to exclude *.orig and *.rej files. But with this
the test t4252-am-options.sh fails because it calls grep with a .rej file:

    grep "@@ -1,3 +1,3 @@" file-2.rej

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-07 11:05:18 -08:00
Matthieu Moy 5d005922bc stash: suggest the correct command line for unknown options.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-06 20:00:42 -08:00