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

Re: [PATCH] safecrlf: Add flag to convert_to_git() to disable safecrlf check

From
Steffen Prohaska <prohaska@zib.de>
Date
Jan 15, 2008, 21:41 UTC
Message-ID
<FF86F119-5BF4-4ED3-B6AD-BADFDC91301D@zib.de>
In-Reply-To
<F825ADAF-036C-46FE-8E3D-540B9AA092A8@zib.de>
On Jan 15, 2008, at 9:52 PM, Steffen Prohaska wrote:
Show 20 quoted lines
>> Of course, "git add" on the path will warn or fail with your
>> patch, but we may somehow want to be warned about the breakage
>> before "git add" on that path triggers it.  Perhaps we can have
>> a separate "check-work-tree" command that iterates over locally
>> modified work tree files and runs convert_to_git() with checking
>> enabled.
>
> We could certainly have such a command, yet the question remains
> when to call it.  Do you have in mind calling it when we enter
> the work tree, such that all files in the work tree will always
> be verified?  Running the check once during start up should be
> sufficient and we could switch it off for the remainder of the
> execution.
>
> We would certainly print all paths with an irreversible conversion
> and only die() afterwards if requested by core.safecrlf=true.
> All information would be printed at once in an ordered way.  This
> could be more user friendly than the current approach.
>
> I'll work on this.

What is the right way to iterate over the changed files? Should I copy and adapt the following from wt-status.c?

static void wt_status_print_changed(struct wt_status *s)
{
     struct rev_info rev;
     init_revisions(&rev, "");
     setup_revisions(0, NULL, &rev, NULL);
     rev.diffopt.output_format |= DIFF_FORMAT_CALLBACK;
     rev.diffopt.format_callback = wt_status_print_changed_cb;
     rev.diffopt.format_callback_data = s;
     wt_read_cache(s);
     run_diff_files(&rev, 0);
}
	Steffen
Previous: Steffen ProhaskaNext: Junio C Hamano
Message 11 of 15 in “safecrlf: Add mechanism to warn about irreversible crlf conversions”
  1. safecrlf: Add mechanism to warn about irreversible crlf conversionsSteffen Prohaska, Jan 13, 2008
  2. Dmitry PotapovJan 13, 2008
  3. Dmitry PotapovJan 13, 2008
  4. Don't display crlf warning twiceDmitry Potapov, Jan 13, 2008
  5. Steffen ProhaskaJan 14, 2008
  6. Dmitry PotapovJan 14, 2008
  7. Steffen ProhaskaJan 14, 2008
  8. safecrlf: Add flag to convert_to_git() to disable safecrlf checkSteffen Prohaska, Jan 14, 2008
  9. Junio C HamanoJan 14, 2008
  10. Steffen ProhaskaJan 15, 2008
  11. Steffen ProhaskaJan 15, 2008
  12. Junio C HamanoJan 15, 2008
  13. Dmitry PotapovJan 15, 2008
  14. Steffen ProhaskaJan 15, 2008
  15. Dmitry PotapovJan 15, 2008

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.