git-commit-vandalism/builtin
Torsten Bögershausen a7630bd427 ls-files: add eol diagnostics
When working in a cross-platform environment, a user may want to
check if text files are stored normalized in the repository and
if .gitattributes are set appropriately.

Make it possible to let Git show the line endings in the index and
in the working tree and the effective text/eol attributes.

The end of line ("eolinfo") are shown like this:

    "-text"        binary (or with bare CR) file
    "none"         text file without any EOL
    "lf"           text file with LF
    "crlf"         text file with CRLF
    "mixed"        text file with mixed line endings.

The effective text/eol attribute is one of these:

    "", "-text", "text", "text=auto", "text eol=lf", "text eol=crlf"

git ls-files --eol gives an output like this:

    i/none   w/none   attr/text=auto      t/t5100/empty
    i/-text  w/-text  attr/-text          t/test-binary-2.png
    i/lf     w/lf     attr/text eol=lf    t/t5100/rfc2047-info-0007
    i/lf     w/crlf   attr/text eol=crlf  doit.bat
    i/mixed  w/mixed  attr/               locale/XX.po

to show what eol convention is used in the data in the index ('i'),
and in the working tree ('w'), and what attribute is in effect,
for each path that is shown.

Add test cases in t0027.

Helped-By: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-18 19:48:43 -08:00
..
add.c Merge branch 'jc/add-u-A-default-to-top' 2015-10-30 13:06:55 -07:00
am.c Merge branch 'jc/am-mailinfo-direct' 2015-10-29 13:59:23 -07:00
annotate.c
apply.c apply: convert root string to strbuf 2015-10-05 11:08:04 -07:00
archive.c
bisect--helper.c
blame.c Merge branch 'mk/blame-first-parent' 2015-11-03 15:13:10 -08:00
branch.c Merge branch 'tk/stripspace' 2015-10-26 15:55:20 -07:00
bundle.c
cat-file.c usage: do not insist that standard input must come from a file 2015-10-16 15:27:52 -07:00
check-attr.c usage: do not insist that standard input must come from a file 2015-10-16 15:27:52 -07:00
check-ignore.c usage: do not insist that standard input must come from a file 2015-10-16 15:27:52 -07:00
check-mailmap.c
check-ref-format.c
checkout-index.c
checkout.c checkout: add --progress option 2015-11-01 14:08:17 -08:00
clean.c use strbuf_complete to conditionally append slash 2015-10-05 11:08:06 -07:00
clone.c clone: allow "--dissociate" without reference 2015-10-22 12:13:29 -07:00
column.c
commit-tree.c usage: do not insist that standard input must come from a file 2015-10-16 15:27:52 -07:00
commit.c strbuf: make stripspace() part of strbuf 2015-10-16 09:45:15 -07:00
config.c config: use xstrfmt in normalize_value 2015-09-25 10:18:18 -07:00
count-objects.c prepare_packed_git(): refactor garbage reporting in pack directory 2015-08-17 09:14:59 -07:00
credential.c
describe.c Merge branch 'sg/describe-contains' 2015-08-31 15:39:10 -07:00
diff-files.c
diff-index.c
diff-tree.c
diff.c
fast-export.c
fetch-pack.c
fetch.c use alloc_ref rather than hand-allocating "struct ref" 2015-10-05 11:08:05 -07:00
fmt-merge-msg.c Merge branch 'rs/pop-commit' 2015-10-30 13:07:03 -07:00
for-each-ref.c ref-filter: add option to match literal pattern 2015-09-17 10:02:49 -07:00
fsck.c Merge branch 'jk/war-on-sprintf' 2015-10-20 15:24:01 -07:00
gc.c Merge branch 'dk/gc-idx-wo-pack' 2015-11-20 06:55:34 -05:00
get-tar-commit-id.c usage: do not insist that standard input must come from a file 2015-10-16 15:27:52 -07:00
grep.c
hash-object.c usage: do not insist that standard input must come from a file 2015-10-16 15:27:52 -07:00
help.c convert strncpy to memcpy 2015-10-05 11:08:06 -07:00
index-pack.c use xsnprintf for generating git object headers 2015-09-25 10:18:18 -07:00
init-db.c init: use strbufs to store paths 2015-10-05 11:07:04 -07:00
interpret-trailers.c
log.c use strbuf_complete to conditionally append slash 2015-10-05 11:08:06 -07:00
ls-files.c ls-files: add eol diagnostics 2016-01-18 19:48:43 -08:00
ls-remote.c Merge branch 'jk/war-on-sprintf' 2015-10-20 15:24:01 -07:00
ls-tree.c convert trivial sprintf / strcpy calls to xsnprintf 2015-09-25 10:18:18 -07:00
mailinfo.c mailinfo: libify 2015-10-21 15:59:34 -07:00
mailsplit.c mailsplit: make PATH_MAX buffers dynamic 2015-09-25 10:18:18 -07:00
merge-base.c
merge-file.c Merge branch 'jk/merge-file-exit-code' 2015-10-30 13:07:08 -07:00
merge-index.c use sha1_to_hex_r() instead of strcpy 2015-10-05 11:08:05 -07:00
merge-ours.c
merge-recursive.c convert trivial sprintf / strcpy calls to xsnprintf 2015-09-25 10:18:18 -07:00
merge-tree.c react to errors in xdi_diff 2015-09-28 14:57:10 -07:00
merge.c Merge branch 'rs/pop-commit' 2015-10-30 13:07:03 -07:00
mktag.c usage: do not insist that standard input must come from a file 2015-10-16 15:27:52 -07:00
mktree.c
mv.c
name-rev.c name-rev: use strip_suffix to avoid magic numbers 2015-10-05 11:08:06 -07:00
notes.c Merge branch 'tk/stripspace' 2015-10-26 15:55:20 -07:00
pack-objects.c Merge branch 'ah/pack-objects-usage-strings' 2015-09-01 16:31:12 -07:00
pack-redundant.c
pack-refs.c
patch-id.c usage: do not insist that standard input must come from a file 2015-10-16 15:27:52 -07:00
prune-packed.c
prune.c Merge branch 'jk/repository-extension' 2015-10-26 15:55:25 -07:00
pull.c Merge branch 'pt/pull-builtin' into maint 2015-10-16 14:32:32 -07:00
push.c push: add a config option push.gpgSign for default signed pushes 2015-08-19 12:58:58 -07:00
read-tree.c convert trivial sprintf / strcpy calls to xsnprintf 2015-09-25 10:18:18 -07:00
receive-pack.c hideRefs: add support for matching full refs 2015-11-05 11:25:02 -08:00
reflog.c Merge branch 'rs/pop-commit' 2015-10-30 13:07:03 -07:00
remote-ext.c remote-ext: simplify git pkt-line generation 2015-09-25 10:18:18 -07:00
remote-fd.c
remote.c Merge branch 'bb/remote-get-url' 2015-10-05 12:30:25 -07:00
repack.c Merge branch 'jk/repository-extension' 2015-10-26 15:55:25 -07:00
replace.c
rerere.c Sync with 2.6.1 2015-10-05 13:20:08 -07:00
reset.c memoize common git-path "constant" files 2015-08-10 15:37:14 -07:00
rev-list.c use sha1_to_hex_r() instead of strcpy 2015-10-05 11:08:05 -07:00
rev-parse.c use pop_commit() for consuming the first entry of a struct commit_list 2015-10-26 14:06:46 -07:00
revert.c
rm.c
send-pack.c push: add a config option push.gpgSign for default signed pushes 2015-08-19 12:58:58 -07:00
shortlog.c
show-branch.c Merge branch 'rs/show-branch-argv-array' 2015-11-03 15:13:07 -08:00
show-ref.c usage: do not insist that standard input must come from a file 2015-10-16 15:27:52 -07:00
stripspace.c Merge branch 'tk/stripspace' 2015-10-26 15:55:20 -07:00
submodule--helper.c submodule: rewrite module_clone shell function in C 2015-09-08 15:48:21 -07:00
symbolic-ref.c
tag.c Merge branch 'kn/for-each-tag' 2015-10-26 15:55:22 -07:00
unpack-file.c convert trivial sprintf / strcpy calls to xsnprintf 2015-09-25 10:18:18 -07:00
unpack-objects.c usage: do not insist that standard input must come from a file 2015-10-16 15:27:52 -07:00
update-index.c
update-ref.c tag, update-ref: improve description of option "create-reflog" 2015-09-11 09:50:02 -07:00
update-server-info.c
upload-archive.c upload-archive: convert sprintf to strbuf 2015-09-25 10:18:18 -07:00
var.c
verify-commit.c
verify-pack.c
verify-tag.c
worktree.c Merge branch 'es/worktree-add' 2015-10-26 15:55:21 -07:00
write-tree.c