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

Re: [PATCH 2/6] fsmonitor: Add dir.h include, for untracked_cache_invalidate_path

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 21, 2017, 21:47 UTC
Message-ID
<xmqqfu83u522.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<alpine.DEB.2.10.1712201108190.10810@alexmv-linux>
Alex Vandiver <alexmv@dropbox.com> writes:
Show 6 quoted lines
>> But I am not sure if this is a right direction to go in.  If a .C
>> user of fsmonitor needs (does not need) things from dir.h, that file
>> can (does not need to) include dir.h itself.
>
> Hm; I was patterning based on existing .h files, which don't seem shy
> about pulling in other .h files.

IIUC, existing X.h do pull in Y.h when X.h uses a structure or a typedef defined in Y.h (but using pointer to such a structure or a type does not count) defined in Y.h; in such a case, a user of X.h that wants to use what is defined in X.h would not be able to use it without somehow knowing the shape of such a structure or type and would be forced to pull in Y.h itself. "static inline" falls into the same category---as it stands, anybody that includes fsmonitor.h and wants to use one of these static inline functions would need to have definitions from dir.h, which I agree is wrong and I understand that you want to include dir.h there.

Previous: Alex VandiverNext: Alex Vandiver
Message 6 of 16 in “Minor fsmonitor bugfixes, use with `git diff`”
  1. 0/6 Minor fsmonitor bugfixes, use with `git diff`Alex Vandiver, Dec 19, 2017
  2. 1/6 Fix comments to agree with argument nameAlex Vandiver, Dec 19, 2017
  3. 2/6 fsmonitor: Add dir.h include, for untracked_cache_invalidate_pathAlex Vandiver, Dec 19, 2017
  4. Junio C HamanoDec 19, 2017
  5. Alex VandiverDec 20, 2017
  6. Junio C HamanoDec 21, 2017
  7. 4/6 fsmonitor: Add a trailing newline to test-dump-fsmonitorAlex Vandiver, Dec 19, 2017
  8. Junio C HamanoDec 19, 2017
  9. Alex VandiverDec 21, 2017
  10. Junio C HamanoDec 21, 2017
  11. 3/6 fsmonitor: Update helper tool, now that flags are filled laterAlex Vandiver, Dec 19, 2017
  12. Alex VandiverDec 20, 2017
  13. 6/6 fsmonitor: Use fsmonitor data in `git diff`Alex Vandiver, Dec 19, 2017
  14. 5/6 fsmonitor: Remove debugging lines from t/t7519-status-fsmonitor.shAlex Vandiver, Dec 19, 2017
  15. Junio C HamanoDec 19, 2017
  16. Johannes SchindelinDec 20, 2017

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.