Without an indication to the contrary, Asciidoc puts 'quoted
text' in italics, making the output look like this:
git grep time_t -- *.[ch]
Looks for time_t in all tracked .c and .h
files in the working directory and its subdirectories.
git grep -e '#define\' --and \( -e MAX_PATH -e PATH_MAX \)
Looks for a line that has #define and either MAX_PATH or
PATH_MAX.
In the first example, the *.[ch] argument needs to be protected from
the shell, or else it will only match files in the current directory.
The second example has a stray backslash.
Reported-by: Frédéric Brière <fbriere@fbriere.net>
Cc: Mark Lodato <lodatom@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The intended text looks like this:
· Adds content from all *.txt files under Documentation
directory and its subdirectories:
$ git add Documentation/\*.txt
Note that the asterisk * is quoted from the shell in this
example; this lets the command include the files from
subdirectories of Documentation/ directory.
The current asciidoc 8.5.2 output has a backslash before _every_
asterisk, which is more confusing than it needs to be.
Reported-by: Frédéric Brière <fbriere@fbriere.net>
Cc: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
I am not sure why, but the regular expression "(?:\^\{\})" gets
rendered by asciidoc as "(?:\{})". The intent seems to be a regex
matching the literal string "^{}", so this rewrites the markup to
produce "(?:\^{})" as output.
Cc: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The current output (with Asciidoc 8.5.2) seems a bit broken:
given two directories ‘d` and d2, there is a difference
between using git rm 'd*’ and ‘git rm 'd/\*\’`, as the
former will also remove all of directory d2.
In other words, the markup parses as
given two directories << d` and _d2_, there is a difference
between using _git rm 'd* >>_ and << git rm 'd/\*\ >> `.
I suspect there is an asciidoc bug involved (why is ' a candidate
closing-quote mark when it is preceded by a backslash?) but with
all the meanings of ` and ' involved I do not want to track it
down. Better to use unambiguous {asterisk} and {apostrophe}
entities.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The markup "'git log'\'s" produces a stray backslash in the
produced man page. Removing the backslash fixes it.
While at it, tweak the surrounding description for readability.
Reported-by: Frédéric Brière <fbriere@fbriere.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* jc/maint-follow-rename-fix:
log: test for regression introduced in v1.7.2-rc0~103^2~2
diff --follow: do call diffcore_std() as necessary
diff --follow: do not waste cycles while recursing
* jn/maint-plug-leak:
write-tree: Avoid leak when index refers to an invalid object
read-tree: stop leaking tree objects
core: Stop leaking ondisk_cache_entrys
* bc/use-more-hardlinks-in-install:
Makefile: make hard/symbolic links for non-builtins too
Makefile: link builtins residing in bin directory to main git binary too
* tr/rfc-reset-doc:
Documentation/reset: move "undo permanently" example behind "make topic"
Documentation/reset: reorder examples to match description
Documentation/reset: promote 'examples' one section up
Documentation/reset: separate options by mode
Documentation/git-reset: reorder modes for soft-mixed-hard progression
Fix "Switched to a new branch <name>" to read "Switched to branch
<name>" when <name> corresponds to an existing branch. This bug was
introduced in 02ac983 while introducing the `-B` switch.
Cc: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Out-of-memory errors can either be actual lack of memory, or bugs (like
code trying to call xmalloc(-1) by mistake). A little more information
may help tracking bugs reported by users.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The "--parents" option did not appear until SVN 1.5.x
and is completely unnecessary in this case.
Reported-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
* jc/maint-follow-rename-fix:
log: test for regression introduced in v1.7.2-rc0~103^2~2
diff --follow: do call diffcore_std() as necessary
diff --follow: do not waste cycles while recursing
* cc/find-commit-subject:
blame: use find_commit_subject() instead of custom code
merge-recursive: use find_commit_subject() instead of custom code
bisect: use find_commit_subject() instead of custom code
revert: rename variables related to subject in get_message()
revert: refactor code to find commit subject in find_commit_subject()
revert: fix off by one read when searching the end of a commit subject
* jn/maint-plug-leak:
write-tree: Avoid leak when index refers to an invalid object
read-tree: stop leaking tree objects
core: Stop leaking ondisk_cache_entrys
* jl/submodule-ignore-diff:
Add tests for the diff.ignoreSubmodules config option
Add the 'diff.ignoreSubmodules' config setting
Submodules: Use "ignore" settings from .gitmodules too for diff and status
Submodules: Add the new "ignore" config option for diff and status
Conflicts:
diff.c
* tc/checkout-B:
builtin/checkout: handle -B from detached HEAD correctly
builtin/checkout: learn -B
builtin/checkout: reword hint for -b
add tests for checkout -b
When mergetool is run without path limiters it loops
over each entry in 'git ls-files -u'. This includes
autoresolved paths.
Teach mergetool to only merge files listed in 'rerere status'
when rerere is enabled.
There are some subtle but harmless changes in behavior.
We now call cd_to_toplevel when no paths are given.
We do this because 'rerere status' paths are always relative
to the root. This is beneficial for the non-rerere use as
well in that mergetool now runs against all unmerged files
regardless of the current directory.
This also slightly tweaks the output when run without paths
to be more readable.
The old output:
Merging the files: foo
bar
baz
The new output:
Merging:
foo
bar
baz
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Add a regression test for the git log -M --follow $diff_option bug
introduced in v1.7.2-rc0~103^2~2, $diff_option being diff related
options like -p, --stat, --name-only etc.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Currently git-svn assumes that two tags created from the same
revision will have the same repo url, so it uses a ref to the
tag without checking that its url matches the current url.
This causes issues when fetching an svn repo where a tag was
created, deleted, and then recreated under the following
circumstances:
- Both tags were copied from the same revision.
- Both tags had the same name.
- Both tags had different repository paths.
- [Optional] Both tags have a file with the same name but
different content.
When all four conditions are met, a checksum mismatch error
occurs because the content of two files with the same path
differs (see t/t9155--git-svn-fetch-deleted-tag.sh):
Checksum mismatch: ChangeLog 065854....
expected: ce771b....
got: 9563fd....
When only the first three conditions are met, no error occurs
but the tag in git matches the first (deleted) tag instead of
the last (most recent) tag (see
t/t9156-git-svn-fetch-deleted-tag-2.sh).
The fix is to verify that the repo url for the ref matches the
current url. If the urls do not match, then a "tail" is grown
on the tag name by appending a dash and rechecking the new ref's
repo url until either a matching repo url is found or a new tag
is created.
Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
Fix a regular expression used to remove the revision from the
end of an svn tag or branch name. The regex did not account for
any "tail" (dashes) that may have been added to the end of the
tag name (which first appeared in v1.4.1-rc2~11). If not fixed,
tags with names like "tags/mytag@5--@2" may be created.
Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
Usually, diff frontends populate the output queue with filepairs without
any rename information and call diffcore_std() to sort the renames out.
When --follow is in effect, however, diff-tree family of frontend has a
hack that looks like this:
diff-tree frontend
-> diff_tree_sha1()
. populate diff_queued_diff
. if --follow is in effect and there is only one change that
creates the target path, then
-> try_to_follow_renames()
-> diff_tree_sha1() with no pathspec but with -C
-> diffcore_std() to find renames
. if rename is found, tweak diff_queued_diff and put a
single filepair that records the found rename there
-> diffcore_std()
. tweak elements on diff_queued_diff by
- rename detection
- path ordering
- pickaxe filtering
We need to skip parts of the second call to diffcore_std() that is related
to rename detection, and do so only when try_to_follow_renames() did find
a rename. Earlier 1da6175 (Make diffcore_std only can run once before a
diff_flush, 2010-05-06) tried to deal with this issue incorrectly; it
unconditionally disabled any second call to diffcore_std().
This hopefully fixes the breakage.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The "--follow" logic is called from diff_tree_sha1() function, but the
input trees to diff_tree_sha1() are not necessarily the top-level trees
(compare_tree_entry() calls it while it recursively descends into
subtrees). When a newly created path lives in somewhere deep in the
source hierarchy, e.g. "platform/", but the rename source is in a totally
different place in the destination hierarchy, e.g. "lang-api/src/com/...",
running "try_to_find_renames()" while base is set to "platform/" is a
wasted call.
We only need to run the rename following at the very top level.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
* bc/use-more-hardlinks-in-install:
Makefile: make hard/symbolic links for non-builtins too
Makefile: link builtins residing in bin directory to main git binary too