.gitignore file generated by tup

189 views
Skip to first unread message

Frode Petersen

unread,
May 18, 2013, 9:45:20 AM5/18/13
to tup-...@googlegroups.com
I noticed that when placing ".gitignore" in the top Tupfile, it generates the entry "/.gitignore" in the .gitignore file. I suppose the intention is to exclude the .gitignore file itself; in that case the slash should not be there.
tup v0.6-354-g7b3168c

Andrew Wagner

unread,
May 19, 2013, 6:39:58 AM5/19/13
to tup-...@googlegroups.com
Hi Frode, git is just fine with the forward slash, and Tup ~always prepends the forward slash to stuff it adds to .gitignore files.  I haven't figured out the full behavior (i.e. if you want to manually add other stuff) though, and I don't think it's documented in the man page.

For sanity I usually just make sure either I'm managing the .gitignore file or tup is, but never simultaneously.  This isn't a big convenience, since ignore patters are inherited (i.e. I don't have any targets in my top level directory, and can put global ignore patterns in that .gitignore, which ~is versioned)   


On Sat, May 18, 2013 at 3:45 PM, Frode Petersen <frop...@gmail.com> wrote:
I noticed that when placing ".gitignore" in the top Tupfile, it generates the entry "/.gitignore" in the .gitignore file. I suppose the intention is to exclude the .gitignore file itself; in that case the slash should not be there.
tup v0.6-354-g7b3168c


--
--
tup-users mailing list
email: tup-...@googlegroups.com
unsubscribe: tup-users+...@googlegroups.com
options: http://groups.google.com/group/tup-users?hl=en
---
You received this message because you are subscribed to the Google Groups "tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tup-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Andrew Wagner

unread,
May 19, 2013, 6:40:49 AM5/19/13
to tup-...@googlegroups.com
oh, btw I'm using linux.  Maybe windows git has a problem with the forward slash...

Frode Petersen

unread,
May 19, 2013, 7:43:51 PM5/19/13
to tup-...@googlegroups.com
On Sunday, 19 May 2013 12:40:49 UTC+2, Andrew Wagner wrote:
oh, btw I'm using linux.  Maybe windows git has a problem with the forward slash...

I'm using linux too. I don't know why, but the problem has disappeared. Thanks for the reply and advice.

Mike Shal

unread,
May 20, 2013, 10:35:56 AM5/20/13
to tup-...@googlegroups.com
Hi Frode,
The purpose of the initial '/' is to limit the ignore to only that directory. From the gitignore man page:

   A leading slash matches the beginning of the pathname. For
   example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c".

For example, if you have a Tupfile like this:

.gitignore
: |> touch %o |> generated.txt

We get a .gitiginore file that has:

/generated.txt

This is so it ignores the file "generated.txt" in the current directory. If we manually created a file called "generated.txt" in a sub-directory, we don't want git to ignore that file.

What was the actual problem you were seeing?

-Mike
Message has been deleted

Frode Petersen

unread,
May 22, 2013, 5:21:03 PM5/22/13
to tup-...@googlegroups.com
On Monday, 20 May 2013 16:35:56 UTC+2, mar...@gmail.com wrote:
What was the actual problem you were seeing?

-Mike
 
Just a case of my ignorance, as it turns out. I wasn't aware of the use of slash in git, and mistook it for the slash in the filesystem, i.e. the root directory. I apologize for the noise it caused. Thank you for the explanation!
-Frode
Reply all
Reply to author
Forward
0 new messages