1
0
mirror of https://github.com/git/git.git synced 2024-09-25 11:01:01 +02:00
Git Source Code Mirror. Please follow Documentation/SubmittingPatches procedure for any of your improvements.
Go to file
Jakub Narebski b8d97d07fd gitweb: Better cutting matched string and its context
Improve look of commit search output ('search' view) by better cutting
of matched string and its context in match info, as suggested by Junio.
For example, if you are looking for "very long search string" in the
following line:

    Could somebody test this with very long search string, and see how

you would now see:

    ...this with <<very long ... string>>, and see...

instead of:

    Could som... <<very long search...>>, and see...

(where <<something>> denotes emphasized / colored fragment; matched
fragment to be more exact).

For this feature, support for fourth [optional] parameter to chop_str
subroutine was added.  This fourth parameter is used to denote where
to cut string to make it shorter.  chop_str can now cut at the
beginning (from the _left_ side of the string), in the middle
(_center_ of the string), or at the end (from the _right_ side of
the string); cutting from right is the default:

  chop_str(somestring, len, slop, 'left')    ->  ' ...string'
  chop_str(somestring, len, slop, 'center')  ->  'som ... ing'
  chop_str(somestring, len, slop, 'right')   ->  'somestr... '

If you want to use default slop (default additional length), use undef
as value for third parameter to chop_str.

While at it, return from chop_str early if given string is so short
that chop_str couldn't shorten it.  Simplify also regexp used by
chop_str.  Make ellipsis (dots) stick to shortened fragment for
cutting at ends, to better see which part got shortened.

Simplify passing all arguments to chop_str in chop_and_escape_str
subroutine. This was needed to pass additional options to chop_str.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-25 22:20:18 -08:00
arm
compat Merge branch 'bc/fopen' 2008-02-20 16:13:19 -08:00
contrib git.el: Set process-environment instead of invoking env 2008-02-20 11:25:14 -08:00
Documentation git-bundle.txt: Add different strategies to create the bundle 2008-02-24 18:51:46 -08:00
git-gui Sync with 1.5.4.3 2008-02-23 11:49:34 -08:00
gitk-git
gitweb gitweb: Better cutting matched string and its context 2008-02-25 22:20:18 -08:00
mozilla-sha1
perl
ppc
t Add tests for filesystem challenges (case and unicode normalization) 2008-02-25 15:48:48 -08:00
templates
xdiff
.gitattributes
.gitignore
.mailmap
alloc.c
archive-tar.c
archive-zip.c
archive.c
archive.h
attr.c
attr.h
base85.c
blob.c
blob.h
builtin-add.c
builtin-annotate.c
builtin-apply.c Merge branch 'jc/apply-whitespace' 2008-02-24 17:23:17 -08:00
builtin-archive.c
builtin-blame.c Merge branch 'jc/setup' 2008-02-20 16:13:16 -08:00
builtin-branch.c
builtin-bundle.c
builtin-cat-file.c
builtin-check-attr.c
builtin-check-ref-format.c
builtin-checkout-index.c
builtin-clean.c git-clean: handle errors if removing files fails 2008-02-20 20:21:39 -08:00
builtin-commit-tree.c
builtin-commit.c
builtin-config.c
builtin-count-objects.c
builtin-describe.c
builtin-diff-files.c
builtin-diff-index.c
builtin-diff-tree.c
builtin-diff.c
builtin-fast-export.c
builtin-fetch--tool.c
builtin-fetch-pack.c
builtin-fetch.c
builtin-fmt-merge-msg.c
builtin-for-each-ref.c builtin-for-each-ref.c: fix typo in error message 2008-02-24 18:34:34 -08:00
builtin-fsck.c
builtin-gc.c
builtin-grep.c Teach git-grep --name-only as synonym for -l 2008-02-20 20:36:20 -08:00
builtin-http-fetch.c
builtin-init-db.c
builtin-log.c Merge branch 'mk/color' 2008-02-20 16:13:56 -08:00
builtin-ls-files.c Merge branch 'jc/setup' 2008-02-20 16:13:16 -08:00
builtin-ls-remote.c
builtin-ls-tree.c
builtin-mailinfo.c
builtin-mailsplit.c
builtin-merge-base.c
builtin-merge-file.c
builtin-merge-ours.c
builtin-mv.c
builtin-name-rev.c
builtin-pack-objects.c
builtin-pack-refs.c
builtin-prune-packed.c
builtin-prune.c
builtin-push.c push: indicate partialness of error message 2008-02-19 20:44:47 -08:00
builtin-read-tree.c Name hash fixups: export (and rename) remove_hash_entry 2008-02-22 21:24:47 -08:00
builtin-reflog.c
builtin-rerere.c
builtin-reset.c
builtin-rev-list.c Merge branch 'lt/revision-walker' 2008-02-20 16:13:24 -08:00
builtin-rev-parse.c
builtin-revert.c
builtin-rm.c
builtin-send-pack.c
builtin-shortlog.c
builtin-show-branch.c
builtin-show-ref.c
builtin-stripspace.c
builtin-symbolic-ref.c
builtin-tag.c builtin-tag.c: remove cruft 2008-02-22 07:02:40 -08:00
builtin-tar-tree.c
builtin-unpack-objects.c
builtin-update-index.c
builtin-update-ref.c
builtin-upload-archive.c
builtin-verify-pack.c
builtin-verify-tag.c
builtin-write-tree.c
builtin.h
bundle.c
bundle.h
cache-tree.c
cache-tree.h
cache.h Merge branch 'jc/apply-whitespace' 2008-02-24 17:23:17 -08:00
check-builtins.sh
check-racy.c
color.c
color.h
combine-diff.c
command-list.txt
commit.c
commit.h
config.c git_config_*: don't assume we are parsing a config file 2008-02-20 20:21:43 -08:00
config.mak.in
configure.ac
connect.c
convert.c
copy.c
COPYING
csum-file.c
csum-file.h
ctype.c
daemon.c
date.c
decorate.c
decorate.h
delta.h
diff-delta.c
diff-lib.c
diff.c Merge branch 'lt/dirstat' 2008-02-24 18:14:53 -08:00
diff.h Merge branch 'lt/dirstat' 2008-02-24 18:14:53 -08:00
diffcore-break.c
diffcore-delta.c
diffcore-order.c
diffcore-pickaxe.c
diffcore-rename.c
diffcore.h
dir.c
dir.h
dump-cache-tree.c
entry.c
environment.c
exec_cmd.c
exec_cmd.h
fast-import.c
fetch-pack.h
fixup-builtins
generate-cmdlist.sh
git-add--interactive.perl
git-am.sh
git-archimport.perl
git-bisect.sh
git-checkout.sh Be more verbose when checkout takes a long time 2008-02-24 10:01:13 -08:00
git-clone.sh git-clone.sh: properly configure remote even if remote's head is dangling 2008-02-20 11:31:17 -08:00
git-compat-util.h Merge branch 'bc/fopen' 2008-02-20 16:13:19 -08:00
git-cvsexportcommit.perl Merge branch 'js/maint-cvsexport' 2008-02-20 16:13:52 -08:00
git-cvsimport.perl
git-cvsserver.perl
git-filter-branch.sh
git-instaweb.sh
git-lost-found.sh
git-merge-octopus.sh
git-merge-one-file.sh
git-merge-resolve.sh
git-merge-stupid.sh
git-merge.sh
git-mergetool.sh
git-parse-remote.sh
git-pull.sh pull: pass --strategy along to to rebase 2008-02-22 21:44:46 -08:00
git-quiltimport.sh
git-rebase--interactive.sh
git-rebase.sh
git-relink.perl
git-remote.perl
git-repack.sh
git-request-pull.sh
git-send-email.perl send-email: fix In-Reply-To regression 2008-02-21 21:25:49 -08:00
git-sh-setup.sh
git-stash.sh
git-submodule.sh
git-svn.perl
GIT-VERSION-GEN Sync with 1.5.4.3 2008-02-23 11:49:34 -08:00
git-web--browse.sh
git.c
git.spec.in Rename git-core rpm to just git and rename the meta-pacakge to git-all. 2008-02-19 22:17:22 -08:00
grep.c
grep.h
hash-object.c
hash.c hash: fix lookup_hash semantics 2008-02-22 13:39:20 -08:00
hash.h
help.c
http-push.c Merge branch 'js/maint-http-push' 2008-02-20 16:13:32 -08:00
http-walker.c
http.c
http.h
ident.c
imap-send.c
index-pack.c
INSTALL
interpolate.c
interpolate.h
list-objects.c
list-objects.h
lockfile.c
log-tree.c
log-tree.h
mailmap.c
mailmap.h
Makefile Merge branch 'maint' 2008-02-24 10:01:19 -08:00
match-trees.c
merge-file.c
merge-index.c git-merge-index documentation: clarify synopsis 2008-02-22 07:02:40 -08:00
merge-recursive.c
merge-tree.c
mktag.c
mktree.c
object-refs.c
object.c
object.h
pack-check.c
pack-redundant.c
pack-write.c
pack.h
pager.c
parse-options.c
parse-options.h
patch-delta.c
patch-id.c
patch-ids.c
patch-ids.h
path-list.c
path-list.h
path.c
pkt-line.c
pkt-line.h
pretty.c
progress.c
progress.h
quote.c
quote.h
reachable.c
reachable.h
read-cache.c Name hash fixups: export (and rename) remove_hash_entry 2008-02-22 21:24:47 -08:00
README
receive-pack.c
reflog-walk.c
reflog-walk.h
refs.c Protect peel_ref fallback case from NULL parse_object result 2008-02-24 00:52:55 -08:00
refs.h
RelNotes GIT 1.5.4.3 2008-02-23 11:31:04 -08:00
remote.c
remote.h
revision.c Merge branch 'lt/revision-walker' 2008-02-20 16:13:24 -08:00
revision.h
run-command.c
run-command.h
send-pack.h
server-info.c
setup.c prefix_path: use is_absolute_path() instead of *orig == '/' 2008-02-20 20:21:43 -08:00
sha1_file.c Merge branch 'jk/empty-tree' 2008-02-20 16:13:28 -08:00
sha1_name.c
shallow.c
shell.c
show-index.c
sideband.c
sideband.h
strbuf.c
strbuf.h
symlinks.c
tag.c
tag.h
tar.h
test-absolute-path.c
test-chmtime.c
test-date.c
test-delta.c
test-genrandom.c
test-match-trees.c
test-parse-options.c
test-sha1.c
test-sha1.sh
trace.c
transport.c
transport.h
tree-diff.c
tree-walk.c
tree-walk.h
tree.c
tree.h
unpack-file.c
unpack-trees.c Be more verbose when checkout takes a long time 2008-02-24 10:01:13 -08:00
unpack-trees.h
update-server-info.c
upload-pack.c
usage.c
utf8.c
utf8.h
var.c
walker.c
walker.h
write_or_die.c
ws.c ws_fix_copy(): move the whitespace fixing function to ws.c 2008-02-23 16:59:16 -08:00
wt-status.c
wt-status.h
xdiff-interface.c
xdiff-interface.h

////////////////////////////////////////////////////////////////

	GIT - the stupid content tracker

////////////////////////////////////////////////////////////////

"git" can mean anything, depending on your mood.

 - random three-letter combination that is pronounceable, and not
   actually used by any common UNIX command.  The fact that it is a
   mispronunciation of "get" may or may not be relevant.
 - stupid. contemptible and despicable. simple. Take your pick from the
   dictionary of slang.
 - "global information tracker": you're in a good mood, and it actually
   works for you. Angels sing, and a light suddenly fills the room.
 - "goddamn idiotic truckload of sh*t": when it breaks

Git is a fast, scalable, distributed revision control system with an
unusually rich command set that provides both high-level operations
and full access to internals.

Git is an Open Source project covered by the GNU General Public License.
It was originally written by Linus Torvalds with help of a group of
hackers around the net. It is currently maintained by Junio C Hamano.

Please read the file INSTALL for installation instructions.
See Documentation/tutorial.txt to get started, then see
Documentation/everyday.txt for a useful minimum set of commands,
and "man git-commandname" for documentation of each command.
CVS users may also want to read Documentation/cvs-migration.txt.

Many Git online resources are accessible from http://git.or.cz/
including full documentation and Git related tools.

The user discussion and development of Git take place on the Git
mailing list -- everyone is welcome to post bug reports, feature
requests, comments and patches to git@vger.kernel.org. To subscribe
to the list, send an email with just "subscribe git" in the body to
majordomo@vger.kernel.org. The mailing list archives are available at
http://marc.theaimsgroup.com/?l=git and other archival sites.

The messages titled "A note from the maintainer", "What's in
git.git (stable)" and "What's cooking in git.git (topics)" and
the discussion following them on the mailing list give a good
reference for project status, development direction and
remaining tasks.