Nguyễn Thái Ngọc Duy [Thu, 7 Mar 2019 12:29:17 +0000 (19:29 +0700)]
Make sure refs/rewritten/ is per-worktree
a9be29c981 (sequencer: make refs generated by the `label` command
worktree-local, 2018-04-25) adds refs/rewritten/ as per-worktree
reference space. Unfortunately (my bad) there are a couple places that
need update to make sure it's really per-worktree.
- add_per_worktree_entries_to_dir() is updated to make sure ref listing
look at per-worktree refs/rewritten/ instead of per-repo one [1]
- common_list[] is updated so that git_path() returns the correct
location. This includes "rev-parse --git-path".
This mess is created by me. I started trying to fix it with the
introduction of refs/worktree, where all refs will be per-worktree
without special treatments. Unfortunate refs/rewritten came before
refs/worktree so this is all we can do.
This also fixes logs/refs/worktree not being per-worktree.
[1] note that ref listing still works sometimes. For example, if you
have .git/worktrees/foo/refs/rewritten/bar AND the directory
.git/worktrees/refs/rewritten, refs/rewritten/bar will show up.
add_per_worktree_entries_to_dir() is only needed when the directory
.git/worktrees/refs/rewritten is missing.
Reported-by: Phillip Wood <redacted>
Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
Signed-off-by: Junio C Hamano <redacted>
Nguyễn Thái Ngọc Duy [Thu, 7 Mar 2019 12:29:16 +0000 (19:29 +0700)]
files-backend.c: reduce duplication in add_per_worktree_entries_to_dir()
This function is duplicated to handle refs/bisect/ and refs/worktree/
and a third prefix is coming. Time to clean up.
This also fixes incorrect "refs/worktrees/" length in this code. The
correct length is 14 not 11. The test in the next patch will also cover
this.
Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
Signed-off-by: Junio C Hamano <redacted>
Nguyễn Thái Ngọc Duy [Thu, 7 Mar 2019 12:29:15 +0000 (19:29 +0700)]
files-backend.c: factor out per-worktree code in loose_fill_ref_dir()
This is the first step for further cleaning up and extending this
function.
Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
Signed-off-by: Junio C Hamano <redacted>
Johannes Schindelin [Mon, 25 Feb 2019 19:27:11 +0000 (11:27 -0800)]
mingw: drop MakeMaker reference
In
20d2a30f8ffe (Makefile: replace perl/Makefile.PL with simple make
rules, 2017-12-10), Git stopped using MakeMaker. Therefore, that
definition in the MINGW-specific section became useless.
Signed-off-by: Johannes Schindelin <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Johannes Schindelin [Thu, 7 Mar 2019 15:29:33 +0000 (07:29 -0800)]
built-in stash: handle :(glob) pathspecs again
When passing a list of pathspecs to, say, `git add`, we need to be
careful to use the original form, not the parsed form of the pathspecs.
This makes a difference e.g. when calling
git stash -- ':(glob)**/*.txt'
where the original form includes the `:(glob)` prefix while the parsed
form does not.
However, in the built-in `git stash`, we passed the parsed (i.e.
incorrect) form, and `git add` would fail with the error message:
fatal: pathspec '**/*.txt' did not match any files
at the stage where `git stash` drops the changes from the worktree, even
if `refs/stash` has been actually updated successfully.
This fixes https://github.com/git-for-windows/git/issues/2037
Signed-off-by: Johannes Schindelin <redacted>
Signed-off-by: Junio C Hamano <redacted>
Johannes Schindelin [Thu, 7 Mar 2019 15:29:32 +0000 (07:29 -0800)]
legacy stash: fix "rudimentary backport of -q"
When this developer backported support for `--quiet` to the scripted
version of `git stash` in
80590055ea (stash: optionally use the scripted
version again, 2018-12-20), it looked like a sane choice to use `eval`
to execute the command line passed in via the parameter list of
`maybe_quiet`.
However, that is not what we should have done, as that command-line was
already in the correct shape.
This can be seen very clearly when passing arguments with special
characters, like
git stash -- ':(glob)**/*.txt'
Since this is exactly what we want to test in the next commit (where we
fix this very incantation with the built-in stash), let's fix the legacy
scripted version of `git stash` first.
Signed-off-by: Johannes Schindelin <redacted>
Signed-off-by: Junio C Hamano <redacted>
Brandon Richardson [Thu, 7 Mar 2019 15:44:09 +0000 (11:44 -0400)]
commit-tree: utilize parse-options api
Rather than parse options manually, which is both difficult to
read and error prone, parse options supplied to commit-tree
using the parse-options api.
It was discovered that the --no-gpg-sign option was documented
but not implemented in commit
70ddbd7767 (commit-tree: add missing
--gpg-sign flag, 2019-01-19), and the existing implementation
would attempt to translate the option as a tree oid. It was also
suggested earlier in commit
55ca3f99ae (commit-tree: add and document
--no-gpg-sign, 2013-12-13) that commit-tree should be migrated to
utilize the parse-options api, which could help prevent mistakes
like this in the future. Hence this change.
Also update the documentation to better describe that mixing
`-m` and `-F` options will correctly compose commit log messages in the
order in which the options are given.
In the process, mark various strings for translation.
Signed-off-by: Brandon Richardson <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jeff King [Thu, 7 Mar 2019 19:45:15 +0000 (14:45 -0500)]
line-log: suppress diff output with "-s"
When "-L" is in use, we ignore any diff output format that the user
provides to us, and just always print a patch (with extra context lines
covering the whole area of interest). It's not entirely clear what we
should do with all formats (e.g., should "--stat" show just the diffstat
of the touched lines, or the stat for the whole file?).
But "-s" is pretty clear: the user probably wants to see just the
commits that touched those lines, without any diff at all. Let's at
least make that work.
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Joey Hess [Thu, 7 Mar 2019 19:56:57 +0000 (14:56 -0500)]
convert: avoid malloc of original file size
We write the output of a "clean" filter into a strbuf. Rather than
growing the strbuf dynamically as we read its output, we make the
initial allocation as large as the original input file. This is a good
guess when the filter is just tweaking a few bytes, but it's disastrous
when the point of the filter is to condense a very large file into a
short identifier (e.g., the way git-lfs and git-annex do). We may ask to
allocate many gigabytes, causing the allocation to fail and Git to
die().
Instead, let's just let strbuf do its usual growth.
When the clean filter does output something around the same size as the
worktree file, the buffer will need to be reallocated until it fits,
starting at 8192 and doubling in size. Benchmarking indicates that
reallocation is not a significant overhead for outputs up to a
few MB in size.
Signed-off-by: Joey Hess <redacted>
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Denton Liu [Thu, 7 Mar 2019 08:25:30 +0000 (00:25 -0800)]
docs: move core.excludesFile from git-add to gitignore
A section in "git add" documentation mentions core.excludesFile and
explains how it works, but this is not specific to the command.
Move this description to gitignore.txt to be more generic.
Signed-off-by: Denton Liu <redacted>
Signed-off-by: Junio C Hamano <redacted>
Denton Liu [Thu, 7 Mar 2019 08:25:28 +0000 (00:25 -0800)]
git-clean.txt: clarify ignore pattern files
In the git-clean documentation, -x and -e documented .gitignore,
$GIT_DIR/info/excludes but neglected to mention the file pointed to by
core.excludesFile.
Remove specific list of files and, instead, reference gitignore(5)
documentation so that information is consolidated and the git-clean
documentation is more precise.
Reported-by: Robert P. J. Day <redacted>
Helped-by: Martin Ågren <redacted>
Helped-by: Junio C Hamano <redacted>
Signed-off-by: Denton Liu <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jeff King [Tue, 5 Mar 2019 04:20:51 +0000 (23:20 -0500)]
config: document --type=color output is a complete line
Even though the newer "--type=color" option to "git config" is meant
to be upward compatible with the traditional "--get-color" option,
unlike the latter, its output is not an incomplete line that lack
the LF at the end. That makes it consistent with output of other
types like "git config --type=bool".
Document it, as it sometimes surprises unsuspecting users.
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Thu, 7 Mar 2019 02:59:54 +0000 (11:59 +0900)]
Start 2.22 cycle
Signed-off-by: Junio C Hamano <redacted>
Jonathan Tan [Mon, 25 Feb 2019 21:54:13 +0000 (13:54 -0800)]
t5552: compensate for v2 filtering ref adv.
Protocol v2 filters the ref advertisement, but protocol v0 does not. A
test in t5552 uses the ref advertisement, so fix it to use protocol v0.
Signed-off-by: Jonathan Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Tan [Mon, 25 Feb 2019 21:54:12 +0000 (13:54 -0800)]
tests: fix protocol version for overspecifications
These tests are also marked with a NEEDSWORK comment.
Signed-off-by: Jonathan Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Tan [Mon, 25 Feb 2019 21:54:11 +0000 (13:54 -0800)]
t5700: only run with protocol version 1
Signed-off-by: Jonathan Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Tan [Mon, 25 Feb 2019 21:54:10 +0000 (13:54 -0800)]
t5512: compensate for v0 only sending HEAD symrefs
Protocol v2 supports sending non-HEAD symrefs, but this is not true of
protocol v0. Some tests expect protocol v0 behavior, so fix them to use
protocol v0.
Signed-off-by: Jonathan Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Tan [Mon, 25 Feb 2019 21:54:09 +0000 (13:54 -0800)]
t5503: fix overspecification of trace expectation
In order to extract the wants from a trace, a loop in t5503 currently
breaks if "0000" is found. This works for protocol v0 and v1, but not
v2. Instead, teach t5503 to look specifically for the "want" string,
which is compatible with all protocols.
Signed-off-by: Jonathan Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Tan [Mon, 25 Feb 2019 21:54:08 +0000 (13:54 -0800)]
tests: always test fetch of unreachable with v0
Some tests check that fetching an unreachable object fails, but protocol
v2 allows such fetches. Unset GIT_TEST_PROTOCOL_VERSION so that these
tests are always run using protocol v0.
Signed-off-by: Jonathan Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Tan [Mon, 25 Feb 2019 21:54:07 +0000 (13:54 -0800)]
t5601: check ssh command only with protocol v0
When running the SSH command as part of a fetch, Git will write "SendEnv
GIT_PROTOCOL" as an option if protocol v1 or v2 is used, but not v0.
Update all tests that check this to run Git with
GIT_TEST_PROTOCOL_VERSION=0.
I chose not to do a more thorough fix (for example, checking the value of
GIT_TEST_PROTOCOL_VERSION to see if the SendEnv check needs to be done)
because a set of patches [1] that unifies the handling of SSH options,
including writing "SendEnv GIT_PROTOCOL" regardless of protocol version,
is in progress. When that is done, this patch should be reverted, since
the functionality in here is no longer needed.
As of this patch, all tests pass if GIT_TEST_PROTOCOL_VERSION is set to
1.
[1] https://public-inbox.org/git/cover.
1545342797.git.steadmon@google.com/
Signed-off-by: Jonathan Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Tan [Mon, 25 Feb 2019 21:54:06 +0000 (13:54 -0800)]
tests: define GIT_TEST_PROTOCOL_VERSION
Define a GIT_TEST_PROTOCOL_VERSION environment variable meant to be used
from tests. When set, this ensures protocol.version is at least the
given value, allowing the entire test suite to be run as if this
configuration is in place for all repositories.
As of this patch, all tests pass whether GIT_TEST_PROTOCOL_VERSION is
unset or set to 0. Some tests fail when GIT_TEST_PROTOCOL_VERSION is set
to 1 or 2, but this will be dealt with in subsequent patches.
This is based on work by Ævar Arnfjörð Bjarmason.
Signed-off-by: Jonathan Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Thu, 7 Mar 2019 00:59:59 +0000 (09:59 +0900)]
Merge branch 'jt/http-auth-proto-v2-fix'
Unify RPC code for smart http in protocol v0/v1 and v2, which fixes
a bug in the latter (lack of authentication retry) and generally
improves the code base.
* jt/http-auth-proto-v2-fix:
remote-curl: use post_rpc() for protocol v2 also
remote-curl: refactor reading into rpc_state's buf
remote-curl: reduce scope of rpc_state.result
remote-curl: reduce scope of rpc_state.stdin_preamble
remote-curl: reduce scope of rpc_state.argv
Junio C Hamano [Thu, 7 Mar 2019 00:59:59 +0000 (09:59 +0900)]
Merge branch 'jk/diff-no-index-initialize'
"git diff --no-index" may still want to access Git goodies like
--ext-diff and --textconv, but so far these have been ignored,
which has been corrected.
* jk/diff-no-index-initialize:
diff: reuse diff setup for --no-index case
Junio C Hamano [Thu, 7 Mar 2019 00:59:59 +0000 (09:59 +0900)]
Merge branch 'nd/no-more-check-racy'
Unused code removal.
* nd/no-more-check-racy:
Delete check-racy.c
Junio C Hamano [Thu, 7 Mar 2019 00:59:59 +0000 (09:59 +0900)]
Merge branch 'rd/doc-hook-used-in-sample'
Doc update.
* rd/doc-hook-used-in-sample:
mention use of "hooks.allownonascii" in "man githooks"
Junio C Hamano [Thu, 7 Mar 2019 00:59:58 +0000 (09:59 +0900)]
Merge branch 'nd/diff-parseopt-2'
Second batch to teach the diff machinery to use the parse-options
API.
* nd/diff-parseopt-2: (21 commits)
diff-parseopt: convert --ignore-some-changes
diff-parseopt: convert --[no-]minimal
diff-parseopt: convert --relative
diff-parseopt: convert --no-renames|--[no--rename-empty
diff-parseopt: convert --find-copies-harder
diff-parseopt: convert -C|--find-copies
diff-parseopt: convert -D|--irreversible-delete
diff-parseopt: convert -M|--find-renames
diff-parseopt: convert -B|--break-rewrites
diff-parseopt: convert --output-*
diff-parseopt: convert --[no-]compact-summary
diff-parseopt: convert --stat*
diff-parseopt: convert -s|--no-patch
diff-parseopt: convert --name-status
diff-parseopt: convert --name-only
diff-parseopt: convert --patch-with-stat
diff-parseopt: convert --summary
diff-parseopt: convert --check
diff-parseopt: convert --dirstat and friends
diff-parseopt: convert --numstat and --shortstat
...
Junio C Hamano [Thu, 7 Mar 2019 00:59:58 +0000 (09:59 +0900)]
Merge branch 'en/merge-options-doc'
Doc update.
* en/merge-options-doc:
merge-options.txt: correct wording of --no-commit option
Junio C Hamano [Thu, 7 Mar 2019 00:59:57 +0000 (09:59 +0900)]
Merge branch 'nd/completion-more-parameters'
The command line completion (in contrib/) has been taught to
complete more subcommand parameters.
* nd/completion-more-parameters:
completion: add more parameter value completion
Junio C Hamano [Thu, 7 Mar 2019 00:59:57 +0000 (09:59 +0900)]
Merge branch 'ab/receive-pack-use-after-free-fix'
Memfix.
* ab/receive-pack-use-after-free-fix:
receive-pack: fix use-after-free bug
Junio C Hamano [Thu, 7 Mar 2019 00:59:57 +0000 (09:59 +0900)]
Merge branch 'dl/doc-submodule-wo-subcommand'
Doc update.
* dl/doc-submodule-wo-subcommand:
submodule: document default behavior
Junio C Hamano [Thu, 7 Mar 2019 00:59:56 +0000 (09:59 +0900)]
Merge branch 'jk/unused-params'
Code clean-up.
* jk/unused-params:
ref-filter: drop unused "sz" parameters
ref-filter: drop unused "obj" parameters
ref-filter: drop unused buf/sz pairs
files-backend: drop refs parameter from split_symref_update()
pack-objects: drop unused parameter from oe_map_new_pack()
merge-recursive: drop several unused parameters
diff: drop complete_rewrite parameter from run_external_diff()
diff: drop unused emit data parameter from sane_truncate_line()
diff: drop unused color reset parameters
diff: drop options parameter from diffcore_fix_diff_index()
Junio C Hamano [Thu, 7 Mar 2019 00:59:56 +0000 (09:59 +0900)]
Merge branch 'jh/trace2'
A more structured way to obtain execution trace has been added.
* jh/trace2:
trace2: add for_each macros to clang-format
trace2: t/helper/test-trace2, t0210.sh, t0211.sh, t0212.sh
trace2:data: add subverb for rebase
trace2:data: add subverb to reset command
trace2:data: add subverb to checkout command
trace2:data: pack-objects: add trace2 regions
trace2:data: add trace2 instrumentation to index read/write
trace2:data: add trace2 hook classification
trace2:data: add trace2 transport child classification
trace2:data: add trace2 sub-process classification
trace2:data: add editor/pager child classification
trace2:data: add trace2 regions to wt-status
trace2: collect Windows-specific process information
trace2: create new combined trace facility
trace2: Documentation/technical/api-trace2.txt
Junio C Hamano [Thu, 7 Mar 2019 00:59:56 +0000 (09:59 +0900)]
Merge branch 'jk/prune-optim'
"git prune" has been taught to take advantage of reachability
bitmap when able.
* jk/prune-optim:
t5304: rename "sha1" variables to "oid"
prune: check SEEN flag for reachability
prune: use bitmaps for reachability traversal
prune: lazily perform reachability traversal
Junio C Hamano [Thu, 7 Mar 2019 00:59:56 +0000 (09:59 +0900)]
Merge branch 'js/doc-symref-in-proto-v1'
Doc update.
* js/doc-symref-in-proto-v1:
protocol-capabilities.txt: document symref
Junio C Hamano [Thu, 7 Mar 2019 00:59:56 +0000 (09:59 +0900)]
Merge branch 'nd/split-index-null-base-fix'
Split-index fix.
* nd/split-index-null-base-fix:
read-cache.c: fix writing "link" index ext with null base oid
Junio C Hamano [Thu, 7 Mar 2019 00:59:55 +0000 (09:59 +0900)]
Merge branch 'rj/prune-packed-excess-args'
"git prune-packed" did not notice and complain against excess
arguments given from the command line, which now it does.
* rj/prune-packed-excess-args:
prune-packed: check for too many arguments
Junio C Hamano [Thu, 7 Mar 2019 00:59:54 +0000 (09:59 +0900)]
Merge branch 'jc/test-yes-doc'
Test doc update.
* jc/test-yes-doc:
test: caution on our version of 'yes'
Junio C Hamano [Thu, 7 Mar 2019 00:59:54 +0000 (09:59 +0900)]
Merge branch 'en/combined-all-paths'
Output from "diff --cc" did not show the original paths when the
merge involved renames. A new option adds the paths in the
original trees to the output.
* en/combined-all-paths:
log,diff-tree: add --combined-all-paths option
Junio C Hamano [Thu, 7 Mar 2019 00:59:54 +0000 (09:59 +0900)]
Merge branch 'sc/pack-redundant'
Update the implementation of pack-redundant for performance in a
repository with many packfiles.
* sc/pack-redundant:
pack-redundant: consistent sort method
pack-redundant: rename pack_list.all_objects
pack-redundant: new algorithm to find min packs
pack-redundant: delete redundant code
pack-redundant: delay creation of unique_objects
t5323: test cases for git-pack-redundant
Junio C Hamano [Thu, 7 Mar 2019 00:59:53 +0000 (09:59 +0900)]
Merge branch 'du/branch-show-current'
"git branch" learned a new subcommand "--show-current".
* du/branch-show-current:
branch: introduce --show-current display option
Junio C Hamano [Thu, 7 Mar 2019 00:59:53 +0000 (09:59 +0900)]
Merge branch 'dl/complete-submodule-absorbgitdirs'
Command-line completion (in contrib/) learned to tab-complete the
"git submodule absorbgitdirs" subcommand.
* dl/complete-submodule-absorbgitdirs:
completion: complete git submodule absorbgitdirs
Junio C Hamano [Thu, 7 Mar 2019 00:59:53 +0000 (09:59 +0900)]
Merge branch 'wh/author-committer-ident-config'
Four new configuration variables {author,committer}.{name,email}
have been introduced to override user.{name,email} in more specific
cases.
* wh/author-committer-ident-config:
config: allow giving separate author and committer idents
Junio C Hamano [Thu, 7 Mar 2019 00:59:52 +0000 (09:59 +0900)]
Merge branch 'aw/pretty-trailers'
The %(trailers) formatter in "git log --format=..." now allows to
optionally pick trailers selectively by keyword, show only values,
etc.
* aw/pretty-trailers:
pretty: add support for separator option in %(trailers)
strbuf: separate callback for strbuf_expand:ing literals
pretty: add support for "valueonly" option in %(trailers)
pretty: allow showing specific trailers
pretty: single return path in %(trailers) handling
pretty: allow %(trailers) options with explicit value
doc: group pretty-format.txt placeholders descriptions
Junio C Hamano [Thu, 7 Mar 2019 00:59:52 +0000 (09:59 +0900)]
Merge branch 'nd/diff-parseopt'
The diff machinery, one of the oldest parts of the system, which
long predates the parse-options API, uses fairly long and complex
handcrafted option parser. This is being rewritten to use the
parse-options API.
* nd/diff-parseopt:
diff.c: convert --raw
diff.c: convert -W|--[no-]function-context
diff.c: convert -U|--unified
diff.c: convert -u|-p|--patch
diff.c: prepare to use parse_options() for parsing
diff.h: avoid bit fields in struct diff_flags
diff.h: keep forward struct declarations sorted
parse-options: allow ll_callback with OPTION_CALLBACK
parse-options: avoid magic return codes
parse-options: stop abusing 'callback' for lowlevel callbacks
parse-options: add OPT_BITOP()
parse-options: disable option abbreviation with PARSE_OPT_KEEP_UNKNOWN
parse-options: add one-shot mode
parse-options.h: remove extern on function prototypes
Junio C Hamano [Thu, 7 Mar 2019 00:59:51 +0000 (09:59 +0900)]
Merge branch 'tg/checkout-no-overlay'
"git checkout --no-overlay" can be used to trigger a new mode of
checking out paths out of the tree-ish, that allows paths that
match the pathspec that are in the current index and working tree
and are not in the tree-ish.
* tg/checkout-no-overlay:
revert "checkout: introduce checkout.overlayMode config"
checkout: introduce checkout.overlayMode config
checkout: introduce --{,no-}overlay option
checkout: factor out mark_cache_entry_for_checkout function
checkout: clarify comment
read-cache: add invalidate parameter to remove_marked_cache_entries
entry: support CE_WT_REMOVE flag in checkout_entry
entry: factor out unlink_entry function
move worktree tests to t24*
Johannes Schindelin [Mon, 25 Feb 2019 23:16:31 +0000 (23:16 +0000)]
tests: add a special setup where stash.useBuiltin is off
Add a GIT_TEST_STASH_USE_BUILTIN=false test mode which is equivalent
to running with stash.useBuiltin=false. This is needed to spot that
we're not introducing any regressions in the legacy stash version
while we're carrying both it and the new built-in version.
This imitates the equivalent treatment for the built-in rebase in
62c23938fae5 (tests: add a special setup where rebase.useBuiltin is off,
2018-11-14).
Signed-off-by: Johannes Schindelin <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Johannes Schindelin [Mon, 25 Feb 2019 23:16:30 +0000 (23:16 +0000)]
stash: optionally use the scripted version again
We recently converted the `git stash` command from Unix shell scripts
to builtins.
Let's end users a way out when they discover a bug in the
builtin command: `stash.useBuiltin`.
As the file name `git-stash` is already in use, let's rename the
scripted backend to `git-legacy-stash`.
To make the test suite pass with `stash.useBuiltin=false`, this commit
also backports rudimentary support for `-q` (but only *just* enough
to appease the test suite), and adds a super-ugly hack to force exit
code 129 for `git stash -h`.
Signed-off-by: Johannes Schindelin <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Johannes Schindelin [Mon, 25 Feb 2019 23:16:29 +0000 (23:16 +0000)]
stash: add back the original, scripted `git stash`
This simply copies the version as of sd/stash-wo-user-name verbatim. As
of now, it is not hooked up.
The next commit will change the builtin `stash` to hand off to the
scripted `git stash` when `stash.useBuiltin=false`.
Signed-off-by: Johannes Schindelin <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul-Sebastian Ungureanu [Mon, 25 Feb 2019 23:16:28 +0000 (23:16 +0000)]
stash: convert `stash--helper.c` into `stash.c`
The old shell script `git-stash.sh` was removed and replaced
entirely by `builtin/stash.c`. In order to do that, `create` and
`push` were adapted to work without `stash.sh`. For example, before
this commit, `git stash create` called `git stash--helper create
--message "$*"`. If it called `git stash--helper create "$@"`, then
some of these changes wouldn't have been necessary.
This commit also removes the word `helper` since now stash is
called directly and not by a shell script.
Signed-off-by: Paul-Sebastian Ungureanu <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul-Sebastian Ungureanu [Mon, 25 Feb 2019 23:16:27 +0000 (23:16 +0000)]
stash: replace all `write-tree` child processes with API calls
Avoid spawning write-tree child processes by replacing the calls with
in-core API calls.
Signed-off-by: Paul-Sebastian Ungureanu <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul-Sebastian Ungureanu [Mon, 25 Feb 2019 23:16:26 +0000 (23:16 +0000)]
stash: optimize `get_untracked_files()` and `check_changes()`
This commits introduces a optimization by avoiding calling the
same functions again. For example, `git stash push -u`
would call at some points the following functions:
* `check_changes()` (inside `do_push_stash()`)
* `do_create_stash()`, which calls: `check_changes()` and
`get_untracked_files()`
Note that `check_changes()` also calls `get_untracked_files()`.
So, `check_changes()` is called 2 times and `get_untracked_files()`
3 times.
The old function `check_changes()` now consists of two functions:
`get_untracked_files()` and `check_changes_tracked_files()`.
These are the call chains for `push` and `create`:
* `push_stash()` -> `do_push_stash()` -> `do_create_stash()`
* `create_stash()` -> `do_create_stash()`
To prevent calling the same functions over and over again,
`check_changes()` inside `do_create_stash()` is now placed
in the caller functions (`create_stash()` and `do_push_stash()`).
This way `check_changes()` and `get_untracked files()` are called
only one time.
Signed-off-by: Paul-Sebastian Ungureanu <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul-Sebastian Ungureanu [Mon, 25 Feb 2019 23:16:25 +0000 (23:16 +0000)]
stash: convert save to builtin
Add stash save to the helper and delete functions which are no
longer needed (`show_help()`, `save_stash()`, `push_stash()`,
`create_stash()`, `clear_stash()`, `untracked_files()` and
`no_changes()`).
Signed-off-by: Paul-Sebastian Ungureanu <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul-Sebastian Ungureanu [Mon, 25 Feb 2019 23:16:24 +0000 (23:16 +0000)]
stash: make push -q quiet
There is a change in behaviour with this commit. When there was
no initial commit, the shell version of stash would still display
a message. This commit makes `push` to not display any message if
`--quiet` or `-q` is specified. Add tests for `--quiet`.
Signed-off-by: Paul-Sebastian Ungureanu <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul-Sebastian Ungureanu [Mon, 25 Feb 2019 23:16:23 +0000 (23:16 +0000)]
stash: convert push to builtin
Add stash push to the helper.
Signed-off-by: Paul-Sebastian Ungureanu <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul-Sebastian Ungureanu [Mon, 25 Feb 2019 23:16:22 +0000 (23:16 +0000)]
stash: convert create to builtin
Add stash create to the helper.
Signed-off-by: Paul-Sebastian Ungureanu <redacted>
Helped-by: Matthew Kraai <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul-Sebastian Ungureanu [Mon, 25 Feb 2019 23:16:21 +0000 (23:16 +0000)]
stash: convert store to builtin
Add stash store to the helper and delete the store_stash function
from the shell script.
Signed-off-by: Paul-Sebastian Ungureanu <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul-Sebastian Ungureanu [Mon, 25 Feb 2019 23:16:20 +0000 (23:16 +0000)]
stash: convert show to builtin
Add stash show to the helper and delete the show_stash, have_stash,
assert_stash_like, is_stash_like and parse_flags_and_rev functions
from the shell script now that they are no longer needed.
In shell version, although `git stash show` accepts `--index` and
`--quiet` options, it ignores them. In C, both options are passed
further to `git diff`.
Signed-off-by: Paul-Sebastian Ungureanu <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul-Sebastian Ungureanu [Mon, 25 Feb 2019 23:16:19 +0000 (23:16 +0000)]
stash: convert list to builtin
Add stash list to the helper and delete the list_stash function
from the shell script.
Signed-off-by: Paul-Sebastian Ungureanu <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Joel Teichroeb [Mon, 25 Feb 2019 23:16:18 +0000 (23:16 +0000)]
stash: convert pop to builtin
Add stash pop to the helper and delete the pop_stash, drop_stash,
assert_stash_ref functions from the shell script now that they
are no longer needed.
Signed-off-by: Joel Teichroeb <redacted>
Signed-off-by: Paul-Sebastian Ungureanu <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Joel Teichroeb [Mon, 25 Feb 2019 23:16:17 +0000 (23:16 +0000)]
stash: convert branch to builtin
Add stash branch to the helper and delete the apply_to_branch
function from the shell script.
Checkout does not currently provide a function for checking out
a branch as cmd_checkout does a large amount of sanity checks
first that we require here.
Signed-off-by: Joel Teichroeb <redacted>
Signed-off-by: Paul-Sebastian Ungureanu <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Joel Teichroeb [Mon, 25 Feb 2019 23:16:16 +0000 (23:16 +0000)]
stash: convert drop and clear to builtin
Add the drop and clear commands to the builtin helper. These two
are each simple, but are being added together as they are quite
related.
We have to unfortunately keep the drop and clear functions in the
shell script as functions are called with parameters internally
that are not valid when the commands are called externally. Once
pop is converted they can both be removed.
Signed-off-by: Joel Teichroeb <redacted>
Signed-off-by: Paul-Sebastian Ungureanu <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Joel Teichroeb [Mon, 25 Feb 2019 23:16:15 +0000 (23:16 +0000)]
stash: convert apply to builtin
Add a builtin helper for performing stash commands. Converting
all at once proved hard to review, so starting with just apply
lets conversion get started without the other commands being
finished.
The helper is being implemented as a drop in replacement for
stash so that when it is complete it can simply be renamed and
the shell script deleted.
Delete the contents of the apply_stash shell function and replace
it with a call to stash--helper apply until pop is also
converted.
Signed-off-by: Joel Teichroeb <redacted>
Signed-off-by: Paul-Sebastian Ungureanu <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul-Sebastian Ungureanu [Mon, 25 Feb 2019 23:16:14 +0000 (23:16 +0000)]
stash: mention options in `show` synopsis
Mention in the documentation, that `show` accepts any
option known to `git diff`.
Signed-off-by: Paul-Sebastian Ungureanu <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul-Sebastian Ungureanu [Mon, 25 Feb 2019 23:16:13 +0000 (23:16 +0000)]
stash: add tests for `git stash show` config
This commit introduces tests for `git stash show`
config. It tests all the cases where `stash.showStat`
and `stash.showPatch` are unset or set to true / false.
Signed-off-by: Paul-Sebastian Ungureanu <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul-Sebastian Ungureanu [Mon, 25 Feb 2019 23:16:12 +0000 (23:16 +0000)]
stash: rename test cases to be more descriptive
Rename some test cases' labels to be more descriptive and under 80
characters per line.
Signed-off-by: Paul-Sebastian Ungureanu <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Matthew Kraai [Mon, 25 Feb 2019 23:16:11 +0000 (23:16 +0000)]
t3903: add test for --intent-to-add file
Add a test showing the 'git stash' behaviour with a file that has been
added with 'git add --intent-to-add'. Stash fails to stash the file,
so the purpose of this test is mainly to make sure git doesn't crash,
but exits normally in this situation.
This is in preparation for converting stash into a builtin.
[tg: pulled the test out into a separate commit]
Signed-off-by: Matthew Kraai <redacted>
Signed-off-by: Johannes Schindelin <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul-Sebastian Ungureanu [Mon, 25 Feb 2019 23:16:10 +0000 (23:16 +0000)]
t3903: modernize style
Remove whitespaces after redirection operators and wrap
long lines.
Signed-off-by: Paul-Sebastian Ungureanu <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Joel Teichroeb [Mon, 25 Feb 2019 23:16:09 +0000 (23:16 +0000)]
stash: improve option parsing test coverage
In preparation for converting the stash command incrementally to
a builtin command, this patch improves test coverage of the option
parsing. Both for having too many parameters, or too few.
Signed-off-by: Joel Teichroeb <redacted>
Signed-off-by: Paul-Sebastian Ungureanu <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Thomas Gummerer [Wed, 6 Mar 2019 22:09:11 +0000 (22:09 +0000)]
ident: don't require calling prepare_fallback_ident first
In
fd5a58477c ("ident: add the ability to provide a "fallback
identity"", 2019-02-25) I made it a requirement to call
prepare_fallback_ident as the first function in the ident API.
However in stash we didn't actually end up following that.
This leads to a BUG if user.email and user.name are set. It was not
caught in the test suite because we only rely on environment variables
for setting the user name and email instead of the config.
Instead of making it a bug to call other functions in the ident API
first, just return silently if the identity of a user was already set
up.
Reported-by: Denton Liu <redacted>
Helped-by: Jeff King <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Robert P. J. Day [Wed, 6 Mar 2019 09:14:44 +0000 (04:14 -0500)]
attr.c: ".gitattribute" -> ".gitattributes" (comments)
Correct misspelled ".gitattribute" in comments only, so no functional
change.
Signed-off-by: Robert P. J. Day <redacted>
Signed-off-by: Junio C Hamano <redacted>
Martin Ågren [Wed, 6 Mar 2019 06:30:18 +0000 (07:30 +0100)]
Documentation: turn middle-of-line tabs into spaces
These tabs happen to appear in columns where they don't stand out too
much, so the diff here is non-obvious. Some of these are rendered
differently by AsciiDoc and Asciidoctor (although the difference might
be invisible!), which is how I found a few of them. The remainder were
found using `git grep "[a-zA-Z.,)]$TAB[a-zA-Z]"`.
Signed-off-by: Martin Ågren <redacted>
Signed-off-by: Junio C Hamano <redacted>
Martin Ågren [Wed, 6 Mar 2019 06:30:17 +0000 (07:30 +0100)]
git-svn.txt: drop escaping '\' that ends up being rendered
Escaping two *'s as "\*\*" apparently makes Asciidoctor render the
second backslash literally, so we end up with "*\*". So let's not escape
that second asterisk. The result is now "**" as intended, both in
AsciiDoc and Asciidoctor.
Signed-off-by: Martin Ågren <redacted>
Signed-off-by: Junio C Hamano <redacted>
Martin Ågren [Wed, 6 Mar 2019 06:30:16 +0000 (07:30 +0100)]
git.txt: remove empty line before list continuation
This patch is a no-op for Asciidoctor, but makes AsciiDoc render this as
intended.
Signed-off-by: Martin Ågren <redacted>
Signed-off-by: Junio C Hamano <redacted>
Martin Ågren [Wed, 6 Mar 2019 06:30:15 +0000 (07:30 +0100)]
config/fsck.txt: avoid starting line with dash
This dash at the start of the line causes Asciidoctor to trip on the
list continuations that follow and to render the pluses literally.
Rewrap a little to put the dash elsewhere.
Signed-off-by: Martin Ågren <redacted>
Signed-off-by: Junio C Hamano <redacted>
Martin Ågren [Wed, 6 Mar 2019 06:30:14 +0000 (07:30 +0100)]
config/diff.txt: drop spurious backtick
Signed-off-by: Martin Ågren <redacted>
Signed-off-by: Junio C Hamano <redacted>
Yash Bhatambare [Wed, 6 Mar 2019 05:23:10 +0000 (05:23 +0000)]
gitattributes.txt: fix typo
`UTF-16-LE-BOM` to `UTF-16LE-BOM`.
this closes https://github.com/git-for-windows/git/issues/2095
Signed-off-by: Yash Bhatambare <redacted>
Signed-off-by: Torsten Bögershausen <redacted>
Signed-off-by: Junio C Hamano <redacted>
Alban Gruin [Tue, 5 Mar 2019 19:17:55 +0000 (20:17 +0100)]
sequencer: refactor rearrange_squash() to work on a todo_list
This refactors rearrange_squash() to work on a todo_list to avoid
redundant reads and writes. The function is renamed
todo_list_rearrange_squash().
The old version created a new buffer, which was directly written to the
disk. This new version creates a new item list by just copying items
from the old item list, without creating a new buffer. This eliminates
the need to reparse the todo list, but this also means its buffer cannot
be directly written to the disk.
As rebase -p still need to check the todo list from the disk, a new
function is introduced, rearrange_squash_in_todo_file().
complete_action() still uses rearrange_squash_in_todo_file() for now.
This will be changed in a future commit.
Signed-off-by: Alban Gruin <redacted>
Signed-off-by: Junio C Hamano <redacted>
Alban Gruin [Tue, 5 Mar 2019 19:18:05 +0000 (20:18 +0100)]
rebase--interactive: move transform_todo_file()
As transform_todo_file() is only needed inside of
rebase--interactive.c for `rebase -p', it is moved there from
sequencer.c.
The parameter r (repository) is dropped along the way.
Signed-off-by: Alban Gruin <redacted>
Signed-off-by: Junio C Hamano <redacted>
Alban Gruin [Tue, 5 Mar 2019 19:17:54 +0000 (20:17 +0100)]
sequencer: refactor sequencer_add_exec_commands() to work on a todo_list
This refactors sequencer_add_exec_commands() to work on a todo_list to
avoid redundant reads and writes to the disk.
Instead of inserting the `exec' commands between the other commands and
re-parsing the buffer at the end, they are appended to the buffer once,
and a new list of items is created. Items from the old list are copied
across and new `exec' items are appended when necessary. This
eliminates the need to reparse the buffer, but this also means we have
to use todo_list_write_to_disk() to write the file.
todo_list_add_exec_commands() and sequencer_add_exec_commands() are
modified to take a string list instead of a string -- one item for each
command. This makes it easier to insert a new command to the todo list
for each command to execute.
sequencer_add_exec_commands() still reads the todo list from the disk,
as it is needed by rebase -p.
complete_action() still uses sequencer_add_exec_commands() for now.
This will be changed in a future commit.
Signed-off-by: Alban Gruin <redacted>
Signed-off-by: Junio C Hamano <redacted>
Alban Gruin [Tue, 5 Mar 2019 19:18:04 +0000 (20:18 +0100)]
sequencer: use edit_todo_list() in complete_action()
This changes complete_action() to use edit_todo_list(), now that it can
handle the initial edit of the todo list.
Signed-off-by: Alban Gruin <redacted>
Signed-off-by: Junio C Hamano <redacted>
Alban Gruin [Tue, 5 Mar 2019 19:18:03 +0000 (20:18 +0100)]
rebase-interactive: rewrite edit_todo_list() to handle the initial edit
edit_todo_list() is changed to work on a todo_list, and to handle the
initial edition of the todo list (ie. making a backup of the todo
list).
It does not check for dropped commits yet, as todo_list_check() does not
take the commits that have already been processed by the rebase (ie. the
todo list is edited in the middle of a rebase session).
Signed-off-by: Alban Gruin <redacted>
Signed-off-by: Junio C Hamano <redacted>
Alban Gruin [Tue, 5 Mar 2019 19:18:02 +0000 (20:18 +0100)]
rebase-interactive: append_todo_help() changes
This moves the writing of the comment "Rebase $shortrevisions onto
$shortonto ($command_count commands)" from todo_list_write_to_file() to
append_todo_help().
shortrevisions, shortonto, and command_count are passed as parameters to
append_todo_help().
During the initial edit of the todo list, shortrevisions and shortonto
are not NULL. Therefore, if shortrevisions or shortonto is NULL, then
edit_todo would be true, otherwise it would be false. Thus, edit_todo
is removed from the parameters of append_todo_help().
Signed-off-by: Alban Gruin <redacted>
Signed-off-by: Junio C Hamano <redacted>
Alban Gruin [Tue, 5 Mar 2019 19:18:01 +0000 (20:18 +0100)]
rebase-interactive: use todo_list_write_to_file() in edit_todo_list()
Just like complete_action(), edit_todo_list() used a
function (transform_todo_file()) that read the todo list from the disk
and wrote it back, resulting in useless disk accesses.
This changes edit_todo_list() to call directly todo_list_write_to_file()
instead.
Signed-off-by: Alban Gruin <redacted>
Signed-off-by: Junio C Hamano <redacted>
Alban Gruin [Tue, 5 Mar 2019 19:18:00 +0000 (20:18 +0100)]
sequencer: refactor skip_unnecessary_picks() to work on a todo_list
This refactors skip_unnecessary_picks() to work on a todo_list. As this
function is only called by complete_action() (and thus is not used by
rebase -p), the file-handling logic is completely dropped here.
Instead of truncating the todo list’s buffer, the items are moved to
the beginning of the list, eliminating the need to reparse the list.
This also means its buffer cannot be directly written to the disk.
rewrite_file() is then removed, as it is now unused.
Signed-off-by: Alban Gruin <redacted>
Signed-off-by: Junio C Hamano <redacted>
Alban Gruin [Tue, 5 Mar 2019 19:17:59 +0000 (20:17 +0100)]
rebase--interactive: move rearrange_squash_in_todo_file()
As rearrange_squash_in_todo_file() is only needed inside of
rebase--interactive.c for `rebase -p', it is moved there from
sequencer.c.
The parameter r (repository) is dropped along the way, and the error
handling is slightly improved.
Signed-off-by: Alban Gruin <redacted>
Signed-off-by: Junio C Hamano <redacted>
Alban Gruin [Tue, 5 Mar 2019 19:17:58 +0000 (20:17 +0100)]
rebase--interactive: move sequencer_add_exec_commands()
As sequencer_add_exec_commands() is only needed inside of
rebase--interactive.c for `rebase -p', it is moved there from
sequencer.c.
The parameter r (repository) is dropped along the way.
Signed-off-by: Alban Gruin <redacted>
Signed-off-by: Junio C Hamano <redacted>
Alban Gruin [Tue, 5 Mar 2019 19:17:57 +0000 (20:17 +0100)]
sequencer: change complete_action() to use the refactored functions
complete_action() used functions that read the todo-list file, made some
changes to it, and wrote it back to the disk.
The previous commits were dedicated to separate the part that deals with
the file from the actual logic of these functions. Now that this is
done, we can call directly the "logic" functions to avoid useless file
access.
The parsing of the list has to be done by the caller. If the buffer of
the todo list provided by the caller is empty, a `noop' command is
directly added to the todo list, without touching the buffer.
Signed-off-by: Alban Gruin <redacted>
Signed-off-by: Junio C Hamano <redacted>
Alban Gruin [Tue, 5 Mar 2019 19:17:56 +0000 (20:17 +0100)]
sequencer: make sequencer_make_script() write its script to a strbuf
This makes sequencer_make_script() write its script to a strbuf (ie. the
buffer of a todo_list) instead of a FILE. This reduce the amount of
read/write made by rebase interactive.
Signed-off-by: Alban Gruin <redacted>
Signed-off-by: Junio C Hamano <redacted>
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>