git/git.git
5 years agoMerge branch 'ep/fix-test-lib-functions-report'
Junio C Hamano [Wed, 6 May 2015 04:00:35 +0000 (21:00 -0700)]
Merge branch 'ep/fix-test-lib-functions-report'

* ep/fix-test-lib-functions-report:
  test-lib-functions.sh: fix the second argument to some helper functions

5 years agoMerge branch 'cn/bom-in-gitignore'
Junio C Hamano [Wed, 6 May 2015 04:00:34 +0000 (21:00 -0700)]
Merge branch 'cn/bom-in-gitignore'

Teach the codepaths that read .gitignore and .gitattributes files
that these files encoded in UTF-8 may have UTF-8 BOM marker at the
beginning; this makes it in line with what we do for configuration
files already.

* cn/bom-in-gitignore:
  attr: skip UTF8 BOM at the beginning of the input file
  config: use utf8_bom[] from utf.[ch] in git_parse_source()
  utf8-bom: introduce skip_utf8_bom() helper
  add_excludes_from_file: clarify the bom skipping logic
  dir: allow a BOM at the beginning of exclude files

5 years agoMerge branch 'jc/epochtime-wo-tz'
Junio C Hamano [Wed, 6 May 2015 04:00:33 +0000 (21:00 -0700)]
Merge branch 'jc/epochtime-wo-tz'

"git commit --date=now" or anything that relies on approxidate lost
the daylight-saving-time offset.

* jc/epochtime-wo-tz:
  parse_date_basic(): let the system handle DST conversion
  parse_date_basic(): return early when given a bogus timestamp

5 years agoMerge branch 'nd/t1509-chroot-test'
Junio C Hamano [Wed, 6 May 2015 04:00:31 +0000 (21:00 -0700)]
Merge branch 'nd/t1509-chroot-test'

Correct test bitrot.

* nd/t1509-chroot-test:
  t1509: update prepare script to be able to run t1509 in chroot again

5 years agoMerge branch 'oh/fix-config-default-user-name-section'
Junio C Hamano [Wed, 6 May 2015 04:00:30 +0000 (21:00 -0700)]
Merge branch 'oh/fix-config-default-user-name-section'

The default $HOME/.gitconfig file created upon "git config --global"
that edits it had incorrectly spelled user.name and user.email
entries in it.

* oh/fix-config-default-user-name-section:
  config: fix settings in default_user_config template

5 years agoMerge branch 'jk/type-from-string-gently'
Junio C Hamano [Wed, 6 May 2015 04:00:29 +0000 (21:00 -0700)]
Merge branch 'jk/type-from-string-gently'

"git cat-file bl $blob" failed to barf even though there is no
object type that is "bl".

* jk/type-from-string-gently:
  type_from_string_gently: make sure length matches

5 years agoMerge branch 'sb/test-bitmap-free-at-end'
Junio C Hamano [Wed, 6 May 2015 04:00:28 +0000 (21:00 -0700)]
Merge branch 'sb/test-bitmap-free-at-end'

* sb/test-bitmap-free-at-end:
  pack-bitmap.c: fix a memleak

5 years agoMerge branch 'ld/p4-filetype-detection'
Junio C Hamano [Wed, 6 May 2015 04:00:27 +0000 (21:00 -0700)]
Merge branch 'ld/p4-filetype-detection'

* ld/p4-filetype-detection:
  git-p4: fix filetype detection on files opened exclusively
  git-p4: small fix for locked-file-move-test
  git-p4: fix small bug in locked test scripts

5 years agoMerge branch 'ts/checkout-advice-plural'
Junio C Hamano [Wed, 6 May 2015 04:00:27 +0000 (21:00 -0700)]
Merge branch 'ts/checkout-advice-plural'

* ts/checkout-advice-plural:
  checkout: call a single commit "it" intead of "them"

5 years agoMerge branch 'jk/init-core-worktree-at-root'
Junio C Hamano [Wed, 6 May 2015 04:00:26 +0000 (21:00 -0700)]
Merge branch 'jk/init-core-worktree-at-root'

We avoid setting core.worktree when the repository location is the
".git" directory directly at the top level of the working tree, but
the code misdetected the case in which the working tree is at the
root level of the filesystem (which arguably is a silly thing to
do, but still valid).

* jk/init-core-worktree-at-root:
  init: don't set core.worktree when initializing /.git

5 years agoMerge branch 'mh/show-branch-topic'
Junio C Hamano [Wed, 6 May 2015 04:00:25 +0000 (21:00 -0700)]
Merge branch 'mh/show-branch-topic'

"git show-branch --topics HEAD" (with no other arguments) did not
do anything interesting.  Instead, contrast the given revision
against all the local branches by default.

* mh/show-branch-topic:
  show-branch: show all local heads when only giving one rev along --topics

5 years agoMerge branch 'sb/line-log-plug-pairdiff-leak'
Junio C Hamano [Wed, 6 May 2015 04:00:25 +0000 (21:00 -0700)]
Merge branch 'sb/line-log-plug-pairdiff-leak'

* sb/line-log-plug-pairdiff-leak:
  line-log.c: fix a memleak

5 years agoMerge branch 'jc/diff-no-index-d-f'
Junio C Hamano [Wed, 6 May 2015 04:00:24 +0000 (21:00 -0700)]
Merge branch 'jc/diff-no-index-d-f'

The usual "git diff" when seeing a file turning into a directory
showed a patchset to remove the file and create all files in the
directory, but "git diff --no-index" simply refused to work.  Also,
when asked to compare a file and a directory, imitate POSIX "diff"
and compare the file with the file with the same name in the
directory, instead of refusing to run.

* jc/diff-no-index-d-f:
  diff-no-index: align D/F handling with that of normal Git
  diff-no-index: DWIM "diff D F" into "diff D/F F"

5 years agoMerge branch 'bc/object-id'
Junio C Hamano [Wed, 6 May 2015 04:00:23 +0000 (21:00 -0700)]
Merge branch 'bc/object-id'

Identify parts of the code that knows that we use SHA-1 hash to
name our objects too much, and use (1) symbolic constants instead
of hardcoded 20 as byte count and/or (2) use struct object_id
instead of unsigned char [20] for object names.

* bc/object-id:
  apply: convert threeway_stage to object_id
  patch-id: convert to use struct object_id
  commit: convert parts to struct object_id
  diff: convert struct combine_diff_path to object_id
  bulk-checkin.c: convert to use struct object_id
  zip: use GIT_SHA1_HEXSZ for trailers
  archive.c: convert to use struct object_id
  bisect.c: convert leaf functions to use struct object_id
  define utility functions for object IDs
  define a structure for object IDs

5 years agoGit 2.4 v2.4.0
Junio C Hamano [Thu, 30 Apr 2015 18:25:06 +0000 (11:25 -0700)]
Git 2.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'mh/multimail-renewal'
Junio C Hamano [Tue, 28 Apr 2015 20:01:29 +0000 (13:01 -0700)]
Merge branch 'mh/multimail-renewal'

* mh/multimail-renewal:
  Update git-multimail to version 1.0.2

5 years agoMerge branch 'mg/show-notes-doc'
Junio C Hamano [Tue, 28 Apr 2015 20:00:20 +0000 (13:00 -0700)]
Merge branch 'mg/show-notes-doc'

Documentation fix.

* mg/show-notes-doc:
  rev-list-options.txt: complete sentence about notes matching

5 years agoMerge branch 'nd/versioncmp-prereleases'
Junio C Hamano [Tue, 28 Apr 2015 20:00:19 +0000 (13:00 -0700)]
Merge branch 'nd/versioncmp-prereleases'

* nd/versioncmp-prereleases:
  git tag: mention versionsort.prereleaseSuffix in manpage

5 years agoMerge branch 'mg/status-v-v'
Junio C Hamano [Tue, 28 Apr 2015 20:00:18 +0000 (13:00 -0700)]
Merge branch 'mg/status-v-v'

* mg/status-v-v:
  status: document the -v/--verbose option

5 years agoUpdate git-multimail to version 1.0.2
Michael Haggerty [Mon, 27 Apr 2015 11:17:25 +0000 (13:17 +0200)]
Update git-multimail to version 1.0.2

The only changes are to the README files, most notably the list of
maintainers and the project URL.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoSync with 2.3.7
Junio C Hamano [Mon, 27 Apr 2015 19:26:21 +0000 (12:26 -0700)]
Sync with 2.3.7

5 years agoGit 2.3.7 v2.3.7
Junio C Hamano [Mon, 27 Apr 2015 19:25:36 +0000 (12:25 -0700)]
Git 2.3.7

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'tb/connect-ipv6-parse-fix' into maint
Junio C Hamano [Mon, 27 Apr 2015 19:23:53 +0000 (12:23 -0700)]
Merge branch 'tb/connect-ipv6-parse-fix' into maint

An earlier update to the parser that disects a URL broke an
address, followed by a colon, followed by an empty string (instead
of the port number), e.g. ssh://example.com:/path/to/repo.

* tb/connect-ipv6-parse-fix:
  connect.c: ignore extra colon after hostname

5 years agoMerge branch 'ma/bash-completion-leaking-x' into maint
Junio C Hamano [Mon, 27 Apr 2015 19:23:51 +0000 (12:23 -0700)]
Merge branch 'ma/bash-completion-leaking-x' into maint

The completion script (in contrib/) contaminated global namespace
and clobbered on a shell variable $x.

* ma/bash-completion-leaking-x:
  completion: fix global bash variable leak on __gitcompappend

5 years agoMerge branch 'jc/push-cert' into maint
Junio C Hamano [Mon, 27 Apr 2015 19:23:47 +0000 (12:23 -0700)]
Merge branch 'jc/push-cert' into maint

The "git push --signed" protocol extension did not limit what the
"nonce" that is a server-chosen string can contain or how long it
can be, which was unnecessarily lax.  Limit both the length and the
alphabet to a reasonably small space that can still have enough
entropy.

* jc/push-cert:
  push --signed: tighten what the receiving end can ask to sign

5 years agostatus: document the -v/--verbose option
Michael Haggerty [Thu, 23 Apr 2015 12:27:46 +0000 (14:27 +0200)]
status: document the -v/--verbose option

Document `git status -v`, including its new doubled `-vv` form.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoRelNotes: wordsmithing
Michael Haggerty [Thu, 23 Apr 2015 12:27:50 +0000 (14:27 +0200)]
RelNotes: wordsmithing

Make many textual tweaks to the 2.4.0 release notes.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoRelNotes: refer to the rebase -i "todo list", not "insn sheet"
Michael Haggerty [Thu, 23 Apr 2015 12:27:49 +0000 (14:27 +0200)]
RelNotes: refer to the rebase -i "todo list", not "insn sheet"

"Todo list" is the name that is used in the user-facing documentation.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoRelNotes: correct name of versionsort.prereleaseSuffix
Michael Haggerty [Thu, 23 Apr 2015 12:27:48 +0000 (14:27 +0200)]
RelNotes: correct name of versionsort.prereleaseSuffix

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agogit tag: mention versionsort.prereleaseSuffix in manpage
Michael Haggerty [Thu, 23 Apr 2015 12:27:47 +0000 (14:27 +0200)]
git tag: mention versionsort.prereleaseSuffix in manpage

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoGit 2.4.0-rc3 v2.4.0-rc3
Junio C Hamano [Wed, 22 Apr 2015 20:52:43 +0000 (13:52 -0700)]
Git 2.4.0-rc3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoSync with maint
Junio C Hamano [Tue, 21 Apr 2015 19:58:50 +0000 (12:58 -0700)]
Sync with maint

5 years agoGit 2.3.6 v2.3.6
Junio C Hamano [Tue, 21 Apr 2015 19:17:09 +0000 (12:17 -0700)]
Git 2.3.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'jk/colors' into maint
Junio C Hamano [Tue, 21 Apr 2015 19:12:25 +0000 (12:12 -0700)]
Merge branch 'jk/colors' into maint

"diff-highlight" (in contrib/) used to show byte-by-byte
differences, which meant that multi-byte characters can be chopped
in the middle.  It learned to pay attention to character boundaries
(assuming the UTF-8 payload).

* jk/colors:
  diff-highlight: do not split multibyte characters

5 years agoMerge branch 'jk/test-annoyances' into maint
Junio C Hamano [Tue, 21 Apr 2015 19:12:24 +0000 (12:12 -0700)]
Merge branch 'jk/test-annoyances' into maint

Test fixes.

* jk/test-annoyances:
  t5551: make EXPENSIVE test cheaper
  t5541: move run_with_cmdline_limit to test-lib.sh
  t: pass GIT_TRACE through Apache
  t: redirect stderr GIT_TRACE to descriptor 4
  t: translate SIGINT to an exit

5 years agoMerge branch 'pt/enter-repo-comment-fix' into maint
Junio C Hamano [Tue, 21 Apr 2015 19:12:23 +0000 (12:12 -0700)]
Merge branch 'pt/enter-repo-comment-fix' into maint

Documentation update.

* pt/enter-repo-comment-fix:
  enter_repo(): fix docs to match code

5 years agoMerge branch 'jz/gitweb-conf-doc-fix' into maint
Junio C Hamano [Tue, 21 Apr 2015 19:12:22 +0000 (12:12 -0700)]
Merge branch 'jz/gitweb-conf-doc-fix' into maint

Documentation update.

* jz/gitweb-conf-doc-fix:
  gitweb.conf.txt: say "build-time", not "built-time"

5 years agoMerge branch 'jk/cherry-pick-docfix' into maint
Junio C Hamano [Tue, 21 Apr 2015 19:12:21 +0000 (12:12 -0700)]
Merge branch 'jk/cherry-pick-docfix' into maint

* jk/cherry-pick-docfix:
  cherry-pick: fix docs describing handling of empty commits

5 years agoMerge branch 'iu/fix-parse-options-h-comment' into maint
Junio C Hamano [Tue, 21 Apr 2015 19:12:20 +0000 (12:12 -0700)]
Merge branch 'iu/fix-parse-options-h-comment' into maint

* iu/fix-parse-options-h-comment:
  parse-options.h: OPTION_{BIT,SET_INT} do not store pointer to defval

5 years agoMerge branch 'jg/cguide-we-cannot-count' into maint
Junio C Hamano [Tue, 21 Apr 2015 19:12:19 +0000 (12:12 -0700)]
Merge branch 'jg/cguide-we-cannot-count' into maint

* jg/cguide-we-cannot-count:
  CodingGuidelines: update 'rough' rule count

5 years agoMerge branch 'jk/pack-corruption-post-mortem' into maint
Junio C Hamano [Tue, 21 Apr 2015 19:12:18 +0000 (12:12 -0700)]
Merge branch 'jk/pack-corruption-post-mortem' into maint

Documentation update.

* jk/pack-corruption-post-mortem:
  howto: document more tools for recovery corruption

5 years agoMerge branch 'jn/doc-fast-import-no-16-octopus-limit' into maint
Junio C Hamano [Tue, 21 Apr 2015 19:12:17 +0000 (12:12 -0700)]
Merge branch 'jn/doc-fast-import-no-16-octopus-limit' into maint

Documentation update.

* jn/doc-fast-import-no-16-octopus-limit:
  fast-import doc: remove suggested 16-parent limit

5 years agoRelNotes: "merge --quiet" change has been reverted
Junio C Hamano [Tue, 21 Apr 2015 18:09:19 +0000 (11:09 -0700)]
RelNotes: "merge --quiet" change has been reverted

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoHopefully the last batch for 2.4
Junio C Hamano [Mon, 20 Apr 2015 22:30:13 +0000 (15:30 -0700)]
Hopefully the last batch for 2.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'ps/grep-help-all-callback-arg'
Junio C Hamano [Mon, 20 Apr 2015 22:28:34 +0000 (15:28 -0700)]
Merge branch 'ps/grep-help-all-callback-arg'

Code clean-up.

* ps/grep-help-all-callback-arg:
  grep: correctly initialize help-all option

5 years agoMerge branch 'tb/connect-ipv6-parse-fix'
Junio C Hamano [Mon, 20 Apr 2015 22:28:33 +0000 (15:28 -0700)]
Merge branch 'tb/connect-ipv6-parse-fix'

An earlier update to the parser that disects an address broke an
address, followed by a colon, followed by an empty string (instead
of the port number).

* tb/connect-ipv6-parse-fix:
  connect.c: ignore extra colon after hostname

5 years agoMerge branch 'va/fix-git-p4-tests'
Junio C Hamano [Mon, 20 Apr 2015 22:28:32 +0000 (15:28 -0700)]
Merge branch 'va/fix-git-p4-tests'

Test fixes for git-p4.

* va/fix-git-p4-tests:
  t9814: guarantee only one source exists in git-p4 copy tests
  git-p4: fix copy detection test
  t9814: fix broken shell syntax in git-p4 rename test

5 years agoMerge branch 'jc/push-cert'
Junio C Hamano [Mon, 20 Apr 2015 22:28:31 +0000 (15:28 -0700)]
Merge branch 'jc/push-cert'

The "git push --signed" protocol extension did not limit what the
"nonce" that is a server-chosen string can contain or how long it
can be, which was unnecessarily lax.  Limit both the length and the
alphabet to a reasonably small space that can still have enough
entropy.

* jc/push-cert:
  push --signed: tighten what the receiving end can ask to sign

5 years agoMerge branch 'ma/bash-completion-leaking-x'
Junio C Hamano [Mon, 20 Apr 2015 22:28:29 +0000 (15:28 -0700)]
Merge branch 'ma/bash-completion-leaking-x'

The completion script (in contrib/) contaminated global namespace
and clobbered on a shell variable $x.

* ma/bash-completion-leaking-x:
  completion: fix global bash variable leak on __gitcompappend

5 years agoMerge tag 'gitgui-0.20.0' of http://repo.or.cz/r/git-gui
Junio C Hamano [Sun, 19 Apr 2015 01:35:48 +0000 (18:35 -0700)]
Merge tag 'gitgui-0.20.0' of repo.or.cz/r/git-gui

git-gui 0.20.0

* tag 'gitgui-0.20.0' of http://repo.or.cz/r/git-gui:
  git-gui: set version 0.20
  git-gui: sv.po: Update Swedish translation (547t0f0u)
  git-gui i18n: Updated Bulgarian translation (547t,0f,0u)
  git-gui: Makes chooser set 'gitdir' to the resolved path
  git-gui: Fixes chooser not accepting gitfiles
  git-gui: reinstate support for Tcl 8.4
  git-gui: fix problem with gui.maxfilesdisplayed
  git-gui: fix verbose loading when git path contains spaces.
  git-gui/gitk: Do not depend on Cygwin's "kill" command on Windows
  git-gui: add configurable tab size to the diff view
  git-gui: Make git-gui lib dir configurable at runime
  git-gui i18n: Updated Bulgarian translation (520t,0f,0u)
  L10n: vi.po (543t): Init translation for Vietnamese
  git-gui: align the new recursive checkbox with the radiobuttons.
  git-gui: Add a 'recursive' checkbox in the clone menu.

5 years agot1509: update prepare script to be able to run t1509 in chroot again
Nguyễn Thái Ngọc Duy [Sat, 18 Apr 2015 11:22:53 +0000 (18:22 +0700)]
t1509: update prepare script to be able to run t1509 in chroot again

Tested on Gentoo and OpenSUSE 13.1, both x86-64

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agogit-gui: set version 0.20 gitgui-0.20.0
Pat Thoyts [Sat, 18 Apr 2015 11:15:32 +0000 (12:15 +0100)]
git-gui: set version 0.20

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
5 years agogit-gui: sv.po: Update Swedish translation (547t0f0u)
Peter Krefting [Fri, 27 Mar 2015 09:25:32 +0000 (10:25 +0100)]
git-gui: sv.po: Update Swedish translation (547t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
5 years agogit-gui i18n: Updated Bulgarian translation (547t,0f,0u)
Alexander Shopov [Tue, 7 Apr 2015 15:29:46 +0000 (18:29 +0300)]
git-gui i18n: Updated Bulgarian translation (547t,0f,0u)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
5 years agotype_from_string_gently: make sure length matches
Jeff King [Fri, 17 Apr 2015 14:52:48 +0000 (10:52 -0400)]
type_from_string_gently: make sure length matches

When commit fe8e3b7 refactored type_from_string to allow
input that was not NUL-terminated, it switched to using
strncmp instead of strcmp. But this means we check only the
first "len" bytes of the strings, and ignore any remaining
bytes in the object_type_string. We should make sure that it
is also "len" bytes, or else we would accept "comm" as
"commit", and so forth.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoconfig: fix settings in default_user_config template
Ossi Herrala [Fri, 17 Apr 2015 14:50:10 +0000 (17:50 +0300)]
config: fix settings in default_user_config template

The name (not user) and email setting should be in config section
"user" and not in "core" as documented in Documentation/config.txt.

Signed-off-by: Ossi Herrala <oherrala@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agorev-list-options.txt: complete sentence about notes matching
Michael J Gruber [Fri, 17 Apr 2015 14:28:56 +0000 (16:28 +0200)]
rev-list-options.txt: complete sentence about notes matching

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agotest-lib-functions.sh: fix the second argument to some helper functions
Elia Pinto [Thu, 16 Apr 2015 14:12:07 +0000 (07:12 -0700)]
test-lib-functions.sh: fix the second argument to some helper functions

The second argument to test_path_is_file and test_path_is_dir
must be $2 and not $*, which instead would repeat the file
name in the error message.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
Reviewed-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoattr: skip UTF8 BOM at the beginning of the input file
Junio C Hamano [Thu, 16 Apr 2015 17:48:58 +0000 (10:48 -0700)]
attr: skip UTF8 BOM at the beginning of the input file

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoconfig: use utf8_bom[] from utf.[ch] in git_parse_source()
Junio C Hamano [Thu, 16 Apr 2015 17:47:45 +0000 (10:47 -0700)]
config: use utf8_bom[] from utf.[ch] in git_parse_source()

Because the function reads one character at the time, unfortunately
we cannot use the easier skip_utf8_bom() helper, but at least we do
not have to duplicate the constant string this way.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoutf8-bom: introduce skip_utf8_bom() helper
Junio C Hamano [Thu, 16 Apr 2015 17:45:29 +0000 (10:45 -0700)]
utf8-bom: introduce skip_utf8_bom() helper

With the recent change to ignore the UTF8 BOM at the beginning of
.gitignore files, we now have two codepaths that do such a skipping
(the other one is for reading the configuration files).

Introduce utf8_bom[] constant string and skip_utf8_bom() helper
and teach .gitignore code how to use it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoadd_excludes_from_file: clarify the bom skipping logic
Junio C Hamano [Thu, 16 Apr 2015 18:26:29 +0000 (11:26 -0700)]
add_excludes_from_file: clarify the bom skipping logic

Even though the previous step shifts where the "entry" begins, we
still iterate over the original buf[], which may begin with the
UTF-8 BOM we are supposed to be skipping.  At the end of the first
line, the code grabs the contents of it starting at "entry", so
there is nothing wrong per-se, but the logic looks really confused.

Instead, move the buf pointer and shrink its size, to truly
pretend that UTF-8 BOM did not exist in the input.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodir: allow a BOM at the beginning of exclude files
Carlos Martín Nieto [Thu, 16 Apr 2015 14:05:12 +0000 (16:05 +0200)]
dir: allow a BOM at the beginning of exclude files

Some text editors like Notepad or LibreOffice write an UTF-8 BOM in
order to indicate that the file is Unicode text rather than whatever the
current locale would indicate.

If someone uses such an editor to edit a gitignore file, we are left
with those three bytes at the beginning of the file. If we do not skip
them, we will attempt to match a filename with the BOM as prefix, which
won't match the files the user is expecting.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoRevert "merge: pass verbosity flag down to merge-recursive"
Junio C Hamano [Thu, 16 Apr 2015 15:03:14 +0000 (08:03 -0700)]
Revert "merge: pass verbosity flag down to merge-recursive"

This reverts commit 2bf15a3330a26183adc8563dbeeacc11294b8a01, whose
intention was good, but the verbosity levels used in merge-recursive
turns out to be rather uneven.  For example, a merge of two branches
with conflicting submodule updates used to report CONFLICT: output
with --quiet but no longer (which *is* desired), while the final
"Automatic merge failed; fix conflicts and then commit" message is
still shown even with --quiet (which *is* inconsistent).

Originally reported by Bryan Turner; it is too early to declare what
the concensus is, but it seems that we would need to level the
verbosity levels used in merge strategy backends before we can go
forward.  In the meantime, we'd revert to the old behaviour until
that happens.

cf. $gmane/267245

5 years agoparse_date_basic(): let the system handle DST conversion
Junio C Hamano [Wed, 15 Apr 2015 15:47:48 +0000 (08:47 -0700)]
parse_date_basic(): let the system handle DST conversion

The function parses the input to compute the broken-down time in
"struct tm", and the GMT timezone offset.  If the timezone offset
does not exist in the input, the broken-down time is turned into the
number of seconds since epoch both in the current timezone and in
GMT and the offset is computed as their difference.

However, we forgot to make sure tm.tm_isdst is set to -1 (i.e. let
the system figure out if DST is in effect in the current timezone
when turning the broken-down time to the number of seconds since
epoch); it is done so at the beginning of the function, but a call
to match_digit() in the function can lead to a call to gmtime_r() to
clobber the field.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Diagnosed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoparse_date_basic(): return early when given a bogus timestamp
Junio C Hamano [Wed, 15 Apr 2015 15:43:58 +0000 (08:43 -0700)]
parse_date_basic(): return early when given a bogus timestamp

When the input does not have GMT timezone offset, the code computes
it by computing the local and GMT time for the given timestamp. But
there is no point doing so if the given timestamp is known to be a
bogus one.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoGit 2.4.0-rc2 v2.4.0-rc2
Junio C Hamano [Tue, 14 Apr 2015 18:57:13 +0000 (11:57 -0700)]
Git 2.4.0-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'jk/colors'
Junio C Hamano [Tue, 14 Apr 2015 18:49:13 +0000 (11:49 -0700)]
Merge branch 'jk/colors'

"diff-highlight" (in contrib/) used to show byte-by-byte
differences, which meant that multi-byte characters can be chopped
in the middle.  It learned to pay attention to character boundaries
(assuming the UTF-8 payload).

* jk/colors:
  diff-highlight: do not split multibyte characters

5 years agoMerge branch 'jk/merge-quiet'
Junio C Hamano [Tue, 14 Apr 2015 18:49:12 +0000 (11:49 -0700)]
Merge branch 'jk/merge-quiet'

"git merge --quiet" did not squelch messages from the underlying
merge-recursive strategy.

* jk/merge-quiet:
  merge: pass verbosity flag down to merge-recursive

5 years agoMerge branch 'jk/pack-corruption-post-mortem'
Junio C Hamano [Tue, 14 Apr 2015 18:49:11 +0000 (11:49 -0700)]
Merge branch 'jk/pack-corruption-post-mortem'

Documentation update.

* jk/pack-corruption-post-mortem:
  howto: document more tools for recovery corruption

5 years agoMerge branch 'jc/update-instead-into-void'
Junio C Hamano [Tue, 14 Apr 2015 18:49:10 +0000 (11:49 -0700)]
Merge branch 'jc/update-instead-into-void'

A push into an unborn branch, with "receive.denyCurrentBranch" set
to "updateInstead", did not check out the working tree as expected.

* jc/update-instead-into-void:
  push-to-deploy: allow pushing into an unborn branch and updating it

5 years agoMerge branch 'sb/plug-streaming-leak'
Junio C Hamano [Tue, 14 Apr 2015 18:49:09 +0000 (11:49 -0700)]
Merge branch 'sb/plug-streaming-leak'

* sb/plug-streaming-leak:
  streaming.c: fix a memleak

5 years agoMerge branch 'jn/doc-fast-import-no-16-octopus-limit'
Junio C Hamano [Tue, 14 Apr 2015 18:49:08 +0000 (11:49 -0700)]
Merge branch 'jn/doc-fast-import-no-16-octopus-limit'

Documentation update.

* jn/doc-fast-import-no-16-octopus-limit:
  fast-import doc: remove suggested 16-parent limit

5 years agoMerge branch 'sb/plug-wt-shortstatus-tracking-leak'
Junio C Hamano [Tue, 14 Apr 2015 18:49:07 +0000 (11:49 -0700)]
Merge branch 'sb/plug-wt-shortstatus-tracking-leak'

* sb/plug-wt-shortstatus-tracking-leak:
  wt-status.c: fix a memleak

5 years agoMerge branch 'pt/enter-repo-comment-fix'
Junio C Hamano [Tue, 14 Apr 2015 17:34:05 +0000 (10:34 -0700)]
Merge branch 'pt/enter-repo-comment-fix'

* pt/enter-repo-comment-fix:
  enter_repo(): fix docs to match code

5 years agoMerge branch 'jz/gitweb-conf-doc-fix'
Junio C Hamano [Tue, 14 Apr 2015 17:34:01 +0000 (10:34 -0700)]
Merge branch 'jz/gitweb-conf-doc-fix'

* jz/gitweb-conf-doc-fix:
  gitweb.conf.txt: say "build-time", not "built-time"

5 years agoMerge branch 'jk/cherry-pick-docfix'
Junio C Hamano [Tue, 14 Apr 2015 17:33:54 +0000 (10:33 -0700)]
Merge branch 'jk/cherry-pick-docfix'

* jk/cherry-pick-docfix:
  cherry-pick: fix docs describing handling of empty commits

5 years agoMerge branch 'iu/fix-parse-options-h-comment'
Junio C Hamano [Tue, 14 Apr 2015 17:33:45 +0000 (10:33 -0700)]
Merge branch 'iu/fix-parse-options-h-comment'

* iu/fix-parse-options-h-comment:
  parse-options.h: OPTION_{BIT,SET_INT} do not store pointer to defval

5 years agoMerge branch 'jg/cguide-we-cannot-count'
Junio C Hamano [Tue, 14 Apr 2015 16:55:29 +0000 (09:55 -0700)]
Merge branch 'jg/cguide-we-cannot-count'

* jg/cguide-we-cannot-count:
  CodingGuidelines: update 'rough' rule count

5 years agoCodingGuidelines: update 'rough' rule count
Julian Gindi [Mon, 13 Apr 2015 12:54:14 +0000 (08:54 -0400)]
CodingGuidelines: update 'rough' rule count

Changed inaccurate count of "rough rules" from three to the more
generic 'a few'.

Signed-off-by: Julian Gindi <juliangindi@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agogrep: correctly initialize help-all option
Patrick Steinhardt [Thu, 9 Apr 2015 19:59:06 +0000 (21:59 +0200)]
grep: correctly initialize help-all option

The "help-all" option is being initialized with a wrong value.
While being semantically wrong this can also cause a segmentation
fault in gcc on ARMv7 hardfloat platforms with a hardened
toolchain. Fix this by initializing with a NULL value.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Reviewed-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocompletion: fix global bash variable leak on __gitcompappend
Márcio Almada [Wed, 8 Apr 2015 05:45:58 +0000 (02:45 -0300)]
completion: fix global bash variable leak on __gitcompappend

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agopack-bitmap.c: fix a memleak
Stefan Beller [Tue, 31 Mar 2015 01:22:10 +0000 (18:22 -0700)]
pack-bitmap.c: fix a memleak

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot9814: guarantee only one source exists in git-p4 copy tests
Vitor Antunes [Sun, 5 Apr 2015 23:08:35 +0000 (00:08 +0100)]
t9814: guarantee only one source exists in git-p4 copy tests

By using a tree with multiple identical files and allowing copy detection to
choose any one of them, the check in the test is unnecessarily complex.  We can
simplify by:

* Modify source file (file2) before copying the file.
* Check that only file2 is the source in the output of "p4 filelog".
* Remove all "case" statements and replace them with simple tests to check
  that source is "file2".

Signed-off-by: Vitor Antunes <vitor.hda@gmail.com>
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoMerge tag 'l10n-2.4.0-rnd2' of git://github.com/git-l10n/git-po
Junio C Hamano [Thu, 9 Apr 2015 04:15:33 +0000 (21:15 -0700)]
Merge tag 'l10n-2.4.0-rnd2' of git://github.com/git-l10n/git-po

git l10n 2.4.0-rnd2

6 years agoconnect.c: ignore extra colon after hostname
Torsten Bögershausen [Tue, 7 Apr 2015 20:03:25 +0000 (22:03 +0200)]
connect.c: ignore extra colon after hostname

Ignore an extra ':' at the end of the hostname in URL's like
"ssh://example.com:/path/to/repo"

The colon is meant to separate a port number from the hostname.
If the port is empty, the colon should be ignored, see RFC 3986.

It had been working for URLs with ssh:// scheme, but was unintentionally
broken in 86ceb3, "allow ssh://user@[2001:db8::1]/repo.git"

Reported-by: Reid Woodbury Jr. <reidw@rawsound.com>
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoMerge branch 'master' of git://github.com/alexhenrie/git-po
Jiang Xin [Thu, 9 Apr 2015 00:21:39 +0000 (08:21 +0800)]
Merge branch 'master' of git://github.com/alexhenrie/git-po

* 'master' of git://github.com/alexhenrie/git-po:
  l10n: ca.po: update translation

6 years agol10n: TEAMS: Change repository URL of zh_CN
Jiang Xin [Thu, 9 Apr 2015 00:00:10 +0000 (08:00 +0800)]
l10n: TEAMS: Change repository URL of zh_CN

Repository URL of zh_CN l10n for Git has been changed over 2 years,
update po/TEAMS for it.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
6 years agol10n: ca.po: update translation
Alex Henrie [Wed, 8 Apr 2015 00:07:47 +0000 (18:07 -0600)]
l10n: ca.po: update translation

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
6 years agol10n: Updated Bulgarian translation of git (2305t,0f,0u)
Alexander Shopov [Tue, 7 Apr 2015 08:22:47 +0000 (11:22 +0300)]
l10n: Updated Bulgarian translation of git (2305t,0f,0u)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
6 years agol10n: sv.po: Update Swedish translation (2305t0f0u)
Peter Krefting [Tue, 7 Apr 2015 07:45:20 +0000 (08:45 +0100)]
l10n: sv.po: Update Swedish translation (2305t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
6 years agol10n: de.po: translate one message
Ralf Thielow [Sat, 4 Apr 2015 08:06:42 +0000 (10:06 +0200)]
l10n: de.po: translate one message

Translate one message came from git.pot update in 6eebb35
(l10n: git.pot: v2.4.0 round 2 (1 update)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
6 years agodiff-highlight: do not split multibyte characters
Kyle J. McKay [Fri, 3 Apr 2015 22:15:14 +0000 (15:15 -0700)]
diff-highlight: do not split multibyte characters

When the input is UTF-8 and Perl is operating on bytes instead of
characters, a diff that changes one multibyte character to another
that shares an initial byte sequence will result in a broken diff
display as the common byte sequence prefix will be separated from
the rest of the bytes in the multibyte character.

For example, if a single line contains only the unicode character
U+C9C4 (encoded as UTF-8 0xEC, 0xA7, 0x84) and that line is then
changed to the unicode character U+C9C0 (encoded as UTF-8 0xEC,
0xA7, 0x80), when operating on bytes diff-highlight will show only
the single byte change from 0x84 to 0x80 thus creating invalid UTF-8
and a broken diff display.

Fix this by putting Perl into character mode when splitting the line
and then back into byte mode after the split is finished.

The utf8::xxx functions require Perl 5.8 so we require that as well.

Also, since we are mucking with code in the split_line function, we
change a '*' quantifier to a '+' quantifier when matching the $COLOR
expression which has the side effect of speeding everything up while
eliminating useless '' elements in the returned array.

Reported-by: Yi EungJun <semtlenori@gmail.com>
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agogit-p4: fix filetype detection on files opened exclusively
Blair Holloway [Sat, 4 Apr 2015 08:46:03 +0000 (09:46 +0100)]
git-p4: fix filetype detection on files opened exclusively

If a Perforce server is configured to automatically set +l
(exclusive lock) on add of certain file types, git p4 submit will
fail during getP4OpenedType, as the regex doesn't expect the
trailing '*exclusive*' from p4 opened:

  //depot/file.png#1 - add default change (binary+l) *exclusive*

Signed-off-by: Blair Holloway <blair_holloway@playstation.sony.com>
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agogit-p4: small fix for locked-file-move-test
Luke Diamand [Sat, 4 Apr 2015 08:46:02 +0000 (09:46 +0100)]
git-p4: small fix for locked-file-move-test

The test for handling of failure when trying to move a file
that is locked by another client was not quite correct - it
failed early on because the target file in the move already
existed.

The test now fails because git-p4 does not properly detect
that p4 has rejected the move, and instead just crashes. At
present, git-p4 has no support for detecting that a file
has been locked and reporting it to the user, so this is
the expected outcome.

Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agogit-p4: fix small bug in locked test scripts
Luke Diamand [Sat, 4 Apr 2015 08:46:01 +0000 (09:46 +0100)]
git-p4: fix small bug in locked test scripts

Test script t9816-git-p4-locked.sh test #4 tests for
adding a file that is locked by Perforce automatically.
This is currently not supported by git-p4 and so is
expected to fail.

However, a small typo meant it always failed, even with
a fixed git-p4. Fix the typo to resolve this.

Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agol10n: fr.po v2.4.0 round 2
Jean-Noel Avila [Sat, 4 Apr 2015 16:04:56 +0000 (18:04 +0200)]
l10n: fr.po v2.4.0 round 2

Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
6 years agol10n: ru: updated Russian translation
Dimitriy Ryazantcev [Fri, 3 Apr 2015 13:30:14 +0000 (16:30 +0300)]
l10n: ru: updated Russian translation

Signed-off-by: Dimitriy Ryazantcev <dimitriy.ryazantcev@gmail.com>
6 years agol10n: vi.po(2305t): Updated 1 new string
Tran Ngoc Quan [Fri, 3 Apr 2015 01:54:35 +0000 (08:54 +0700)]
l10n: vi.po(2305t): Updated 1 new string

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
6 years agol10n: zh_CN: for git v2.4.0 l10n round 2
Jiang Xin [Fri, 3 Apr 2015 00:39:57 +0000 (08:39 +0800)]
l10n: zh_CN: for git v2.4.0 l10n round 2

Translate 1 update message (2305t0f0u) for git v2.4.0 l10n round 2.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>