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

Re: File extension conflict when working with git and latex

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 21, 2014, 18:32 UTC
Message-ID
<xmqqr45vtnay.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20140321161324.GC2965@fu.192.168.200.1>
Matthias Beyer <mail@beyermatthias.de> writes:
Show 5 quoted lines
> I know, I can fix this by fixing the clean task in my Makefile. But
> maybe someone somewhere on this world doesn't know the git internals
> as good as me (and, of course, my coworker). Is there _any chance
> at all_ that this gets mentioned somewhere, so others don't fall into
> this pit?

Surely, we are here to please ;-) All of us want to make sure newbies do not shoot themselves in the foot.

But the problem is what exactly should be mentioned. With a fresh wound with your LaTeX project still in your mind, you may be tempted to special case ".idx", but other newbies may inflict the same kind of hurt on themselves with different "find" patterns, e.g.

    $ find . -name '[0-9a-f]*[0-9a-f]' -type f -print | xargs rm -f

when they know their project creates hexadecimal-numbered temoprary files, or whatever other pattern that match the files they do not care about, that also happens to match whatever is in $GIT_DIR. The only common caution that helps us to make sure "others do not fall into this pit" is "Files and directories in $GIT_DIR are used to record your work; do not muck with them unless you know what you are doing e.g. manually repairing a corrupt repository", but that is a bit lame, isn't it?

It is tempting to suggest "git clean '*.idx'", but that is a good fit in the Makefile only when you know everybody involved in the project works in a checkout from Git, not from a tarball extract, and does not apply to projects in general.

Previous: Simon RuderichNext: Michael Haggerty
Message 5 of 7 in “File extension conflict when working with git and latex”
  1. Matthias BeyerMar 21, 2014
  2. Simon RuderichMar 21, 2014
  3. Matthias BeyerMar 21, 2014
  4. Simon RuderichMar 21, 2014
  5. Junio C HamanoMar 21, 2014
  6. Michael HaggertyMar 21, 2014
  7. Torsten BögershausenMar 22, 2014

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.