1
0
mirror of https://github.com/git/git.git synced 2024-10-21 12:48:32 +02:00
Commit Graph

19571 Commits

Author SHA1 Message Date
Brian Gianforcaro
eeefa7c90e Style fixes, add a space after if/for/while.
The majority of code in core git appears to use a single
space after if/for/while. This is an attempt to bring more
code to this standard. These are entirely cosmetic changes.

Signed-off-by: Brian Gianforcaro <b.gianfo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-31 23:26:28 -07:00
Junio C Hamano
554555ac7d Merge branch 'lt/approxidate'
* lt/approxidate:
  fix approxidate parsing of relative months and years
  tests: add date printing and parsing tests
  refactor test-date interface
  Add date formatting and parsing functions relative to a given time
  Further 'approxidate' improvements
  Improve on 'approxidate'

Conflicts:
	date.c
2009-08-31 22:11:36 -07:00
Junio C Hamano
909beb860b Merge branch 'mr/gitweb-snapshot'
* mr/gitweb-snapshot:
  gitweb: add t9501 tests for checking HTTP status codes
  gitweb: split test suite into library and tests
  gitweb: improve snapshot error handling
2009-08-31 22:09:53 -07:00
Junio C Hamano
d34eca0392 Merge branch 'tf/diff-whitespace-incomplete-line'
* tf/diff-whitespace-incomplete-line:
  xutils: Fix xdl_recmatch() on incomplete lines
  xutils: Fix hashing an incomplete line with whitespaces at the end
2009-08-31 22:08:57 -07:00
Jeff King
931e8e27d9 fix approxidate parsing of relative months and years
These were broken by b5373e9. The problem is that the code
marks the month and year with "-1" for "we don't know it
yet", but the month and year code paths were not adjusted to
fill in the current time before doing their calculations
(whereas other units follow a different code path and are
fine).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-30 22:04:56 -07:00
Jeff King
34dc6e73b0 tests: add date printing and parsing tests
Until now, there was no coverage of relative date printing
or approxidate parsing routines (mainly because we had no
way of faking the "now" time for relative date calculations,
which made consistent testing impossible).

This new script tries to exercise the basic features of
show_date and approxidate. Most of the tests are just "this
obvious thing works" to prevent future regressions, with a
few exceptions:

  - We confirm the fix in 607a9e8 that relative year/month
    dates in the latter half of a year round correctly.

  - We confirm that the improvements in b5373e9 and 1bddb25
    work.

  - A few tests are marked to expect failure, which are
    regressions recently introduced by the two commits
    above.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-30 22:04:56 -07:00
Jeff King
4f6552ea4c refactor test-date interface
The test-date program goes back to the early days of git,
where it was presumably used to do manual sanity checks on
changes to the date code. However, it is not actually used
by the test suite to do any sort of automatic of systematic
tests.

This patch refactors the interface to the program to try to
make it more suitable for use by the test suite. There
should be no fallouts to changing the interface since it is
not actually installed and is not internally called by any
other programs.

The changes are:

  - add a "mode" parameter so the caller can specify which
    operation to test

  - add a mode to test relative date output from show_date

  - allow faking a fixed time via the TEST_DATE_NOW
    environment variable, which allows consistent automated
    testing

  - drop the use of ctime for showing dates in favor of our
    internal iso8601 printing routines. The ctime output is
    somewhat redundant (because of the day-of-week) which
    makes writing test cases more annoying.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-30 22:04:46 -07:00
Alex Riesen
33012fc429 Add date formatting and parsing functions relative to a given time
The main purpose is to allow predictable testing of the code.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-30 19:59:11 -07:00
Junio C Hamano
f324cb50be Sync with 1.6.4.2 2009-08-29 14:52:03 -07:00
Junio C Hamano
82c3e21000 GIT 1.6.4.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.6.4.2
2009-08-29 14:31:01 -07:00
René Scharfe
f7aec129fa UI consistency: allow --force for where -f means force
git branch, checkout, clean, mv and tag all have an option -f to override
certain checks.  This patch makes them accept the long option --force as
a synonym.

While we're at it, document that checkout support --quiet as synonym for
its short option -q.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-29 14:08:03 -07:00
René Scharfe
53a1116c61 update-server-info: make builtin, use parseopt
Convert git update-server-info to a built-in command and use parseopt.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-29 14:07:25 -07:00
Nanako Shiraishi
e71c008dce Remove unused t/t8005/iso8859-5.txt
This file is no longer used since 54bc13c (t8005: Nobody writes Russian in
shift_jis, 2009-06-18).

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-29 00:50:31 -07:00
Junio C Hamano
d17982f19c Draft release notes to 1.6.5 before -rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-28 19:48:56 -07:00
Junio C Hamano
235db154f8 Merge branch 'mm/reset-report'
* mm/reset-report:
  reset: make the reminder output consistent with "checkout"
  Rename REFRESH_SAY_CHANGED to REFRESH_IN_PORCELAIN.
2009-08-28 19:39:26 -07:00
Junio C Hamano
4a224a9bbe Merge branch 'jk/maint-1.6.3-checkout-unborn'
* jk/maint-1.6.3-checkout-unborn:
  checkout: do not imply "-f" on unborn branches
2009-08-28 19:39:07 -07:00
Junio C Hamano
232d453766 Merge branch 'np/maint-1.6.3-deepen'
* np/maint-1.6.3-deepen:
  fix simple deepening of a repo

Conflicts:
	t/t5500-fetch-pack.sh
2009-08-28 19:38:56 -07:00
Junio C Hamano
433233e0b6 Merge branch 'jc/shortstatus'
* jc/shortstatus:
  git commit --dry-run -v: show diff in color when asked
  Documentation/git-commit.txt: describe --dry-run
  wt-status: collect untracked files in a separate "collect" phase
  Make git_status_config() file scope static to builtin-commit.c
  wt-status: move wt_status_colors[] into wt_status structure
  wt-status: move many global settings to wt_status structure
  commit: --dry-run
  status: show worktree status of conflicted paths separately
  wt-status.c: rework the way changes to the index and work tree are summarized
  diff-index: keep the original index intact
  diff-index: report unmerged new entries
2009-08-28 19:38:19 -07:00
Junio C Hamano
42fa6df99f Merge branch 'maint'
* maint:
  http.c: set slot callback members to NULL when releasing object
2009-08-28 19:37:57 -07:00
Junio C Hamano
48ae73b114 Merge branch 'rc/maint-http-fix' into maint
* rc/maint-http-fix:
  http.c: don't assume that urls don't end with slash
2009-08-28 19:34:16 -07:00
Tay Ray Chuan
4b9fa0e359 http.c: set slot callback members to NULL when releasing object
Set the members callback_func and callback_data of freq->slot to NULL
when releasing a http_object_request. release_active_slot() is also
invoked on the slot to remove the curl handle associated with the slot
from the multi stack (CURLM *curlm in http.c).

These prevent the callback function and data from being used in http
methods (like http.c::finish_active_slot()) after a
http_object_request has been free'd.

Noticed by Ali Polatel, who later tested this patch to verify that it
fixes the problem he saw; Dscho helped to identify the problem spot.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-28 19:24:43 -07:00
Brandon Casey
8648732e29 t/test-lib.sh: provide a shell implementation of the 'yes' utility
Some platforms (IRIX 6.5, Solaris 7) do not provide the 'yes' utility.
Currently, some tests, including t7610 and t9001, try to call this program.
Due to the way the tests are structured, the tests still pass even though
this program is missing.  Rather than succeeding by chance, let's provide
an implementation of the simple 'yes' utility in shell for all platforms to
use.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-28 16:36:24 -07:00
Junio C Hamano
aab9ea1aad Merge branch 'maint'
* maint:
  Fix overridable written with an extra 'e'
  Documentation: git-archive: mark --format as optional in summary
  Round-down years in "years+months" relative date view
2009-08-27 22:01:01 -07:00
Junio C Hamano
749086fa09 Merge branch 'maint-1.6.3' into maint
* maint-1.6.3:
  Fix overridable written with an extra 'e'
  Documentation: git-archive: mark --format as optional in summary
  Round-down years in "years+months" relative date view
2009-08-27 20:42:42 -07:00
Junio C Hamano
5e64650d93 Merge branch 'maint-1.6.2' into maint-1.6.3
* maint-1.6.2:
  Fix overridable written with an extra 'e'
  Documentation: git-archive: mark --format as optional in summary
  Round-down years in "years+months" relative date view

Conflicts:
	Documentation/git-archive.txt
2009-08-27 20:42:38 -07:00
Nanako Shiraishi
9319789804 Fix overridable written with an extra 'e'
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-27 20:41:48 -07:00
Junio C Hamano
891182f914 Merge branch 'maint-1.6.1' into maint-1.6.2
* maint-1.6.1:
  Documentation: git-archive: mark --format as optional in summary
2009-08-27 20:41:37 -07:00
Junio C Hamano
66fd74ea5d Merge branch 'maint-1.6.0' into maint-1.6.1
* maint-1.6.0:
  Documentation: git-archive: mark --format as optional in summary
2009-08-27 20:41:31 -07:00
Wesley J. Landaker
82d97da30a Documentation: git-archive: mark --format as optional in summary
The --format option was made optional in 8ff21b1 (git-archive: make
tar the default format, 2007-04-09), but it was not marked as optional
in the summary. This trival patch just changes the summary to match
the rest of the documentation.

Signed-off-by: Wesley J. Landaker <wjl@icecavern.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-27 20:05:10 -07:00
Junio C Hamano
a1eb73d917 Merge branch 'maint-1.5.6' into maint-1.6.0
* maint-1.5.6:
  revision traversal and pack: notice and die on missing commit
2009-08-27 20:03:35 -07:00
David Reiss
607a9e8aaa Round-down years in "years+months" relative date view
Previously, a commit from 1 year and 7 months ago would display as
"2 years, 7 months ago".

Signed-off-by: David Reiss <dreiss@facebook.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-27 19:59:00 -07:00
Mark Rada
e39e0d375d gitweb: add t9501 tests for checking HTTP status codes
Adds a new test file, t9501, that checks HTTP status codes and messages
from gitweb.

Currently, the only tests are for the snapshot feature.

Signed-off-by: Mark Rada <marada@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-27 19:56:28 -07:00
Mark Rada
05526071cb gitweb: split test suite into library and tests
To accommodate additions to the test cases for gitweb, the preamble
from t9500 is now in its own library so that new sets of tests for
gitweb can use the same setup without copying the code.

Signed-off-by: Mark Rada <marada@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-27 19:56:02 -07:00
Junio C Hamano
106a36509d Merge branch 'lt/block-sha1'
* lt/block-sha1:
  remove ARM and Mozilla SHA1 implementations
  block-sha1: guard gcc extensions with __GNUC__
  make sure byte swapping is optimal for git
  block-sha1: make the size member first in the context struct
2009-08-27 17:00:35 -07:00
Junio C Hamano
24343c6099 Merge branch 'as/maint-graph-interesting-fix'
* as/maint-graph-interesting-fix:
  Add tests for rev-list --graph with options that simplify history
  graph API: fix bug in graph_is_interesting()
2009-08-27 16:59:56 -07:00
Junio C Hamano
adc5423531 Merge branch 'jh/submodule-foreach'
* jh/submodule-foreach:
  git clone: Add --recursive to automatically checkout (nested) submodules
  t7407: Use 'rev-parse --short' rather than bash's substring expansion notation
  git submodule status: Add --recursive to recurse into nested submodules
  git submodule update: Introduce --recursive to update nested submodules
  git submodule foreach: Add --recursive to recurse into nested submodules
  git submodule foreach: test access to submodule name as '$name'
  Add selftest for 'git submodule foreach'
  git submodule: Cleanup usage string and add option parsing to cmd_foreach()
  git submodule foreach: Provide access to submodule name, as '$name'

Conflicts:
	Documentation/git-submodule.txt
	git-submodule.sh
2009-08-27 16:59:25 -07:00
Junio C Hamano
ab36d06f12 Merge branch 'jc/maint-unpack-objects-strict'
* jc/maint-unpack-objects-strict:
  Fix "unpack-objects --strict"

Conflicts:
	builtin-unpack-objects.c
2009-08-27 16:59:08 -07:00
Junio C Hamano
c3f0cadfa8 Merge branch 'wl/insta-mongoose'
* wl/insta-mongoose:
  Add support for the Mongoose web server.
2009-08-27 16:57:34 -07:00
Junio C Hamano
e7c693a8e1 Merge branch 'nd/sparse' (early part)
* 'nd/sparse' (early part):
  Prevent diff machinery from examining assume-unchanged entries on worktree
2009-08-27 16:56:33 -07:00
Brandon Casey
f203d6969b commit.c: rename variable named 'n' which masks previous declaration
The variable named 'n' was initially declared to be of type int.  The name
'n' was reused inside inner blocks as a different type.  Rename the uses
within inner blocks to avoid confusion and give them a slightly more
descriptive name.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-27 16:21:23 -07:00
Brandon Casey
1630726e84 abspath.c: move declaration of 'len' into inner block and use appropriate type
The 'len' variable was declared at the beginning of the make_absolute_path
function and also in an inner 'if' block which masked the outer declaration.
It is only used in two 'if' blocks, so remove the outer declaration and
make a new declaration inside the other 'if' block that uses 'len'.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-27 16:20:53 -07:00
Brandon Casey
b42c9af2cd Makefile: remove pointless conditional assignment in SunOS section
It is true that NEEDS_RESOLV is needed on SunOS if NO_IPV6 is set since
hstrerror() resides in libresolv, but performing this test at its current
location is not very useful.  It will only have any effect if the user
modifies the make variables from the make command line, and will have no
effect if a config.mak file is used.  A better location for this
conditional would have been further down in the Makefile after the
config.mak and config.mak.autogen had been parsed.  Rather than adding
clutter to the Makefile for a conditional that will likely never be
triggered, just remove it, and any user on SunOS that manually sets NO_IPV6
can also set NEEDS_RESOLV.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-27 16:20:10 -07:00
Junio C Hamano
68ea474164 Merge branch 'maint'
* maint:
  git-log: allow --decorate[=short|full]
  Minor improvement to the write-tree documentation
  git-bisect: call the found commit "*the* first bad commit"
2009-08-26 12:15:15 -07:00
Lars Hjemli
d8526a4c3b git-log: allow --decorate[=short|full]
Commit de435ac0 changed the behavior of --decorate from printing the
full ref (e.g., "refs/heads/master") to a shorter, more human-readable
version (e.g., just "master"). While this is nice for human readers,
external tools using the output from "git log" may prefer the full
version.

This patch introduces an extension to --decorate to allow the caller to
specify either the short or the full versions.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-26 12:05:58 -07:00
David Kågedal
8d95184395 Minor improvement to the write-tree documentation
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-26 12:05:58 -07:00
Nanako Shiraishi
21d0bc2f9a git-bisect: call the found commit "*the* first bad commit"
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-26 12:05:57 -07:00
Junio C Hamano
1d2a7e0c58 Merge branch 'js/maint-cover-letter-non-ascii' into maint
* js/maint-cover-letter-non-ascii:
  Correctly mark cover letters' encodings if they are not pure ASCII
  Expose the has_non_ascii() function
2009-08-26 12:05:57 -07:00
Junio C Hamano
b8132342e9 Merge branch 'jc/maint-clean-nested-dir-safety' into maint
* jc/maint-clean-nested-dir-safety:
  clean: require double -f options to nuke nested git repository and work tree
2009-08-26 12:05:57 -07:00
Junio C Hamano
bd30037e65 Merge branch 'jk/maint-merge-msg-fix' into maint
* jk/maint-merge-msg-fix:
  merge: indicate remote tracking branches in merge message
  merge: fix incorrect merge message for ambiguous tag/branch
  add tests for merge message headings
2009-08-26 12:05:57 -07:00
Junio C Hamano
6b37b3d873 Merge branch 'jc/apply-epoch-patch' into maint
* jc/apply-epoch-patch:
  apply: notice creation/removal patches produced by GNU diff
2009-08-26 12:05:57 -07:00