1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-01 06:47:52 +01:00
Commit graph

30921 commits

Author SHA1 Message Date
Junio C Hamano
cdcd793213 Merge branch 'as/maint-doc-fix-no-post-rewrite' into maint
* as/maint-doc-fix-no-post-rewrite:
  commit: fixup misplacement of --no-post-rewrite description
2012-11-20 10:14:47 -08:00
Junio C Hamano
c5afc5b73e Merge branch 'rs/lock-correct-ref-during-delete' into maint
* rs/lock-correct-ref-during-delete:
  refs: lock symref that is to be deleted, not its target
2012-11-20 10:14:41 -08:00
Junio C Hamano
e87719fc94 Merge branch 'rf/maint-mailmap-off-by-one' into maint
* rf/maint-mailmap-off-by-one:
  mailmap: avoid out-of-bounds memory access
2012-11-20 10:14:29 -08:00
Junio C Hamano
35cae74c4d Merge branch 'jk/maint-diff-grep-textconv' into maint
"git diff -G<pattern>" did not honor textconv filter when looking
for changes.

* jk/maint-diff-grep-textconv:
  diff_grep: use textconv buffers for add/deleted files
2012-11-20 10:03:12 -08:00
Junio C Hamano
fd778c09b1 Merge branch 'js/format-2047' into maint
Various rfc2047 quoting issues around a non-ASCII name on the From:
line in the output from format-patch have been corrected.

* js/format-2047:
  format-patch tests: check quoting/encoding in To: and Cc: headers
  format-patch: fix rfc2047 address encoding with respect to rfc822 specials
  format-patch: make rfc2047 encoding more strict
  format-patch: introduce helper function last_line_length()
  format-patch: do not wrap rfc2047 encoded headers too late
  format-patch: do not wrap non-rfc2047 headers too early
  utf8: fix off-by-one wrapping of text
2012-11-20 09:57:44 -08:00
Mark Levedahl
9fca6cffc0 USE CGYWIN_V15_WIN32API as macro to select api for cygwin
The previous macro was confusing to some, and did not include "cygwin" in
its name. The updated name more clearly expresses a choice of the
win32api implementation that shipped with version 1.5 of cygwin.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-18 20:02:40 -08:00
Junio C Hamano
f3828dc066 Sync with maint 2012-11-18 19:48:31 -08:00
Junio C Hamano
2808f6abc2 Start preparing for 1.8.0.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-18 19:47:19 -08:00
Junio C Hamano
8b56a47022 Merge branch 'sz/maint-curl-multi-timeout' into maint
Sometimes curl_multi_timeout() function suggested a wrong timeout
value when there is no file descriptors to wait on and the http
transport ended up sleeping for minutes in select(2) system call.  A
workaround has been added for this.

* sz/maint-curl-multi-timeout:
  Fix potential hang in https handshake
2012-11-18 19:44:36 -08:00
Junio C Hamano
b98769e06e Merge branch 'po/maint-refs-replace-docs' into maint
The refs/replace hierarchy was not mentioned in the
repository-layout docs.

* po/maint-refs-replace-docs:
  Doc repository-layout: Show refs/replace
2012-11-18 19:34:09 -08:00
Junio C Hamano
611addf890 Merge branch 'ph/pull-rebase-detached' into maint
"git pull --rebase" run while the HEAD is detached tried to find
the upstream branch of the detached HEAD (which by definition
does not exist) and emitted unnecessary error messages.

* ph/pull-rebase-detached:
  git-pull: Avoid merge-base on detached head
2012-11-18 19:33:45 -08:00
Junio C Hamano
78ba7e267c Merge branch 'mm/maint-doc-remote-tracking' into maint
Update "remote tracking branch" in the documentation to
"remote-tracking branch".

* mm/maint-doc-remote-tracking:
  Documentation: remote tracking branch -> remote-tracking branch
2012-11-18 19:33:20 -08:00
Junio C Hamano
3a9866919c Merge branch 'rs/branch-del-symref' into maint
A symbolic ref refs/heads/SYM was not correctly removed with "git
branch -d SYM"; the command removed the ref pointed by SYM instead.

* rs/branch-del-symref:
  branch: show targets of deleted symrefs, not sha1s
  branch: skip commit checks when deleting symref branches
  branch: delete symref branch, not its target
  branch: factor out delete_branch_config()
  branch: factor out check_branch_commit()
2012-11-18 19:32:58 -08:00
Junio C Hamano
dca5ed5f5b Merge branch 'nd/grep-true-path' into maint
"git grep -e pattern <tree>" asked the attribute system to read
"<tree>:.gitattributes" file in the working tree, which was
nonsense.

* nd/grep-true-path:
  grep: stop looking at random places for .gitattributes
2012-11-18 19:32:30 -08:00
Junio C Hamano
4607a8ce68 Merge branch 'jc/grep-pcre-loose-ends' (early part) into maint
"git log -F -E --grep='<ere>'" failed to use the given <ere>
pattern as extended regular expression, and instead looked for the
string literally.

* 'jc/grep-pcre-loose-ends' (early part):
  log --grep: use the same helper to set -E/-F options as "git grep"
  revisions: initialize revs->grep_filter using grep_init()
  grep: move pattern-type bits support to top-level grep.[ch]
  grep: move the configuration parsing logic to grep.[ch]
  builtin/grep.c: make configuration callback more reusable
2012-11-18 19:32:12 -08:00
Junio C Hamano
6c95f535e9 Merge branch 'da/mergetools-p4' into maint
"git mergetool" feeds /dev/null as a common ancestor when dealing
with an add/add conflict, but p4merge backend cannot handle it. Work
it around by passing a temporary empty file.

* da/mergetools-p4:
  mergetools/p4merge: Handle "/dev/null"
2012-11-18 19:31:40 -08:00
Junio C Hamano
3424da1118 Merge branch 'jc/test-say-color-avoid-echo-escape' into maint
The "say" function in the test scaffolding incorrectly allowed
"echo" to interpret "\a" as if it were a C-string asking for a BEL
output.

* jc/test-say-color-avoid-echo-escape:
  test-lib: Fix say_color () not to interpret \a\b\c in the message
2012-11-18 19:31:14 -08:00
Junio C Hamano
d6ecf5638d Merge branch 'bw/config-lift-variable-name-length-limit' into maint
The configuration parser had an unnecessary hardcoded limit on
variable names that was not checked consistently.

* bw/config-lift-variable-name-length-limit:
  Remove the hard coded length limit on variable names in config files
2012-11-18 19:29:44 -08:00
Ramkumar Ramachandra
4e215131d2 submodule: display summary header in bold
Currently, 'git diff --submodule' displays output with a bold diff
header for non-submodules.  So this part is in bold:

    diff --git a/file1 b/file1
    index 30b2f6c..2638038 100644
    --- a/file1
    +++ b/file1

For submodules, the header looks like this:

    Submodule submodule1 012b072..248d0fd:

Unfortunately, it's easy to miss in the output because it's not bold.
Change this.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-18 19:18:13 -08:00
Jeff King
d9c552f17a diff: rename "set" variable
Once upon a time the builtin_diff function used one color, and the color
variables were called "set" and "reset". Nowadays it is a much longer
function and we use several colors (e.g., "add", "del"). Rename "set" to
"meta" to show that it is the color for showing diff meta-info (it still
does not indicate that it is a "color", but at least it matches the
scheme of the other color variables).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-18 19:18:13 -08:00
Ramkumar Ramachandra
c47ef57caa diff: introduce diff.submodule configuration variable
Introduce a diff.submodule configuration variable corresponding to the
'--submodule' command-line option of 'git diff'.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-18 19:18:13 -08:00
Ramkumar Ramachandra
22bc70fdf9 Documentation: move diff.wordRegex from config.txt to diff-config.txt
19299a8 (Documentation: Move diff.<driver>.* from config.txt to
diff-config.txt, 2011-04-07) moved the diff configuration options to
diff-config.txt, but forgot about diff.wordRegex, which was left
behind in config.txt.  Fix this.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-18 19:18:13 -08:00
Marc Khouzam
9673b8c392 tcsh-completion re-using git-completion.bash
The current tcsh-completion support for Git, as can be found on the
Internet, takes the approach of defining the possible completions
explicitly.  This has the obvious draw-back to require constant
updating as the Git code base evolves.

The approach taken by this commit is to to re-use the advanced bash
completion script and use its result for tcsh completion.  This is
achieved by sourcing the bash script and outputting the completion
result for tcsh consumption.

Three solutions were looked at to implement this approach with (C)
being retained:

  A) Modifications:
          git-completion.bash and new git-completion.tcsh

     Modify the existing git-completion.bash script to support
     being sourced using bash (as now), but also executed using bash.
     When being executed, the script will output the result of the
     computed completion to be re-used elsewhere (e.g., in tcsh).

     The modification to git-completion.bash is made not to be
     tcsh-specific, but to allow future users to also re-use its
     output.  Therefore, to be general, git-completion.bash accepts a
     second optional parameter, which is not used by tcsh, but could
     prove useful for other users.

     Pros:
       1- allows the git-completion.bash script to easily be re-used
       2- tcsh support is mostly isolated in git-completion.tcsh
     Cons (for tcsh users only):
       1- requires the user to copy both git-completion.tcsh and
          git-completion.bash to ${HOME}
       2- requires bash script to have a fixed name and location:
          ${HOME}/.git-completion.bash

  B) Modifications:
          git-completion.bash

     Modify the existing git-completion.bash script to support
     being sourced using bash (as now), but also executed using bash,
     and sourced using tcsh.

     Pros:
       1- only requires the user to deal with a single file
       2- maintenance more obvious for tcsh since it is entirely part
          of the same git-completion.bash script.
     Cons:
       1- tcsh support could affect bash support as they share the
          same script
       2- small tcsh section must use syntax suitable for both tcsh
          and bash and must be at the beginning of the script
       3- requires script to have a fixed name and location:
          ${HOME}/.git-completion.sh (for tcsh users only)

  C) Modifications:
          New git-completion.tcsh

     Provide a short tcsh script that generates another script
     which extends git-completion.bash.  This new script can be
     used by tcsh to perform completion.

     Pros:
       1- tcsh support is entirely isolated in git-completion.tcsh
       2- new tcsh script can be as complex as needed
     Cons (for tcsh users only):
       1- requires the user to copy both git-completion.tcsh and
          git-completion.bash to ${HOME}
       2- requires bash script to have a fixed name and location:
          ${HOME}/.git-completion.bash
       3- sourcing the new script will generate a third script

Approach (C) was selected avoid any modification to git-completion.bash.

Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>
Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-16 12:01:24 -08:00
Carlos Martín Nieto
962c38eedd config: don't segfault when given --path with a missing value
When given a variable without a value, such as '[section] var' and
asking git-config to treat it as a path, git_config_pathname returns
an error and doesn't modify its output parameter. show_config assumes
that the call is always successful and sets a variable to indicate
that vptr should be freed. In case of an error however, trying to do
this will cause the program to be killed, as it's pointing to memory
in the stack.

Detect the error and return immediately to avoid freeing or accessing
the uninitialed memory in the stack.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-15 18:12:17 -08:00
Brandon Casey
cd163d4b4e usage.c: detect recursion in die routines and bail out immediately
It is theoretically possible for a die handler to get into a state of
infinite recursion.  For example, if a die handler called another function
which itself called die().  Let's at least detect this situation, inform the
user, and call exit.

Signed-off-by: Brandon Casey <bcasey@nvidia.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-15 18:04:54 -08:00
Jeff King
afa8c07a26 checkout: print a message when switching unborn branches
When we switch to a new branch using checkout, we usually output a
message indicating what happened. However, when we switch from an unborn
branch to a new branch, we do not print anything, which may leave the
user wondering what happened.

The reason is that the unborn branch is a special case (see abe1998),
and does not follow the usual switch_branches code path. Let's add a
similar informational message to the special case to match the usual
code path.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-15 17:36:26 -08:00
Junio C Hamano
5a90748f28 Start 1.8.1 cycle
Prepare the release notes for the upcoming release, and describe
changes up to the 5th batch we just merged.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-15 11:21:47 -08:00
Junio C Hamano
4ad4fce63a Merge branch 'jc/prettier-pretty-note'
Emit the notes attached to the commit in "format-patch --notes"
output after three-dashes.

* jc/prettier-pretty-note:
  format-patch: add a blank line between notes and diffstat
  Doc User-Manual: Patch cover letter, three dashes, and --notes
  Doc format-patch: clarify --notes use case
  Doc notes: Include the format-patch --notes option
  Doc SubmittingPatches: Mention --notes option after "cover letter"
  Documentation: decribe format-patch --notes
  format-patch --notes: show notes after three-dashes
  format-patch: append --signature after notes
  pretty_print_commit(): do not append notes message
  pretty: prepare notes message at a centralized place
  format_note(): simplify API
  pretty: remove reencode_commit_message()
2012-11-15 10:25:05 -08:00
Junio C Hamano
159a5a2fa2 Merge branch 'mg/maint-pull-suggest-upstream-to'
Follow-on to the new "--set-upstream-to" topic from v1.8.0 to avoid
suggesting the deprecated "--set-upstream".

* mg/maint-pull-suggest-upstream-to:
  push/pull: adjust missing upstream help text to changed interface
2012-11-15 10:24:59 -08:00
Junio C Hamano
6050b5bca0 Merge branch 'mh/notes-string-list'
Improve the asymptotic performance of the cat_sort_uniq notes merge
strategy.

* mh/notes-string-list:
  string_list_add_refs_from_colon_sep(): use string_list_split()
  notes: fix handling of colon-separated values
  combine_notes_cat_sort_uniq(): sort and dedup lines all at once
  Initialize sort_uniq_list using named constant
  string_list: add a function string_list_remove_empty_items()
2012-11-15 10:24:53 -08:00
Junio C Hamano
2be3d85a1c Merge branch 'mh/strbuf-split'
Cleanups and documentation for strbuf_split.

* mh/strbuf-split:
  strbuf_split*(): document functions
  strbuf_split*(): rename "delim" parameter to "terminator"
  strbuf_split_buf(): simplify iteration
  strbuf_split_buf(): use ALLOC_GROW()
2012-11-15 10:24:49 -08:00
Junio C Hamano
6b34d6e692 Merge branch 'mm/maint-doc-commit-edit'
* mm/maint-doc-commit-edit:
  Document 'git commit --no-edit' explicitly
2012-11-15 10:24:44 -08:00
Junio C Hamano
80b2234e9b Merge branch 'as/maint-doc-fix-no-post-rewrite'
* as/maint-doc-fix-no-post-rewrite:
  commit: fixup misplacement of --no-post-rewrite description
2012-11-15 10:24:29 -08:00
Junio C Hamano
1f0335a63f Merge branch 'js/hp-nonstop'
Finishing touches to port to HP NonStop continues.

* js/hp-nonstop:
  fix 'make test' for HP NonStop
2012-11-15 10:24:13 -08:00
Junio C Hamano
a2055c28ee Merge branch 'cr/cvsimport-local-zone'
Allows "cvsimport" to read per-author timezone from the author info
file.

* cr/cvsimport-local-zone:
  cvsimport: work around perl tzset issue
  git-cvsimport: allow author-specific timezones
2012-11-15 10:24:09 -08:00
Junio C Hamano
6b8731258d Merge branch 'jc/same-encoding'
Various codepaths checked if two encoding names are the same using
ad-hoc code and some of them ended up asking iconv() to convert
between "utf8" and "UTF-8".  The former is not a valid way to spell
the encoding name, but often people use it by mistake, and we
equated them in some but not all codepaths. Introduce a new helper
function to make these codepaths consistent.

* jc/same-encoding:
  reencode_string(): introduce and use same_encoding()

Conflicts:
	builtin/mailinfo.c
2012-11-15 10:24:05 -08:00
Junio C Hamano
a1b3293936 Merge branch 'ph/submodule-sync-recursive'
Adds "--recursive" option to submodule sync.

* ph/submodule-sync-recursive:
  Add tests for submodule sync --recursive
  Teach --recursive to submodule sync
2012-11-15 10:24:01 -08:00
Junio C Hamano
84fcfaf92b Merge branch 'jk/maint-diff-grep-textconv'
Fixes inconsistent use of textconv with "git log -G".

* jk/maint-diff-grep-textconv:
  diff_grep: use textconv buffers for add/deleted files
2012-11-15 10:23:58 -08:00
Junio C Hamano
b398fcc262 Merge branch 'jh/symbolic-ref-d'
Add "symbolic-ref -d SYM" to delete a symbolic ref SYM.

It is already possible to remove a symbolic ref with "update-ref -d
--no-deref", but it may be a good addition for completeness.

* jh/symbolic-ref-d:
  git symbolic-ref --delete $symref
2012-11-15 10:23:51 -08:00
Junio C Hamano
7115d3cc2b Merge branch 'jc/maint-fetch-tighten-refname-check'
For a fetch refspec (or the result of applying wildcard on one), we
always want the RHS to map to something inside "refs/" hierarchy.

This was split out from discarded jc/maint-push-refs-all topic.

* jc/maint-fetch-tighten-refname-check:
  get_fetch_map(): tighten checks on dest refs
2012-11-15 10:22:54 -08:00
Matt Kraai
3469c7ebbf docs: move submodule section
293ab15e ("submodule: teach rm to remove submodules unless they
contain a git directory", 2012-09-26) inserted the "Submodules"
section between a sentence describing a command and the command.  Move
the "Submodules" section further down.

Noticed-by: Horst H. von Brand
Signed-off-by: Matt Kraai <kraai@ftbfs.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-14 13:49:53 -08:00
SZEDER Gábor
585b96bd4c completion: remove 'help' duplicate from porcelain commands
The list of all git commands is computed from the output of 'git help
-a', which already includes 'help', so there is no need to explicitly
add it once more when computing the list of porcelain commands.

Note that 'help' wasn't actually offered twice because of this,
because Bash filters duplicates from possible completion words.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-14 13:45:38 -08:00
Junio C Hamano
1d34c50f13 format-patch: add a blank line between notes and diffstat
The last line of the note text comes immediately before the diffstat
block, making the latter unnecessarily harder to view.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-13 15:02:46 -08:00
Michael J Gruber
9dfc36841b replace: parse revision argument for -d
'git replace' parses the revision arguments when it creates replacements
(so that a sha1 can be abbreviated, e.g.) but not when deleting
replacements.

Make it parse the argument to 'replace -d' in the same way.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Jeff King <peff@peff.net>
2012-11-13 08:34:14 -05:00
Jeff King
0f0ecf68b3 gitweb: escape html in rss title
The title of an RSS feed is generated from many components,
including the filename provided as a query parameter, but we
failed to quote it.  Besides showing the wrong output, this
is a vector for XSS attacks.

Signed-off-by: Jeff King <peff@peff.net>
2012-11-12 16:34:53 -05:00
Mark Levedahl
380a4d927b Update cygwin.c for new mingw-64 win32 api headers
The cygwin project recently switched to a new implementation of the
windows api, now using header files from the mingw-64 project. These
new header files are incompatible with the way cygwin.c included the
old headers: cygwin.c can be compiled using the new or the older (mingw)
headers, but different files must be included in different order for each
to work. The new headers are in use only for the current release series
(based upon the v1.7.x dll version). The previous release series using
the v1.5 dll is kept available but unmaintained for use on older versions
of Windows. So, patch cygwin.c to use the new include ordering only if
the dll version is 1.7 or higher.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
2012-11-12 15:47:50 -05:00
Jeff King
b0b00a3ee4 Merge branch 'ph/maint-submodule-status-fix'
Cleans up some leftover bits from an earlier submodule change.

* ph/maint-submodule-status-fix:
  submodule status: remove unused orig_* variables
  t7407: Fix recursive submodule test
2012-11-09 12:51:15 -05:00
Jeff King
19fb613695 Merge branch 'nd/builtin-to-libgit'
Code cleanups so that libgit.a does not depend on anything in the
builtin/ directory.

* nd/builtin-to-libgit:
  fetch-pack: move core code to libgit.a
  fetch-pack: remove global (static) configuration variable "args"
  send-pack: move core code to libgit.a
  Move setup_diff_pager to libgit.a
  Move print_commit_list to libgit.a
  Move estimate_bisect_steps to libgit.a
  Move try_merge_command and checkout_fast_forward to libgit.a
2012-11-09 12:51:06 -05:00
Jeff King
9d91c0e3d5 Merge branch 'nd/tree-walk-enum-cleanup'
* nd/tree-walk-enum-cleanup:
  tree-walk: use enum interesting instead of integer
2012-11-09 12:51:03 -05:00
Jeff King
23a50a1fb1 Merge branch 'sz/maint-curl-multi-timeout'
Sometimes curl_multi_timeout() function suggested a wrong timeout
value when there is no file descriptors to wait on and the http
transport ended up sleeping for minutes in select(2) system call.
Detect this and reduce the wait timeout in such a case.

* sz/maint-curl-multi-timeout:
  Fix potential hang in https handshake
2012-11-09 12:50:56 -05:00