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

25652 Commits

Author SHA1 Message Date
Junio C Hamano
b9575e78e5 Merge branch 'jc/log-quiet-fix'
* jc/log-quiet-fix:
  log: --quiet should serve as synonym to -s
2011-05-31 12:09:18 -07:00
Junio C Hamano
2177dc69cd Merge branch 'kk/maint-prefix-in-config-mak'
* kk/maint-prefix-in-config-mak:
  config.mak.in: allow "configure --sysconfdir=/else/where"
2011-05-31 12:09:12 -07:00
Junio C Hamano
df873f96c8 Merge branch 'jk/rebase-head-reflog'
* jk/rebase-head-reflog:
  rebase: write a reflog entry when finishing
  rebase: create HEAD reflog entry when aborting
2011-05-31 12:09:08 -07:00
Junio C Hamano
7953156939 Merge branch 'jk/maint-docs'
* jk/maint-docs:
  docs: fix some antique example output
  docs: make sure literal "->" isn't converted to arrow
  docs: update status --porcelain format
  docs: minor grammar fixes to git-status
2011-05-31 12:09:00 -07:00
Junio C Hamano
27c6729201 Merge branch 'jk/read-in-full-stops-on-error'
* jk/read-in-full-stops-on-error:
  read_in_full: always report errors
2011-05-31 12:08:55 -07:00
Junio C Hamano
2cd517cdd3 Merge branch 'jk/maint-remote-mirror-safer'
* jk/maint-remote-mirror-safer:
  remote: allow "-t" with fetch mirrors
2011-05-31 12:08:52 -07:00
Junio C Hamano
efd02e92c9 Merge branch 'jl/read-tree-m-dry-run'
* jl/read-tree-m-dry-run:
  Teach read-tree the -n|--dry-run option
  unpack-trees: add the dry_run flag to unpack_trees_options
2011-05-31 12:08:48 -07:00
Junio C Hamano
2951df7a9a Sync with maint 2011-05-31 12:07:14 -07:00
Junio C Hamano
2b0b64ee85 Start 1.7.5.4 draft release notes
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-31 12:06:40 -07:00
Junio C Hamano
1618297f10 Merge branch 'tr/add-i-no-escape' into maint
* tr/add-i-no-escape:
  add -i: ignore terminal escape sequences
2011-05-31 12:02:04 -07:00
Junio C Hamano
398dbe536d Merge branch 'vh/config-interactive-singlekey-doc' into maint
* vh/config-interactive-singlekey-doc:
  git-reset.txt: better docs for '--patch'
  git-checkout.txt: better docs for '--patch'
  git-stash.txt: better docs for '--patch'
  git-add.txt: document 'interactive.singlekey'
  config.txt: 'interactive.singlekey; is used by...
2011-05-31 12:01:06 -07:00
Junio C Hamano
82ca09090e Merge branch 'ml/test-readme' into maint
* ml/test-readme:
  t/README: unify documentation of test function args
2011-05-31 12:00:43 -07:00
Junio C Hamano
dd4c0ce908 Merge branch 'ab/i18n-fixup' into maint
* ab/i18n-fixup: (24 commits)
  i18n: use test_i18n{cmp,grep} in t7600, t7607, t7611 and t7811
  i18n: use test_i18n{grep,cmp} in t7508
  i18n: use test_i18ngrep in t7506
  i18n: use test_i18ngrep and test_i18ncmp in t7502
  i18n: use test_i18ngrep in t7501
  i18n: use test_i18ncmp in t7500
  i18n: use test_i18ngrep in t7201
  i18n: use test_i18ncmp and test_i18ngrep in t7102 and t7110
  i18n: use test_i18ncmp and test_i18ngrep in t5541, t6040, t6120, t7004, t7012 and t7060
  i18n: use test_i18ncmp and test_i18ngrep in t3700, t4001 and t4014
  i18n: use test_i18ncmp and test_i18ngrep in t3203, t3501 and t3507
  i18n: use test_i18ngrep in t2020, t2204, t3030, and t3200
  i18n: use test_i18ngrep in lib-httpd and t2019
  i18n: do not overuse C_LOCALE_OUTPUT (grep)
  i18n: use test_i18ncmp in t1200 and t2200
  i18n: .git file is not a human readable message (t5601)
  i18n: do not overuse C_LOCALE_OUTPUT
  i18n: mark init-db messages for translation
  i18n: mark checkout plural warning for translation
  i18n: mark checkout --detach messages for translation
  ...
2011-05-31 12:00:27 -07:00
Junio C Hamano
b3c89315a3 Merge branch 'jc/rename-degrade-cc-to-c' into maint
* jc/rename-degrade-cc-to-c:
  diffcore-rename: fall back to -C when -C -C busts the rename limit
  diffcore-rename: record filepair for rename src
  diffcore-rename: refactor "too many candidates" logic
  builtin/diff.c: remove duplicated call to diff_result_code()
2011-05-31 12:00:02 -07:00
Junio C Hamano
e596fd295f Merge branch 'rr/doc-content-type' into maint
* rr/doc-content-type:
  Documentation: Allow custom diff tools to be specified in 'diff.tool'
  Documentation: Add diff.<driver>.* to config
  Documentation: Move diff.<driver>.* from config.txt to diff-config.txt
  Documentation: Add filter.<driver>.* to config
2011-05-31 11:59:39 -07:00
Ramsay Jones
766d6268c6 config.c: Remove unused git_config_global() function
Commit 8f323c00 (drop support for GIT_CONFIG_NOGLOBAL, 15-03-2011)
removed the git_config_global() function, among other things, since
it is no longer required. Unfortunately, this function has since
been unintentionally restored by a faulty conflict resolution.

Remove it.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-31 10:51:18 -07:00
Junio C Hamano
d98a20114d Merge branch 'jc/fmt-req-fix'
* jc/fmt-req-fix:
  userformat_find_requirements(): find requirement for the correct format
2011-05-30 20:19:21 -07:00
Junio C Hamano
1f9a980636 Merge branch 'jk/maint-config-alias-fix'
* jk/maint-config-alias-fix:
  handle_options(): do not miscount how many arguments were used
  config: always parse GIT_CONFIG_PARAMETERS during git_config
  git_config: don't peek at global config_parameters
  config: make environment parsing routines static

Conflicts:
	config.c
2011-05-30 20:19:14 -07:00
Junio C Hamano
fb674d7671 Merge branch 'maint'
* maint:
  git-submodule.sh: separate parens by a space to avoid confusing some shells
  Documentation/technical/api-diff.txt: correct name of diff_unmerge()
  read_gitfile_gently: use ssize_t to hold read result
  remove tests of always-false condition
  rerere.c: diagnose a corrupt MERGE_RR when hitting EOF between TAB and '\0'
2011-05-30 00:09:55 -07:00
Junio C Hamano
5b42477b59 Merge branch 'jm/maint-misc-fix' into maint
* jm/maint-misc-fix:
  read_gitfile_gently: use ssize_t to hold read result
  remove tests of always-false condition
  rerere.c: diagnose a corrupt MERGE_RR when hitting EOF between TAB and '\0'
2011-05-30 00:09:41 -07:00
Junio C Hamano
a059240f06 Merge branch 'bc/maint-submodule-fix-parked' into maint
* bc/maint-submodule-fix-parked:
  git-submodule.sh: separate parens by a space to avoid confusing some shells
2011-05-30 00:09:36 -07:00
Junio C Hamano
bcb477fb60 Merge branch 'bc/maint-api-doc-parked' into maint
* bc/maint-api-doc-parked:
  Documentation/technical/api-diff.txt: correct name of diff_unmerge()
2011-05-30 00:03:52 -07:00
Junio C Hamano
be653d6cb8 Merge branch 'mk/grep-pcre'
* mk/grep-pcre:
  git-grep: Fix problems with recently added tests
  git-grep: Update tests (mainly for -P)
  Makefile: Pass USE_LIBPCRE down in GIT-BUILD-OPTIONS
  git-grep: update tests now regexp type is "last one wins"
  git-grep: do not die upon -F/-P when grep.extendedRegexp is set.
  git-grep: Bail out when -P is used with -F or -E
  grep: Add basic tests
  configure: Check for libpcre
  git-grep: Learn PCRE
  grep: Extract compile_regexp_failed() from compile_regexp()
  grep: Fix a typo in a comment
  grep: Put calls to fixmatch() and regmatch() into patmatch()
  contrib/completion: --line-number to git grep
  Documentation: Add --line-number to git-grep synopsis
2011-05-30 00:00:07 -07:00
Michał Kiedrowicz
d0042abe14 git-grep: Fix problems with recently added tests
Brian Gernhardt reported that test 'git grep -E -F -G a\\+b' fails on
OS X 10.6.7. This is because I assumed \+ is part of BRE, which isn't
true on all platforms.

The easiest way to make this test pass is to just update expected
output, but that would make the test pointless. Its real purpose is to
check whether 'git grep -E -F -G' is different from 'git grep -E -G -F'.
To check that, let's change pattern to "a+b*c". This should return
different match for -G, -F and -E.

I also made two small tweaks to the tests. First, I added path "ab" to
all calls to future-proof tests. Second, I updated last two tests to
better show that 'git grep -P -E' is different from 'git grep -E -P'.

Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-29 23:58:50 -07:00
Junio C Hamano
3d109dd8ef Merge branch 'jc/notes-batch-removal'
* jc/notes-batch-removal:
  show: --ignore-missing
  notes remove: --stdin reads from the standard input
  notes remove: --ignore-missing
  notes remove: allow removing more than one
2011-05-29 23:51:26 -07:00
Junio C Hamano
01f9ffbd5d Merge branch 'jk/haves-from-alternate-odb'
* jk/haves-from-alternate-odb:
  receive-pack: eliminate duplicate .have refs
  bisect: refactor sha1_array into a generic sha1 list
  refactor refs_from_alternate_cb to allow passing extra data
2011-05-29 23:51:22 -07:00
Junio C Hamano
144dfc5c63 Merge branch 'jn/run-command-error-failure' into maint
* jn/run-command-error-failure:
  run-command: handle short writes and EINTR in die_child
  tests: check error message from run_command
2011-05-29 19:08:51 -07:00
Junio C Hamano
01771a8e2b log: --quiet should serve as synonym to -s
The previous commit simply hijacked --quiet and essentially made it into a
no-op. Instead, take it as a cue that the end user wants to omit the patch
output from commands that default to show patches, e.g. "show".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-28 12:25:24 -07:00
Jeff King
53f2ffa80c rebase: write a reflog entry when finishing
When we finish a rebase, our detached HEAD is at the final
result. We update the original branch ref with this result,
and then point the HEAD symbolic ref at the updated branch.
We write a reflog for the branch update, but not for the
update of HEAD.

Because we're already at the final result on the detached
HEAD, moving to the branch actually doesn't change our
commit sha1 at all. So in that sense, a reflog entry would
be pointless.

However, humans do read reflogs, and an entry saying "rebase
finished: returning to refs/heads/master" can be helpful in
understanding what is going on.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-27 15:52:03 -07:00
Csaba Henk
ea69619cd1 rebase: create HEAD reflog entry when aborting
When we abort a rebase, we return to the original value of
HEAD. Failing to write a reflog entry means we create a
gap in the reflog (which can cause "git show
HEAD@{5.minutes.ago}" to issue a warning). Plus having the
extra entry makes the reflog easier to follow for a human.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-27 15:52:01 -07:00
Junio C Hamano
5937b792f0 config.mak.in: allow "configure --sysconfdir=/else/where"
We do allow vanilla Makefile users to say make sysconfdir=/else/where
and config.mak can also be tweaked manually for the same effect. Give
the same configurablity to ./configure users as well.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-27 13:58:31 -07:00
Jeff King
62b42d3487 docs: fix some antique example output
These diff-index and diff-tree sample outputs date back to
the first month of git's existence. The output format has
changed slightly since then, so let's have it match the
current output.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-26 22:15:39 -07:00
Jeff King
715e716a1b docs: make sure literal "->" isn't converted to arrow
Recent versions of asciidoc will treat "->" as a
single-glyph arrow symbol, unless it is inside a literal
code block. This is a problem if we are discussing literal
output and want to show the ASCII characters.

Our usage falls into three categories:

  1. Inside a code block. These can be left as-is.

  2. Discussing literal output or code, but inside a
     paragraph. This patch escapes these as "\->".

  3. Using the arrow as a symbolic element, such as "use the
     Edit->Account Settings menu". In this case, the
     arrow symbol is preferable, so we leave it as-is.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-26 22:15:38 -07:00
Jeff King
fc17df0344 docs: update status --porcelain format
The --porcelain format was originally identical to the
--short format, but designed to be stable as the short
format changed. Since this was written, the short format
picked up a few incompatible niceties, but this description
was never changed.

Let's mention the differences. While we're at it, let's add
some sub-section headings to make the "output" section a
little easier to navigate.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-26 22:15:36 -07:00
Jeff King
043b5cd938 docs: minor grammar fixes to git-status
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-26 22:15:35 -07:00
Brandon Casey
f5799e05c0 git-submodule.sh: separate parens by a space to avoid confusing some shells
Some shells interpret '(( ))' according to the rules for arithmetic
expansion.  This may not follow POSIX, but is prevalent in commonly used
shells.  Bash does not have a problem with this particular instance of
'((', likely because it is not followed by a '))', but the public domain
ksh does, and so does ksh on IRIX 6.5.

So, add a space between the parenthesis to avoid confusing these shells.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-26 15:04:05 -07:00
Brandon Casey
7a45c31396 Documentation/technical/api-diff.txt: correct name of diff_unmerge()
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-26 14:50:24 -07:00
Jeff King
56d7c27af1 read_in_full: always report errors
The read_in_full function repeatedly calls read() to fill a
buffer. If the first read() returns an error, we notify the
caller by returning the error. However, if we read some data
and then get an error on a subsequent read, we simply return
the amount of data that we did read, and the caller is
unaware of the error.

This makes the tradeoff that seeing the partial data is more
important than the fact that an error occurred. In practice,
this is generally not the case; we care more if an error
occurred, and should throw away any partial data.

I audited the current callers. In most cases, this will make
no difference at all, as they do:

  if (read_in_full(fd, buf, size) != size)
	  error("short read");

However, it will help in a few cases:

  1. In sha1_file.c:index_stream, we would fail to notice
     errors in the incoming stream.

  2. When reading symbolic refs in resolve_ref, we would
     fail to notice errors and potentially use a truncated
     ref name.

  3. In various places, we will get much better error
     messages. For example, callers of safe_read would
     erroneously print "the remote end hung up unexpectedly"
     instead of showing the read error.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-26 13:54:18 -07:00
Jeff King
3eafdc961f remote: allow "-t" with fetch mirrors
Commit 13fc2c1 (remote: disallow some nonsensical option
combinations, 2011-03-30) made it impossible to use "remote
add -t foo --mirror". The argument was that specifying
specific branches is useless because:

  1. Push mirrors do not want a refspec at all.

  2. The point of fetch mirroring is to use a broad refspec
     like "refs/*", but using "-t" overrides that.

Point (1) is valid; "-t" with push mirrors is useless. But
point (2) ignored another side effect of using --mirror: it
fetches the refs directly into the refs/ namespace as they
are found upstream, instead of placing them in a
separate-remote layout.

So 13fc2c1 was overly constrictive, and disallowed
reasonable specific-branch mirroring, like:

  git remote add -t heads/foo -t heads/bar --mirror=fetch

which makes the local "foo" and "bar" branches direct
mirrors of the remote, but does not fetch anything else.

This patch restores the original behavior, but only for
fetch mirrors.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-26 11:38:18 -07:00
Jeff King
b1905aeac5 read_gitfile_gently: use ssize_t to hold read result
Otherwise, a negative error return becomes a very large read
value. We catch this in practice because we compare the
expected and actual numbers of bytes (and you are not likely
to be reading (size_t)-1 bytes), but this makes the
correctness a little more obvious.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-26 11:25:13 -07:00
Jim Meyering
5dd564895e remove tests of always-false condition
* fsck.c (fsck_error_function): Don't test obj->sha1 == 0.
It can never be true, since that sha1 member is an array.
* transport.c (set_upstreams): Likewise for ref->new_sha1.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-26 11:24:24 -07:00
Jim Meyering
a9930e359c plug a DIR buffer leak in rerere.c
Signed-off-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-26 11:20:48 -07:00
Jim Meyering
5743350f69 rerere.c: diagnose a corrupt MERGE_RR when hitting EOF between TAB and '\0'
If we reach EOF after the SHA1-then-TAB, yet before the NUL that
terminates each file name, we would fill the file name buffer with \255
bytes resulting from the repeatedly-failing fgetc (returns EOF/-1) and
ultimately complain about "filename too long", because no NUL was
encountered.

Signed-off-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-26 11:07:52 -07:00
Junio C Hamano
665b051b90 Update 1.7.6 draft release notes
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-26 10:41:33 -07:00
Junio C Hamano
7eacc2bc29 Merge branch 'jn/userdiff-perl-updates'
* jn/userdiff-perl-updates:
  userdiff/perl: tighten BEGIN/END block pattern to reject here-doc delimiters
  tests: make test_expect_code quieter on success
  userdiff/perl: catch sub with brace on second line
  userdiff/perl: match full line of POD headers
  userdiff/perl: anchor "sub" and "package" patterns on the left
  t4018 (funcname patterns): minor cleanups
  t4018 (funcname patterns): make configuration easier to track
  t4018 (funcname patterns): make .gitattributes state easier to track
2011-05-26 10:32:25 -07:00
Junio C Hamano
8784e4ddde Merge branch 'rg/no-gecos-in-pwent'
* rg/no-gecos-in-pwent:
  ident: add NO_GECOS_IN_PWENT for systems without pw_gecos in struct passwd

Conflicts:
	Makefile
2011-05-26 10:32:19 -07:00
Junio C Hamano
ce5e95383d Merge branch 'jk/fetch-mark-complete-optimization'
* jk/fetch-mark-complete-optimization:
  fetch: avoid repeated commits in mark_complete
2011-05-26 10:32:11 -07:00
Junio C Hamano
a6f3f178bd Merge branch 'jn/gitweb-js'
* jn/gitweb-js:
  gitweb: Make JavaScript ability to adjust timezones configurable
  gitweb.js: Add UI for selecting common timezone to display dates
  gitweb: JavaScript ability to adjust time based on timezone
  gitweb: Unify the way long timestamp is displayed
  gitweb: Refactor generating of long dates into format_timestamp_html
  gitweb.js: Provide getElementsByClassName method (if it not exists)
  gitweb.js: Introduce code to handle cookies from JavaScript
  gitweb.js: Extract and improve datetime handling
  gitweb.js: Provide default values for padding in padLeftStr and padLeft
  gitweb.js: Update and improve comments in JavaScript files
  gitweb: Split JavaScript for maintability, combining on build
2011-05-26 10:31:57 -07:00
Junio C Hamano
229e72dd6a Merge branch 'jn/ctags-more'
* jn/ctags-more:
  gitweb: Optional grouping of projects by category
  gitweb: Modularized git_get_project_description to be more generic
  gitweb: Split git_project_list_body in two functions
2011-05-26 10:31:53 -07:00
Junio C Hamano
0a2a5d889d Merge branch 'jc/require-work-tree-exists'
* jc/require-work-tree-exists:
  require-work-tree wants more than what its name says
2011-05-26 10:31:47 -07:00