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

25893 Commits

Author SHA1 Message Date
Junio C Hamano
456a4c08b8 Merge branch 'jk/diff-not-so-quick'
* jk/diff-not-so-quick:
  diff: futureproof "stop feeding the backend early" logic
  diff_tree: disable QUICK optimization with diff filter

Conflicts:
	diff.c
2011-06-06 11:40:14 -07:00
Junio C Hamano
6c92972d7f Merge branch 'bc/maint-status-z-to-use-porcelain'
* bc/maint-status-z-to-use-porcelain:
  builtin/commit.c: set status_format _after_ option parsing
  t7508: demonstrate status's failure to use --porcelain format with -z

Conflicts:
	builtin/commit.c
2011-06-06 11:40:08 -07:00
Junio C Hamano
c17b229454 checkout -b <name>: correctly detect existing branch
When create a new branch, we fed "refs/heads/<proposed name>" as a string
to get_sha1() and expected it to fail when a branch already exists.

The right way to check if a ref exists is to check with resolve_ref().

A naïve solution that might appear attractive but does not work is to
forbid slashes in get_describe_name() but that will not work. A describe
name is is in the form of "ANYTHING-g<short sha1>", and that ANYTHING part
comes from a original tag name used in the repository the user ran the
describe command. A sick user could have a confusing hierarchical tag
whose name is "refs/heads/foobar" (stored as refs/tags/refs/heads/foobar")
to generate a describe name "refs/heads/foobar-6-g02ac983", and we should
be able to use that name to refer to the object whose name is 02ac983.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-05 22:17:04 -07:00
Jakub Narebski
bee6ea17a1 gitweb: Fix usability of $prevent_xss
With XSS prevention on (enabled using $prevent_xss), blobs
('blob_plain') of all types except a few known safe ones are served
with "Content-Disposition: attachment".  However the check was too
strict; it didn't take into account optional parameter attributes,

  media-type     = type "/" subtype *( ";" parameter )

as described in RFC 2616

  http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
  http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7

This fixes that, and it for example treats following as safe MIME
media type:

  text/plain; charset=utf-8

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-05 10:38:47 -07:00
Jakub Narebski
80b4dfeeb2 gitweb: Move "Requirements" up in gitweb/INSTALL
This way you can examine prerequisites at first glance, before
detailed instructions on installing gitweb.  Straightforward
text movement.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-03 10:00:24 -07:00
Junio C Hamano
150b493ad4 git status --ignored: tests and docs
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-02 11:59:19 -07:00
Jakub Narebski
560869e321 gitweb: Describe CSSMIN and JSMIN in gitweb/INSTALL
The build-time configuration variables JSMIN and CSSMIN were mentioned
only in Makefile; add their description to gitweb/INSTALL.

This required moving description of GITWEB_JS up, near GITWEB_CSS and
just introduced CSMIN and JSMIN.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-02 11:16:56 -07:00
Jakub Narebski
cee694d012 gitweb: Move information about installation from README to INSTALL
Almost straightformard moving of "How to configure gitweb for your
local system" section from gitweb/README to gitweb/INSTALL, as it is
about build time configuration.  Updated references to it.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-02 11:14:21 -07:00
Jeff King
1282988b4d status: fix bug with missing --ignore files
Commit 1b908b6 (wt-status: rename and restructure
status-print-untracked, 2010-04-10) converted the
wt_status_print_untracked function into
wt_status_print_other, taking a string_list of either
untracked or ignored items to print. However, the "nothing
to show" early return still checked the wt_status->untracked
list instead of the passed-in list.

That meant that if we had ignored items to show, but no
untracked items, we would erroneously exit early and fail to
show the ignored items.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-02 08:48:41 -07:00
Junio C Hamano
a6605d76cd Sync with 1.7.5.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.7.6-rc0
2011-06-01 14:11:17 -07:00
Junio C Hamano
e5af0de202 Git 1.7.5.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.7.5.4
2011-06-01 14:08:26 -07:00
Junio C Hamano
1c6e3514d0 Merge branch 'jk/maint-config-alias-fix' into maint
* 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
2011-06-01 14:05:22 -07:00
Junio C Hamano
6e1a7510b1 Merge branch 'jc/fmt-req-fix' into maint
* jc/fmt-req-fix:
  userformat_find_requirements(): find requirement for the correct format
2011-06-01 14:03:07 -07:00
Junio C Hamano
2dd798469e Merge branch 'jk/maint-docs' into maint
* 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-06-01 14:02:52 -07:00
Junio C Hamano
24263cfb54 Merge branch 'jn/doc-remote-helpers' into maint
* jn/doc-remote-helpers:
  Documentation: do not misinterpret refspecs as bold text
2011-06-01 14:02:45 -07:00
Junio C Hamano
c72b9143f9 Merge branch 'kk/maint-prefix-in-config-mak' into maint
* kk/maint-prefix-in-config-mak:
  config.mak.in: allow "configure --sysconfdir=/else/where"
2011-06-01 14:02:39 -07:00
Jim Meyering
6051561a6c diffcore-rename.c: avoid set-but-not-used warning
Since 9d8a5a5 (diffcore-rename: refactor "too many candidates" logic,
2011-01-06), diffcore_rename() initializes num_src but does not use it
anymore.  "-Wunused-but-set-variable" in gcc-4.6 complains about this.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-01 13:54:17 -07:00
Junio C Hamano
090a1a5d95 Update draft release notes to 1.7.6
I think we are almost there for the feature freeze.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-31 12:22:50 -07:00
Junio C Hamano
f67d2e82d6 Merge branch 'jk/format-patch-am'
* jk/format-patch-am:
  format-patch: preserve subject newlines with -k
  clean up calling conventions for pretty.c functions
  pretty: add pp_commit_easy function for simple callers
  mailinfo: always clean up rfc822 header folding
  t: test subject handling in format-patch / am pipeline

Conflicts:
	builtin/branch.c
	builtin/log.c
	commit.h
2011-05-31 12:19:11 -07:00
Junio C Hamano
1c9d71944a Merge branch 'jn/doc-remote-helpers'
* jn/doc-remote-helpers:
  Documentation: do not misinterpret refspecs as bold text
2011-05-31 12:09:35 -07:00
Junio C Hamano
aca820ae61 Merge branch 'jk/format-patch-empty-prefix'
* jk/format-patch-empty-prefix:
  format-patch: make zero-length subject prefixes prettier
2011-05-31 12:09:27 -07:00
Junio C Hamano
15af7075fc Merge branch 'ab/i18n-envsubst-doc-fix'
* ab/i18n-envsubst-doc-fix:
  git-sh-i18n--envsubst: add SYNOPSIS section to the documentation
2011-05-31 12:09:21 -07:00
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
Junio C Hamano
b4194828dc diff-index --quiet: learn the "stop feeding the backend early" logic
A negative return from the unpack callback function usually means unpack
failed for the entry and signals the unpack_trees() machinery to fail the
entire merge operation, immediately and there is no other way for the
callback to tell the machinery to exit early without reporting an error.

This is what we usually want to make a merge all-or-nothing operation, but
the machinery is also used for diff-index codepath by using a custom
unpack callback function. And we do sometimes want to exit early without
failing, namely when we are under --quiet and can short-cut the diff upon
finding the first difference.

Add "exiting_early" field to unpack_trees_options structure, to signal the
unpack_trees() machinery that the negative return value is not signaling
an error but an early return from the unpack_trees() machinery. As this by
definition hasn't unpacked everything, discard the resulting index just
like the failure codepath.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-31 11:24:12 -07:00
Junio C Hamano
2d11f21c36 Merge remote-tracking branch 'ko/maint' into jc/diff-index-quick-exit-early
* ko/maint: (4352 commits)
  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'
  Git 1.7.5.3
  init/clone: remove short option -L and document --separate-git-dir
  do not read beyond end of malloc'd buffer
  git-svn: Fix git svn log --show-commit
  Git 1.7.5.2
  provide a copy of the LGPLv2.1
  test core.gitproxy configuration
  copy_gecos: fix not adding nlen to len when processing "&"
  Update draft release notes to 1.7.5.2
  Documentation/git-fsck.txt: fix typo: unreadable -> unreachable
  send-pack: avoid deadlock on git:// push with failed pack-objects
  connect: let callers know if connection is a socket
  connect: treat generic proxy processes like ssh processes
  sideband_demux(): fix decl-after-stmt
  t3503: test cherry picking and reverting root commits
  ...

Conflicts:
	diff.c
2011-05-31 10:57:32 -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
28b9264dd6 diff: futureproof "stop feeding the backend early" logic
Refactor the "do not stop feeding the backend early" logic into a small
helper function and use it in both run_diff_files() and diff_tree() that
has the stop-early optimization. We may later add other types of diffcore
transformation that require to look at the whole result like diff-filter
does, and having the logic in a single place is essential for longer term
maintainability.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-31 09:21:36 -07:00
Jeff King
af7b41c923 diff_tree: disable QUICK optimization with diff filter
We stop looking for changes early with QUICK, so our diff
queue contains only a subset of the changes. However, we
don't apply diff filters until later; it will appear at that
point as though there are no changes matching our filter,
when in reality we simply didn't keep looking for changes
long enough.

Commit 2cfe8a6 (diff --quiet: disable optimization when
--diff-filter=X is used, 2011-03-16) fixes this in some
cases by disabling the optimization when a filter is
present. However, it only tweaked run_diff_files, missing
the similar case in diff_tree. Thus the fix worked only for
diffing the working tree and index, but not between trees.

Noticed by Yasushi SHOJI.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-31 09:20:31 -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
Jonathan Nieder
8e4414edde Documentation: do not misinterpret refspecs as bold text
In v1.7.3.3~2 (Documentation: do not misinterpret pull refspec as bold
text, 2010-12-03) many uses of asterisks in expressions like
"refs/heads/*:refs/svn/origin/branches/*" were escaped as {asterisk}
to avoid being treated as delimiters for bold text, but these two were
missed.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-30 12:55:16 -07:00
Jeff King
e7af8e49cd format-patch: make zero-length subject prefixes prettier
If you give a zero-length subject prefix to format-patch
(e.g., "format-patch --subject-prefix="), we will print the
ugly:

  Subject: [ 1/2] your subject here

because we always insert a space between the prefix and
numbering. Requiring the user to provide the space in their
prefix would be more flexible, but would break existing
usage. This patch provides a DWIM and suppresses the space
for zero-length prefixes, under the assumption that nobody
actually wants "[ 1/2]".

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-30 11:18:59 -07:00
Ævar Arnfjörð Bjarmason
f5008f56d5 git-sh-i18n--envsubst: add SYNOPSIS section to the documentation
Change the documentation for the git-sh-i18n--envsubst program to
include a SYNOPSIS section. Include the invocation of the program from
git-sh-i18n.sh.

Not having a SYNOPSIS section caused the "doc" target to fail on
Centos 5.5 with asciidoc 8.2.5, while building with 8.6.4 on Debian
works just fine.

The relevant error was:

    ERROR: git-sh-i18n--envsubst.txt: line 9: second section must be named SYNOPSIS

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-30 01:08:32 -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