git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v9] ls-files: Add eol diagnostics

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 4, 2016, 21:16 UTC
Message-ID
<xmqq37udnizr.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<56845C0A.1060404@web.de>
This one is severely whitespace damaged.

It is _possible_ for me to fix these up manually, but because there is no guarantee that I caught them all (i.e. the end result may contain some leading whitespaces you did not intend them to be there, if the whitespace corruption did not break the syntax of the diff), I'd rather not to do that.

> +	Show line endings (<eolinfo>) and the text/eol attributes (<texteolattr>) of
> files.
> +	<eolinfo> is the file content identification used by Git when
wrapped
>  diff --git a/builtin/ls-files.c b/builtin/ls-files.c
> index b6a7cb0..73b2ba6 100644
indented funnily
>  @@ -170,6 +187,7 @@ static void show_ce_entry(const char *tag, const struct
> cache_entry *ce)
wrapped
Show 9 quoted lines
>  		       find_unique_abbrev(ce->sha1,abbrev),
>  		       ce_stage(ce));
>  	}
> +	write_eolinfo(ce, ce->name);
>  	write_name(ce->name);
>  	if (debug_mode) {
>  		const struct stat_data *sd = &ce->ce_stat_data;
> @@ -433,6 +451,7 @@ int cmd_ls_files(int argc, const char **argv, const char
> *cmd_prefix)
wrapped
> +		git ls-files --eol $src* | sed -e 's!attr/[=a-z-]*!!g' -e 's/  */ /g' | sort
>>actual &&

wrapped. For shell scripts, change the line immediately after '|', reglardless of the length of the line; that would automatically avoid unnecessarily overlong lines.

>  checkout_files    native  true  "crlf"    CRLF  CRLF  CRLF         CRLF_mix_CR
>  CRLF_nul
>  +# Should be the last test case: remove some files from the worktree
> +# This test assumes that "rm" can remove staged files
indented funnily.
Previous: Torsten Bögershausen
Message 2 of 2 in “ls-files: Add eol diagnostics”
  1. ls-files: Add eol diagnosticsTorsten Bögershausen, Dec 30, 2015
  2. Junio C HamanoJan 4, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.