Commit graph

31395 commits

Author SHA1 Message Date
Junio C Hamano 8552e2e590 Merge branch 'bw/get-tz-offset-perl' into maint
* bw/get-tz-offset-perl:
  cvsimport: format commit timestamp ourselves without using strftime
  perl/Git.pm: fix get_tz_offset to properly handle DST boundary cases
  Move Git::SVN::get_tz to Git::get_tz_offset
2013-02-25 08:04:03 -08:00
Junio C Hamano b79faa99e6 Merge branch 'al/mergetool-printf-fix' into maint
* al/mergetool-printf-fix:
  difftool--helper: fix printf usage
  git-mergetool: print filename when it contains %
2013-02-25 08:04:01 -08:00
Junio C Hamano 75288cc7e1 Merge branch 'jx/utf8-printf-width' into maint
* jx/utf8-printf-width:
  Add utf8_fprintf helper that returns correct number of columns
2013-02-25 08:03:59 -08:00
Junio C Hamano d08d259095 Merge branch 'mg/bisect-doc' into maint
* mg/bisect-doc:
  git-bisect.txt: clarify that reset quits bisect
2013-02-25 08:03:57 -08:00
Junio C Hamano 7927f510f7 Merge branch 'sp/smart-http-content-type-check' into maint
* sp/smart-http-content-type-check:
  http_request: reset "type" strbuf before adding
  t5551: fix expected error output
  Verify Content-Type from smart HTTP servers
2013-02-25 08:03:54 -08:00
Junio C Hamano d49f9f178b Merge branch 'jc/combine-diff-many-parents' into maint
* jc/combine-diff-many-parents:
  t4038: add tests for "diff --cc --raw <trees>"
  combine-diff: lift 32-way limit of combined diff
2013-02-25 08:03:51 -08:00
Junio C Hamano 66d12f97d0 Merge branch 'jk/apply-similaritly-parsing' into maint
* jk/apply-similaritly-parsing:
  builtin/apply: tighten (dis)similarity index parsing
2013-02-25 08:03:44 -08:00
Junio C Hamano 7be093133c Merge branch 'jk/remote-helpers-doc' into maint
* jk/remote-helpers-doc:
  Rename {git- => git}remote-helpers.txt
2013-02-25 08:03:37 -08:00
Junio C Hamano aaf4f28d90 Merge branch 'ab/gitweb-use-same-scheme' into maint
* ab/gitweb-use-same-scheme:
  gitweb: refer to picon/gravatar images over the same scheme
2013-02-25 08:03:34 -08:00
Junio C Hamano c0e96dd2ca Merge branch 'zk/clean-report-failure' into maint
* zk/clean-report-failure:
  git-clean: Display more accurate delete messages
2013-02-25 08:03:32 -08:00
Junio C Hamano 0e0c3f25d0 Merge branch 'nd/clone-no-separate-git-dir-with-bare' into maint
* nd/clone-no-separate-git-dir-with-bare:
  clone: forbid --bare --separate-git-dir <dir>
2013-02-25 08:03:27 -08:00
Junio C Hamano a8e00d7b83 Merge branch 'da/p4merge-mktemp' into maint
* da/p4merge-mktemp:
  mergetools/p4merge: Honor $TMPDIR for the /dev/null placeholder
2013-02-25 08:03:20 -08:00
Greg Price 4f021b34f2 Documentation: "advice" is uncountable
"Advice" is a mass noun, not a count noun; it's not ordinarily
pluralized.

Signed-off-by: Greg Price <price@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-25 07:31:28 -08:00
Junio C Hamano dff9f8835f Git 1.8.1.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-19 21:54:22 -08:00
Junio C Hamano 0ee7198f45 Merge branch 'ob/imap-send-ssl-verify' into maint
* ob/imap-send-ssl-verify:
  imap-send: support subjectAltName as well
  imap-send: the subject of SSL certificate must match the host
  imap-send: move #ifdef around
2013-02-19 21:54:15 -08:00
Oswald Buddenhagen e174744ad1 imap-send: support subjectAltName as well
Check not only the common name of the certificate subject, but also
check the subject alternative DNS names as well, when verifying that
the certificate matches that of the host we are trying to talk to.

Signed-off-by: Oswald Buddenhagen <ossi@kde.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-19 21:47:22 -08:00
Oswald Buddenhagen b62fb077d5 imap-send: the subject of SSL certificate must match the host
We did not check a valid certificate's subject at all, and would
have happily talked with a wrong host after connecting to an
incorrect address and getting a valid certificate that does not
belong to the host we intended to talk to.

Signed-off-by: Oswald Buddenhagen <ossi@kde.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-19 21:47:22 -08:00
Junio C Hamano 1e1fe52923 imap-send: move #ifdef around
Instead of adding an early return to the inside of the
ssl_socket_connect() function for NO_OPENSSL compilation, split it
into a separate stub function.

No functional change, but the next change to extend ssl_socket_connect()
will become easier to read this way.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-18 16:33:07 -08:00
W. Trevor King 7ed1690c34 user-manual: use -o latest.tar.gz to create a gzipped tarball
This functionality was introduced by 0e804e09 (archive: provide
builtin .tar.gz filter, 2011-07-21) for v1.7.7.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-18 00:48:52 -08:00
W. Trevor King 632cc3e6b6 user-manual: use 'git config --global user.*' for setup
A simple command line call is easier than spawning an editor,
especially for folks new to ideas like the "command line" and "text
editors".  This is also the approach suggested by 'git commit' if you
try and commit without having configured user.name or user.email.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-18 00:48:47 -08:00
W. Trevor King 47adb8ac7c user-manual: mention 'git remote add' for remote branch config
I hardly ever setup remote.<name>.url using 'git config'.  While it
may be instructive to do so, we should also point out 'git remote
add'.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-18 00:48:42 -08:00
W. Trevor King d1471e0616 user-manual: give 'git push -f' as an alternative to +master
This mirrors existing language in the description of 'git fetch'.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-18 00:48:37 -08:00
W. Trevor King e9b4908302 user-manual: use 'remote add' to setup push URLs
There is no need to use here documents to setup this configuration.
It is easier, less confusing, and more robust to use `git remote add`
directly.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-18 00:48:30 -08:00
Matthieu Moy d32805dce7 Replace filepattern with pathspec for consistency
pathspec is the most widely used term, and is the one defined in
gitglossary.txt. <filepattern> was used only in the synopsys for git-add
and git-commit, and in git-add.txt. Get rid of it.

This patch is obtained with by running:

  perl -pi -e 's/filepattern/pathspec/' `git grep -l filepattern`

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-12 10:05:38 -08:00
Jiang Xin c082196575 Add utf8_fprintf helper that returns correct number of columns
Since command usages can be translated, they may include utf-8
encoded strings, and the output in console may not align well any
more. This is because strlen() is different from strwidth() on utf-8
strings.

A wrapper utf8_fprintf() can help to return the correct number of
columns required.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Reviewed-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-11 11:29:45 -08:00
Michael J Gruber c787a45452 git-bisect.txt: clarify that reset quits bisect
"reset" can be easily misunderstood as resetting a bisect session to its
start without finishing it. Clarify that it actually quits the bisect
session.

Reported-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-11 08:40:34 -08:00
W. Trevor King 901fd180c9 user-manual: Rewrite git-gc section for automatic packing
This should have happened back in 2007, when `git gc` learned about
auto (e9831e8, git-gc --auto: add documentation, 2007-09-17).

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-10 20:39:26 -08:00
W. Trevor King da2c7b3dc5 user-manual: Fix 'you - Git' -> 'you--Git' typo
Use an em-dash, not a hyphen, to join these clauses.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-10 20:39:25 -08:00
W. Trevor King de3f2c7b46 user-manual: Fix 'http' -> 'HTTP' typos
HTTP is an acronym which has not (yet) made the transition to word
status (unlike "laser", probably because lasers are inherently cooler
than HTTP ;).

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-10 20:39:20 -08:00
W. Trevor King ddd2369c5c user-manual: Fix 'both: so' -> 'both; so' typo
The clause "so `git log ...` will return no commits..." is
independent, not a description of "both", so a semicolon is more
appropriate.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-10 14:18:57 -08:00
David Aguilar 2a9ccfff55 difftool--helper: fix printf usage
Do not use a random string as if it is a format string for printf
when showing it literally; instead feed it to '%s' format.

Reported-by: Asheesh Laroia <asheesh@asheesh.org>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-10 11:35:50 -08:00
Ben Walton 48c9162857 cvsimport: format commit timestamp ourselves without using strftime
Some implementations of strftime(3) lack support for "%z".  Also
there is no need for %s in git-cvsimport as the supplied time is
already in seconds since the epoch.

For %z, use the function get_tz_offset provided by Git.pm instead.

Signed-off-by: Ben Walton <bdwalton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-09 14:41:49 -08:00
Ben Walton 75f7b5dfc4 perl/Git.pm: fix get_tz_offset to properly handle DST boundary cases
When passed a local time that was on the boundary of a DST change,
get_tz_offset returned a GMT offset that was incorrect (off by one
hour).  This is because the time was converted to GMT and then back to
a time stamp via timelocal() which cannot disambiguate boundary cases
as noted in its documentation.

Modify this algorithm, using an approach suggested in

  http://article.gmane.org/gmane.comp.version-control.git/213871

to first convert the timestamp in question to two broken down forms
with localtime() and gmtime(), and then compute what timestamps
these two broken down forms would represent in GMT (i.e. a timezone
that does not have DST issues) by applying timegm() on them.  The
difference between the resulting timestamps is the timezone offset.

This avoids the ambigious conversion and allows a correct time to be
returned on every occassion.

Signed-off-by: Ben Walton <bdwalton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-09 14:34:18 -08:00
Ben Walton 68868ff573 Move Git::SVN::get_tz to Git::get_tz_offset
This function has utility outside of the SVN module for any routine
that needs the equivalent of GNU strftime's %z formatting option.
Move it to the top-level Git.pm so that non-SVN modules don't need to
import the SVN module to use it.

The rename makes the purpose of the function clearer.

Signed-off-by: Ben Walton <bdwalton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-09 14:01:28 -08:00
Asheesh Laroia 59cf706b23 git-mergetool: print filename when it contains %
If git-mergetool was invoked with files with a percent sign (%) in
their names, it would print an error.  For example, if you were
calling mergetool on a file called "%2F":

    printf: %2F: invalid directive

Do not pass random string to printf as if it were a valid format.
Use format string "%s" and pass the string as data to be formatted
instead.

Signed-off-by: Asheesh Laroia <asheesh@asheesh.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-08 13:10:06 -08:00
Junio C Hamano f350082525 Git 1.8.1.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-07 15:21:10 -08:00
Junio C Hamano 57ff1703d7 Merge branch 'mz/pick-unborn' into maint
"git cherry-pick" did not replay a root commit to an unborn branch.

* mz/pick-unborn:
  learn to pick/revert into unborn branch
  tests: move test_cmp_rev to test-lib-functions
2013-02-07 15:16:04 -08:00
Junio C Hamano 5abbeb4921 Merge branch 'nd/fix-perf-parameters-in-tests' into maint
* nd/fix-perf-parameters-in-tests:
  test-lib.sh: unfilter GIT_PERF_*
2013-02-07 15:16:00 -08:00
Junio C Hamano 696c35972f Merge branch 'jc/do-not-let-random-file-interfere-with-completion-tests' into maint
Scripts to test bash completion was inherently flaky as it was
affected by whatever random things the user may have on $PATH.

* jc/do-not-let-random-file-interfere-with-completion-tests:
  t9902: protect test from stray build artifacts
2013-02-07 15:15:23 -08:00
Junio C Hamano 772847341b Merge branch 'ft/transport-report-segv' into maint
A failure to push due to non-ff while on an unborn branch
dereferenced a NULL pointer when showing an error message.

* ft/transport-report-segv:
  push: fix segfault when HEAD points nowhere
2013-02-07 15:15:08 -08:00
Junio C Hamano d2216a4b13 Merge branch 'sb/gpg-plug-fd-leak' into maint
We forgot to close the file descriptor reading from "gpg" output,
killing "git log --show-signature" on a long history.

* sb/gpg-plug-fd-leak:
  gpg: close stderr once finished with it in verify_signed_buffer()
2013-02-07 15:14:54 -08:00
Junio C Hamano 427c6d0caf Merge branch 'jc/fake-ancestor-with-non-blobs' into maint
Rebasing the history of superproject with change in the submodule
has been broken since v1.7.12.

* jc/fake-ancestor-with-non-blobs:
  apply: diagnose incomplete submodule object name better
  apply: simplify build_fake_ancestor()
  git-am: record full index line in the patch used while rebasing
2013-02-07 15:14:22 -08:00
Junio C Hamano 45bb6cbb49 Merge branch 'jn/auto-depend-workaround-buggy-ccache' into maint
Buggy versions of ccache broke the auto-generation of dependencies.

* jn/auto-depend-workaround-buggy-ccache:
  Makefile: explicitly set target name for autogenerated dependencies
2013-02-07 15:13:34 -08:00
Jeff King 3443db51a0 http_request: reset "type" strbuf before adding
Callers may pass us a strbuf which we use to record the
content-type of the response. However, we simply appended to
it rather than overwriting its contents, meaning that cruft
in the strbuf gave us a bogus type. E.g., the multiple
requests triggered by http_request could yield a type like
"text/plainapplication/x-git-receive-pack-advertisement".

Reported-by: Michael Schubert <mschub@elegosoft.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-06 07:50:56 -08:00
John Keeping edbc00e76d t4038: add tests for "diff --cc --raw <trees>"
Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-05 13:54:30 -08:00
Junio C Hamano af3aec4469 t5551: fix expected error output
We should probably get rid of the check of message instead, but in
the meantime this should do.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-04 16:21:42 -08:00
Shawn Pearce 4656bf47fc Verify Content-Type from smart HTTP servers
Before parsing a suspected smart-HTTP response verify the returned
Content-Type matches the standard. This protects a client from
attempting to process a payload that smells like a smart-HTTP
server response.

JGit has been doing this check on all responses since the dawn of
time. I mistakenly failed to include it in git-core when smart HTTP
was introduced. At the time I didn't know how to get the Content-Type
from libcurl. I punted, meant to circle back and fix this, and just
plain forgot about it.

Signed-off-by: Shawn Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-04 10:22:36 -08:00
Junio C Hamano 42f50f8d01 Start preparing for 1.8.1.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-04 10:21:10 -08:00
Junio C Hamano 390ac27a18 Merge branch 'bc/git-p4-for-python-2.4' into maint
* bc/git-p4-for-python-2.4:
  INSTALL: git-p4 does not support Python 3
  git-p4.py: support Python 2.4
  git-p4.py: support Python 2.5
2013-02-04 10:04:58 -08:00
Junio C Hamano 6cc01490c3 Merge branch 'nd/edit-branch-desc-while-detached' into maint
Attempt to "branch --edit-description" an existing branch, while
being on a detached HEAD, errored out.

* nd/edit-branch-desc-while-detached:
  branch: no detached HEAD check when editing another branch's description
2013-02-04 10:04:44 -08:00