]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
5 years agodiff-parseopt: convert --color-moved-ws
Nguyễn Thái Ngọc Duy [Sun, 24 Mar 2019 08:20:10 +0000 (15:20 +0700)] 
diff-parseopt: convert --color-moved-ws

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --[no-]color-moved
Nguyễn Thái Ngọc Duy [Sun, 24 Mar 2019 08:20:09 +0000 (15:20 +0700)] 
diff-parseopt: convert --[no-]color-moved

Mark one more string for translation while at there

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --inter-hunk-context
Nguyễn Thái Ngọc Duy [Sun, 24 Mar 2019 08:20:08 +0000 (15:20 +0700)] 
diff-parseopt: convert --inter-hunk-context

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --no-prefix
Nguyễn Thái Ngọc Duy [Sun, 24 Mar 2019 08:20:07 +0000 (15:20 +0700)] 
diff-parseopt: convert --no-prefix

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --line-prefix
Nguyễn Thái Ngọc Duy [Sun, 24 Mar 2019 08:20:06 +0000 (15:20 +0700)] 
diff-parseopt: convert --line-prefix

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --[src|dst]-prefix
Nguyễn Thái Ngọc Duy [Sun, 24 Mar 2019 08:20:05 +0000 (15:20 +0700)] 
diff-parseopt: convert --[src|dst]-prefix

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --[no-]abbrev
Nguyễn Thái Ngọc Duy [Sun, 24 Mar 2019 08:20:04 +0000 (15:20 +0700)] 
diff-parseopt: convert --[no-]abbrev

OPT__ABBREV() has the same behavior as the deleted code with one
difference: it does check for valid number and error out if not. And the
'40' change is self explanatory.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --diff-filter
Nguyễn Thái Ngọc Duy [Sun, 24 Mar 2019 08:20:03 +0000 (15:20 +0700)] 
diff-parseopt: convert --diff-filter

While at it, mark one more string for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --find-object
Nguyễn Thái Ngọc Duy [Sun, 24 Mar 2019 08:20:02 +0000 (15:20 +0700)] 
diff-parseopt: convert --find-object

While at it, mark one more string for translation.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert -O
Nguyễn Thái Ngọc Duy [Sun, 24 Mar 2019 08:20:01 +0000 (15:20 +0700)] 
diff-parseopt: convert -O

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --pickaxe-all|--pickaxe-regex
Nguyễn Thái Ngọc Duy [Sun, 24 Mar 2019 08:20:00 +0000 (15:20 +0700)] 
diff-parseopt: convert --pickaxe-all|--pickaxe-regex

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert -S|-G
Nguyễn Thái Ngọc Duy [Sun, 24 Mar 2019 08:19:59 +0000 (15:19 +0700)] 
diff-parseopt: convert -S|-G

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert -l
Nguyễn Thái Ngọc Duy [Sun, 24 Mar 2019 08:19:58 +0000 (15:19 +0700)] 
diff-parseopt: convert -l

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert -z
Nguyễn Thái Ngọc Duy [Sun, 24 Mar 2019 08:19:57 +0000 (15:19 +0700)] 
diff-parseopt: convert -z

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --ita-[in]visible-in-index
Nguyễn Thái Ngọc Duy [Sun, 24 Mar 2019 08:19:56 +0000 (15:19 +0700)] 
diff-parseopt: convert --ita-[in]visible-in-index

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --ws-error-highlight
Nguyễn Thái Ngọc Duy [Sun, 24 Mar 2019 08:19:55 +0000 (15:19 +0700)] 
diff-parseopt: convert --ws-error-highlight

Mark one more string for translation while at there.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --submodule
Nguyễn Thái Ngọc Duy [Tue, 5 Mar 2019 12:30:26 +0000 (19:30 +0700)] 
diff-parseopt: convert --submodule

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --ignore-submodules
Nguyễn Thái Ngọc Duy [Tue, 5 Mar 2019 12:30:25 +0000 (19:30 +0700)] 
diff-parseopt: convert --ignore-submodules

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --textconv
Nguyễn Thái Ngọc Duy [Tue, 5 Mar 2019 12:30:24 +0000 (19:30 +0700)] 
diff-parseopt: convert --textconv

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --ext-diff
Nguyễn Thái Ngọc Duy [Tue, 5 Mar 2019 12:30:23 +0000 (19:30 +0700)] 
diff-parseopt: convert --ext-diff

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --quiet
Nguyễn Thái Ngọc Duy [Tue, 5 Mar 2019 12:30:22 +0000 (19:30 +0700)] 
diff-parseopt: convert --quiet

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --exit-code
Nguyễn Thái Ngọc Duy [Tue, 5 Mar 2019 12:30:21 +0000 (19:30 +0700)] 
diff-parseopt: convert --exit-code

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --color-words
Nguyễn Thái Ngọc Duy [Tue, 5 Mar 2019 12:30:20 +0000 (19:30 +0700)] 
diff-parseopt: convert --color-words

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --word-diff-regex
Nguyễn Thái Ngọc Duy [Tue, 5 Mar 2019 12:30:19 +0000 (19:30 +0700)] 
diff-parseopt: convert --word-diff-regex

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --word-diff
Nguyễn Thái Ngọc Duy [Tue, 5 Mar 2019 12:30:18 +0000 (19:30 +0700)] 
diff-parseopt: convert --word-diff

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --[no-]color
Nguyễn Thái Ngọc Duy [Tue, 5 Mar 2019 12:30:17 +0000 (19:30 +0700)] 
diff-parseopt: convert --[no-]color

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --[no-]follow
Nguyễn Thái Ngọc Duy [Tue, 5 Mar 2019 12:30:16 +0000 (19:30 +0700)] 
diff-parseopt: convert --[no-]follow

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert -R
Nguyễn Thái Ngọc Duy [Tue, 5 Mar 2019 12:30:15 +0000 (19:30 +0700)] 
diff-parseopt: convert -R

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert -a|--text
Nguyễn Thái Ngọc Duy [Tue, 5 Mar 2019 12:30:14 +0000 (19:30 +0700)] 
diff-parseopt: convert -a|--text

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --full-index
Nguyễn Thái Ngọc Duy [Tue, 5 Mar 2019 12:30:13 +0000 (19:30 +0700)] 
diff-parseopt: convert --full-index

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --binary
Nguyễn Thái Ngọc Duy [Tue, 5 Mar 2019 12:30:12 +0000 (19:30 +0700)] 
diff-parseopt: convert --binary

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --anchored
Nguyễn Thái Ngọc Duy [Tue, 5 Mar 2019 12:30:11 +0000 (19:30 +0700)] 
diff-parseopt: convert --anchored

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --diff-algorithm
Nguyễn Thái Ngọc Duy [Tue, 5 Mar 2019 12:30:10 +0000 (19:30 +0700)] 
diff-parseopt: convert --diff-algorithm

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --histogram
Nguyễn Thái Ngọc Duy [Tue, 5 Mar 2019 12:30:09 +0000 (19:30 +0700)] 
diff-parseopt: convert --histogram

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --patience
Nguyễn Thái Ngọc Duy [Tue, 5 Mar 2019 12:30:08 +0000 (19:30 +0700)] 
diff-parseopt: convert --patience

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --[no-]indent-heuristic
Nguyễn Thái Ngọc Duy [Tue, 5 Mar 2019 12:30:07 +0000 (19:30 +0700)] 
diff-parseopt: convert --[no-]indent-heuristic

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --ignore-some-changes
Nguyễn Thái Ngọc Duy [Thu, 21 Feb 2019 11:16:21 +0000 (18:16 +0700)] 
diff-parseopt: convert --ignore-some-changes

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --[no-]minimal
Nguyễn Thái Ngọc Duy [Thu, 21 Feb 2019 11:16:20 +0000 (18:16 +0700)] 
diff-parseopt: convert --[no-]minimal

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --relative
Nguyễn Thái Ngọc Duy [Thu, 21 Feb 2019 11:16:19 +0000 (18:16 +0700)] 
diff-parseopt: convert --relative

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --no-renames|--[no--rename-empty
Nguyễn Thái Ngọc Duy [Thu, 21 Feb 2019 11:16:18 +0000 (18:16 +0700)] 
diff-parseopt: convert --no-renames|--[no--rename-empty

For --rename-empty, see 90d43b0768 (teach diffcore-rename to
optionally ignore empty content - 2012-03-22) for more information.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --find-copies-harder
Nguyễn Thái Ngọc Duy [Thu, 21 Feb 2019 11:16:17 +0000 (18:16 +0700)] 
diff-parseopt: convert --find-copies-harder

--no-find-copies-harder is also added on purpose (because I don't see
why we should not have the --no- version for this)

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert -C|--find-copies
Nguyễn Thái Ngọc Duy [Thu, 21 Feb 2019 11:16:16 +0000 (18:16 +0700)] 
diff-parseopt: convert -C|--find-copies

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert -D|--irreversible-delete
Nguyễn Thái Ngọc Duy [Thu, 21 Feb 2019 11:16:15 +0000 (18:16 +0700)] 
diff-parseopt: convert -D|--irreversible-delete

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert -M|--find-renames
Nguyễn Thái Ngọc Duy [Thu, 21 Feb 2019 11:16:14 +0000 (18:16 +0700)] 
diff-parseopt: convert -M|--find-renames

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert -B|--break-rewrites
Nguyễn Thái Ngọc Duy [Thu, 21 Feb 2019 11:16:13 +0000 (18:16 +0700)] 
diff-parseopt: convert -B|--break-rewrites

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --output-*
Nguyễn Thái Ngọc Duy [Thu, 21 Feb 2019 11:16:12 +0000 (18:16 +0700)] 
diff-parseopt: convert --output-*

This also validates that the user specifies a single character in
--output-indicator-*, not a string.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --[no-]compact-summary
Nguyễn Thái Ngọc Duy [Thu, 21 Feb 2019 11:16:11 +0000 (18:16 +0700)] 
diff-parseopt: convert --[no-]compact-summary

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --stat*
Nguyễn Thái Ngọc Duy [Thu, 21 Feb 2019 11:16:10 +0000 (18:16 +0700)] 
diff-parseopt: convert --stat*

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert -s|--no-patch
Nguyễn Thái Ngọc Duy [Thu, 21 Feb 2019 11:16:09 +0000 (18:16 +0700)] 
diff-parseopt: convert -s|--no-patch

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --name-status
Nguyễn Thái Ngọc Duy [Thu, 21 Feb 2019 11:16:08 +0000 (18:16 +0700)] 
diff-parseopt: convert --name-status

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --name-only
Nguyễn Thái Ngọc Duy [Thu, 21 Feb 2019 11:16:07 +0000 (18:16 +0700)] 
diff-parseopt: convert --name-only

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --patch-with-stat
Nguyễn Thái Ngọc Duy [Thu, 21 Feb 2019 11:16:06 +0000 (18:16 +0700)] 
diff-parseopt: convert --patch-with-stat

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --summary
Nguyễn Thái Ngọc Duy [Thu, 21 Feb 2019 11:16:05 +0000 (18:16 +0700)] 
diff-parseopt: convert --summary

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --check
Nguyễn Thái Ngọc Duy [Thu, 21 Feb 2019 11:16:04 +0000 (18:16 +0700)] 
diff-parseopt: convert --check

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --dirstat and friends
Nguyễn Thái Ngọc Duy [Thu, 21 Feb 2019 11:16:03 +0000 (18:16 +0700)] 
diff-parseopt: convert --dirstat and friends

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --numstat and --shortstat
Nguyễn Thái Ngọc Duy [Sat, 16 Feb 2019 11:36:36 +0000 (18:36 +0700)] 
diff-parseopt: convert --numstat and --shortstat

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-parseopt: convert --patch-with-raw
Nguyễn Thái Ngọc Duy [Sat, 16 Feb 2019 11:36:35 +0000 (18:36 +0700)] 
diff-parseopt: convert --patch-with-raw

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff.c: convert --raw
Nguyễn Thái Ngọc Duy [Sun, 27 Jan 2019 00:35:35 +0000 (07:35 +0700)] 
diff.c: convert --raw

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff.c: convert -W|--[no-]function-context
Nguyễn Thái Ngọc Duy [Sun, 27 Jan 2019 00:35:34 +0000 (07:35 +0700)] 
diff.c: convert -W|--[no-]function-context

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff.c: convert -U|--unified
Nguyễn Thái Ngọc Duy [Sun, 27 Jan 2019 00:35:33 +0000 (07:35 +0700)] 
diff.c: convert -U|--unified

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff.c: convert -u|-p|--patch
Nguyễn Thái Ngọc Duy [Sun, 27 Jan 2019 00:35:32 +0000 (07:35 +0700)] 
diff.c: convert -u|-p|--patch

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff.c: prepare to use parse_options() for parsing
Nguyễn Thái Ngọc Duy [Sun, 27 Jan 2019 00:35:31 +0000 (07:35 +0700)] 
diff.c: prepare to use parse_options() for parsing

This is a preparation step to start using parse_options() to parse
diff/revision options instead of what we have now. There are a couple
of good things from using parse_options():

- better help usage
- easier to add new options
- better completion support
- help usage generation
- better integration with main command option parser. We can just
  concat the main command's option array and diffopt's together and
  parse all in one go.
- detect colidding options (e.g. --reverse is used by revision code,
  so diff code can't use it as long name for -R)
- consistent syntax, e.g. option that takes mandatory argument will
  now accept both "--option=value" and "--option value".

The plan is migrate all diff/rev options to parse_options(). Then we
could get rid of diff_opt_parse() and expose parseopts[] directly to
the caller.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff.h: avoid bit fields in struct diff_flags
Nguyễn Thái Ngọc Duy [Sun, 27 Jan 2019 00:35:30 +0000 (07:35 +0700)] 
diff.h: avoid bit fields in struct diff_flags

Bitfield addresses cannot be passed around in a pointer. This makes it
hard to use parse-options to set/unset them. Turn this struct to
normal integers. This of course increases the size of this struct
multiple times, but since we only have a handful of diff_options
variables around, memory consumption is not at all a concern.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff.h: keep forward struct declarations sorted
Nguyễn Thái Ngọc Duy [Sun, 27 Jan 2019 00:35:29 +0000 (07:35 +0700)] 
diff.h: keep forward struct declarations sorted

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoparse-options: allow ll_callback with OPTION_CALLBACK
Nguyễn Thái Ngọc Duy [Sun, 27 Jan 2019 00:35:28 +0000 (07:35 +0700)] 
parse-options: allow ll_callback with OPTION_CALLBACK

OPTION_CALLBACK is much simpler/safer to use, but parse_opt_cb does
not allow access to parse_opt_ctx_t, which sometimes is useful
(e.g. to obtain the prefix).

Extending parse_opt_cb to take parse_opt_cb could result in a lot of
changes. Instead let's just allow ll_callback to be used with
OPTION_CALLBACK. The user will have to be careful, not to change
anything in ctx, or return wrong result code. But that's the price for
ll_callback.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoparse-options: avoid magic return codes
Nguyễn Thái Ngọc Duy [Sun, 27 Jan 2019 00:35:27 +0000 (07:35 +0700)] 
parse-options: avoid magic return codes

Give names to these magic negative numbers. Make parse_opt_ll_cb
return an enum to make clear it can actually control parse_options()
with different return values (parse_opt_cb can too, but nobody needs
it).

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoparse-options: stop abusing 'callback' for lowlevel callbacks
Nguyễn Thái Ngọc Duy [Sun, 27 Jan 2019 00:35:26 +0000 (07:35 +0700)] 
parse-options: stop abusing 'callback' for lowlevel callbacks

Lowlevel callbacks have different function signatures. Add a new field
in 'struct option' with the right type for lowlevel callbacks.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoparse-options: add OPT_BITOP()
Nguyễn Thái Ngọc Duy [Sun, 27 Jan 2019 00:35:25 +0000 (07:35 +0700)] 
parse-options: add OPT_BITOP()

This is needed for diff_opt_parse() where we do

   value = (value & ~mask) | some_more;

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoparse-options: disable option abbreviation with PARSE_OPT_KEEP_UNKNOWN
Nguyễn Thái Ngọc Duy [Sun, 27 Jan 2019 00:35:24 +0000 (07:35 +0700)] 
parse-options: disable option abbreviation with PARSE_OPT_KEEP_UNKNOWN

parse-options can unambiguously find an abbreviation only if it sees
all available options. This is usually the case when you use
parse_options(). But there are other callers like blame or shortlog
which uses parse_options_start() in combination with a custom option
parser, like rev-list. parse-options cannot see all options in this
case and will get abbrev detection wrong. Disable it.

t7800 needs update because --symlink no longer expands to --symlinks
and will be passed down to git-diff, which will not recognize it. I
still think this is the correct thing to do. But if --symlink has been
actually used in the wild, we would just add an option alias for it.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoparse-options: add one-shot mode
Nguyễn Thái Ngọc Duy [Sun, 27 Jan 2019 00:35:23 +0000 (07:35 +0700)] 
parse-options: add one-shot mode

This is to help reimplement diff_opt_parse() using parse_options().
The behavior of parse_options() is changed to be the same as the
other:

- no argv0 in argv[], everything can be processed
- argv[] must not be updated, it's the caller's job to do that
- return the number of arguments processed
- leave all unknown options / non-options alone (this one can already
  be achieved with PARSE_OPT_KEEP_UNKNOWN and
  PARSE_OPT_STOP_AT_NON_OPTION)

This mode is NOT supposed to stay here for long. It's to help
converting diff/rev option parsing. Once that work is over and we can
just use parse_options() throughout the code base, this will be
deleted.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoparse-options.h: remove extern on function prototypes
Nguyễn Thái Ngọc Duy [Thu, 17 Jan 2019 13:05:00 +0000 (20:05 +0700)] 
parse-options.h: remove extern on function prototypes

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoThird batch after 2.20
Junio C Hamano [Fri, 18 Jan 2019 21:56:54 +0000 (13:56 -0800)] 
Third batch after 2.20

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'js/gc-repack-close-before-remove'
Junio C Hamano [Fri, 18 Jan 2019 21:49:57 +0000 (13:49 -0800)] 
Merge branch 'js/gc-repack-close-before-remove'

"git gc" and "git repack" did not close the open packfiles that
they found unneeded before removing them, which didn't work on a
platform incapable of removing an open file.  This has been
corrected.

* js/gc-repack-close-before-remove:
  gc/repack: release packs when needed

5 years agoMerge branch 'en/show-ref-doc-fix'
Junio C Hamano [Fri, 18 Jan 2019 21:49:56 +0000 (13:49 -0800)] 
Merge branch 'en/show-ref-doc-fix'

Doc update.

* en/show-ref-doc-fix:
  git-show-ref.txt: fix order of flags

5 years agoMerge branch 'ot/ref-filter-object-info'
Junio C Hamano [Fri, 18 Jan 2019 21:49:56 +0000 (13:49 -0800)] 
Merge branch 'ot/ref-filter-object-info'

The "--format=<placeholder>" option of for-each-ref, branch and tag
learned to show a few more traits of objects that can be learned by
the object_info API.

* ot/ref-filter-object-info:
  ref-filter: give uintmax_t to format with %PRIuMAX
  ref-filter: add docs for new options
  ref-filter: add tests for deltabase
  ref-filter: add deltabase option
  ref-filter: add tests for objectsize:disk
  ref-filter: add check for negative file size
  ref-filter: add objectsize:disk option

5 years agoMerge branch 'sg/stress-test'
Junio C Hamano [Fri, 18 Jan 2019 21:49:56 +0000 (13:49 -0800)] 
Merge branch 'sg/stress-test'

Flaky tests can now be repeatedly run under load with the
"--stress" option.

* sg/stress-test:
  test-lib: add the '--stress' option to run a test repeatedly under load
  test-lib-functions: introduce the 'test_set_port' helper function
  test-lib: set $TRASH_DIRECTORY earlier
  test-lib: consolidate naming of test-results paths
  test-lib: parse command line options earlier
  test-lib: parse options in a for loop to keep $@ intact
  test-lib: extract Bash version check for '-x' tracing
  test-lib: translate SIGTERM and SIGHUP to an exit

5 years agoMerge branch 'rs/sha1-file-close-mapped-file-on-error'
Junio C Hamano [Fri, 18 Jan 2019 21:49:56 +0000 (13:49 -0800)] 
Merge branch 'rs/sha1-file-close-mapped-file-on-error'

Code clean-up.

* rs/sha1-file-close-mapped-file-on-error:
  sha1-file: close fd of empty file in map_sha1_file_1()

5 years agoMerge branch 'rs/loose-object-cache-perffix'
Junio C Hamano [Fri, 18 Jan 2019 21:49:56 +0000 (13:49 -0800)] 
Merge branch 'rs/loose-object-cache-perffix'

The loose object cache used to optimize existence look-up has been
updated.

* rs/loose-object-cache-perffix:
  object-store: retire odb_load_loose_cache()
  object-store: use one oid_array per subdirectory for loose cache
  object-store: factor out odb_clear_loose_cache()
  object-store: factor out odb_loose_cache()

5 years agoMerge branch 'po/git-p4-wo-login'
Junio C Hamano [Fri, 18 Jan 2019 21:49:55 +0000 (13:49 -0800)] 
Merge branch 'po/git-p4-wo-login'

"git p4" update.

* po/git-p4-wo-login:
  git-p4: fix problem when p4 login is not necessary

5 years agoMerge branch 'mm/multimail-1.5'
Junio C Hamano [Fri, 18 Jan 2019 21:49:55 +0000 (13:49 -0800)] 
Merge branch 'mm/multimail-1.5'

Update "git multimail" from the upstream.

* mm/multimail-1.5:
  git-multimail: update to release 1.5.0

5 years agoMerge branch 'tg/t5570-drop-racy-test'
Junio C Hamano [Fri, 18 Jan 2019 21:49:55 +0000 (13:49 -0800)] 
Merge branch 'tg/t5570-drop-racy-test'

An inherently racy test that caused intermittent failures has been
removed.

* tg/t5570-drop-racy-test:
  Revert "t/lib-git-daemon: record daemon log"
  t5570: drop racy test

5 years agoMerge branch 'jk/dev-build-format-security'
Junio C Hamano [Fri, 18 Jan 2019 21:49:55 +0000 (13:49 -0800)] 
Merge branch 'jk/dev-build-format-security'

Earlier we added "-Wformat-security" to developer builds, assuming
that "-Wall" (which includes "-Wformat" which in turn is required
to use "-Wformat-security") is always in effect.  This is not true
when config.mak.autogen is in use, unfortunately.  This has been
fixed by unconditionally adding "-Wall" to developer builds.

* jk/dev-build-format-security:
  config.mak.dev: add -Wall, primarily for -Wformat, to help autoconf users

5 years agoMerge branch 'so/cherry-pick-always-allow-m1'
Junio C Hamano [Fri, 18 Jan 2019 21:49:54 +0000 (13:49 -0800)] 
Merge branch 'so/cherry-pick-always-allow-m1'

"git cherry-pick -m1" was forbidden when picking a non-merge
commit, even though there _is_ parent number 1 for such a commit.
This was done to avoid mistakes back when "cherry-pick" was about
picking a single commit, but is no longer useful with "cherry-pick"
that can pick a range of commits.  Now the "-m$num" option is
allowed when picking any commit, as long as $num names an existing
parent of the commit.

Technically this is a backward incompatible change; hopefully
nobody is relying on the error-checking behaviour.

* so/cherry-pick-always-allow-m1:
  t3506: validate '-m 1 -ff' is now accepted for non-merge commits
  t3502: validate '-m 1' argument is now accepted for non-merge commits
  cherry-pick: do not error on non-merge commits when '-m 1' is specified
  t3510: stop using '-m 1' to force failure mid-sequence of cherry-picks

5 years agoMerge branch 'nd/worktree-remove-with-uninitialized-submodules'
Junio C Hamano [Fri, 18 Jan 2019 21:49:54 +0000 (13:49 -0800)] 
Merge branch 'nd/worktree-remove-with-uninitialized-submodules'

"git worktree remove" and "git worktree move" refused to work when
there is a submodule involved.  This has been loosened to ignore
uninitialized submodules.

* nd/worktree-remove-with-uninitialized-submodules:
  worktree: allow to (re)move worktrees with uninitialized submodules

5 years agoMerge branch 'sg/test-bash-version-fix'
Junio C Hamano [Fri, 18 Jan 2019 21:49:54 +0000 (13:49 -0800)] 
Merge branch 'sg/test-bash-version-fix'

The test suite tried to see if it is run under bash, but the check
itself failed under some other implementations of shell (notably
under NetBSD).  This has been corrected.

* sg/test-bash-version-fix:
  test-lib: check Bash version for '-x' without using shell arrays

5 years agoMerge branch 'rb/hpe'
Junio C Hamano [Fri, 18 Jan 2019 21:49:54 +0000 (13:49 -0800)] 
Merge branch 'rb/hpe'

Portability updates for the HPE NonStop platform.

* rb/hpe:
  compat/regex/regcomp.c: define intptr_t and uintptr_t on NonStop
  git-compat-util.h: add FLOSS headers for HPE NonStop
  config.mak.uname: support for modern HPE NonStop config.
  transport-helper: drop read/write errno checks
  transport-helper: use xread instead of read

5 years agoMerge branch 'ed/simplify-setup-git-dir'
Junio C Hamano [Fri, 18 Jan 2019 21:49:54 +0000 (13:49 -0800)] 
Merge branch 'ed/simplify-setup-git-dir'

Code simplification.

* ed/simplify-setup-git-dir:
  Simplify handling of setup_git_directory_gently() failure cases.

5 years agoMerge branch 'cy/zsh-completion-SP-in-path'
Junio C Hamano [Fri, 18 Jan 2019 21:49:54 +0000 (13:49 -0800)] 
Merge branch 'cy/zsh-completion-SP-in-path'

With zsh, "git cmd path<TAB>" was completed to "git cmd path name"
when the completed path has a special character like SP in it,
without any attempt to keep "path name" a single filename.  This
has been fixed to complete it to "git cmd path\ name" just like
Bash completion does.

* cy/zsh-completion-SP-in-path:
  completion: treat results of git ls-tree as file paths
  zsh: complete unquoted paths with spaces correctly

5 years agoMerge branch 'cy/completion-typofix'
Junio C Hamano [Fri, 18 Jan 2019 21:49:53 +0000 (13:49 -0800)] 
Merge branch 'cy/completion-typofix'

Typofix.

* cy/completion-typofix:
  completion: fix typo in git-completion.bash

5 years agoMerge branch 'ew/ban-strncat'
Junio C Hamano [Fri, 18 Jan 2019 21:49:53 +0000 (13:49 -0800)] 
Merge branch 'ew/ban-strncat'

The "strncat()" function is now among the banned functions.

* ew/ban-strncat:
  banned.h: mark strncat() as banned

5 years agoMerge branch 'ds/commit-graph-assert-missing-parents'
Junio C Hamano [Fri, 18 Jan 2019 21:49:53 +0000 (13:49 -0800)] 
Merge branch 'ds/commit-graph-assert-missing-parents'

Tightening error checking in commit-graph writer.

* ds/commit-graph-assert-missing-parents:
  commit-graph: writing missing parents is a BUG

5 years agoMerge branch 'es/doc-worktree-guessremote-config'
Junio C Hamano [Fri, 18 Jan 2019 21:49:53 +0000 (13:49 -0800)] 
Merge branch 'es/doc-worktree-guessremote-config'

Doc clarification.

* es/doc-worktree-guessremote-config:
  doc/config: do a better job of introducing 'worktree.guessRemote'

5 years agoMerge branch 'sb/submodule-unset-core-worktree-when-worktree-is-lost'
Junio C Hamano [Fri, 18 Jan 2019 21:49:53 +0000 (13:49 -0800)] 
Merge branch 'sb/submodule-unset-core-worktree-when-worktree-is-lost'

The core.worktree setting in a submodule repository should not be
pointing at a directory when the submodule loses its working tree
(e.g. getting deinit'ed), but the code did not properly maintain
this invariant.

* sb/submodule-unset-core-worktree-when-worktree-is-lost:
  submodule deinit: unset core.worktree
  submodule--helper: fix BUG message in ensure_core_worktree
  submodule: unset core.worktree if no working tree is present
  submodule update: add regression test with old style setups

5 years agoMerge branch 'ma/asciidoctor'
Junio C Hamano [Fri, 18 Jan 2019 21:49:53 +0000 (13:49 -0800)] 
Merge branch 'ma/asciidoctor'

Some of the documentation pages formatted incorrectly with
Asciidoctor, which have been fixed.

* ma/asciidoctor:
  git-status.txt: render tables correctly under Asciidoctor
  Documentation: do not nest open blocks
  git-column.txt: fix section header

5 years agoMerge branch 'jn/stripspace-wo-repository'
Junio C Hamano [Fri, 18 Jan 2019 21:49:53 +0000 (13:49 -0800)] 
Merge branch 'jn/stripspace-wo-repository'

"git stripspace" should be usable outside a git repository, but
under the "-s" or "-c" mode, it didn't.

* jn/stripspace-wo-repository:
  stripspace: allow -s/-c outside git repository

5 years agoMerge branch 'sb/submodule-fetchjobs-default-to-one'
Junio C Hamano [Fri, 18 Jan 2019 21:49:52 +0000 (13:49 -0800)] 
Merge branch 'sb/submodule-fetchjobs-default-to-one'

"git submodule update" ought to use a single job unless asked, but
by mistake used multiple jobs, which has been fixed.

* sb/submodule-fetchjobs-default-to-one:
  submodule update: run at most one fetch job unless otherwise set

5 years agoMerge branch 'la/quiltimport-keep-non-patch'
Junio C Hamano [Fri, 18 Jan 2019 21:49:52 +0000 (13:49 -0800)] 
Merge branch 'la/quiltimport-keep-non-patch'

"git quiltimport" learned "--keep-non-patch" option.

* la/quiltimport-keep-non-patch:
  git-quiltimport: add --keep-non-patch option

5 years agoMerge branch 'nd/style-opening-brace'
Junio C Hamano [Fri, 18 Jan 2019 21:49:52 +0000 (13:49 -0800)] 
Merge branch 'nd/style-opening-brace'

Code clean-up.

* nd/style-opening-brace:
  style: the opening '{' of a function is in a separate line

5 years agoMerge branch 'ds/gc-doc-typofix'
Junio C Hamano [Fri, 18 Jan 2019 21:49:52 +0000 (13:49 -0800)] 
Merge branch 'ds/gc-doc-typofix'

Typofix.

* ds/gc-doc-typofix:
  git-gc.txt: fix typo about gc.writeCommitGraph

5 years agoSecond batch after 2.20
Junio C Hamano [Mon, 14 Jan 2019 23:33:36 +0000 (15:33 -0800)] 
Second batch after 2.20

Signed-off-by: Junio C Hamano <gitster@pobox.com>