From: Michael Haggerty <mhagger@alum.mit.edu>
To: Junio C Hamano <gitster@pobox.com>
Cc: Matthias Beyer <mail@beyermatthias.de>, git@vger.kernel.org
Subject: Re: File extension conflict when working with git and latex
Date: Fri, 21 Mar 2014 22:31:00 +0100 [thread overview]
Message-ID: <532CAF94.8040108@alum.mit.edu> (raw)
In-Reply-To: <xmqqr45vtnay.fsf@gitster.dls.corp.google.com>
On 03/21/2014 07:32 PM, Junio C Hamano wrote:
> Matthias Beyer <mail@beyermatthias.de> writes:
>
>> 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 might help some people to show the "find" incantation for skipping
files under .git, which I think would be something like
find . -name .git -prune -o \( [...] \) -print0 | xargs -0 rm -f
where "[...]" is whatever condition the user would otherwise use.
Michael
--
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
next prev parent reply other threads:[~2014-03-21 21:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-21 16:13 File extension conflict when working with git and latex Matthias Beyer
2014-03-21 16:36 ` Simon Ruderich
2014-03-21 16:46 ` Matthias Beyer
2014-03-21 17:01 ` Simon Ruderich
2014-03-21 18:32 ` Junio C Hamano
2014-03-21 21:31 ` Michael Haggerty [this message]
2014-03-22 7:11 ` Torsten Bögershausen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=532CAF94.8040108@alum.mit.edu \
--to=mhagger@alum.mit.edu \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mail@beyermatthias.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).