{"thread":{"id":"17904","subject":"[PATCH] git-svn: Create leading directories in create-ignore","startedAt":"2009-02-19T18:08:04Z","lastAt":"2009-02-23T04:34:56Z","messageCount":2,"participants":["Brian Gernhardt","Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"105490","messageId":"1235066884-56575-1-git-send-email-benji@silverinsanity.com","threadId":"17904","inReplyTo":null,"subject":"[PATCH] git-svn: Create leading directories in create-ignore","fromName":"Brian Gernhardt","fromEmail":"benji@silverinsanity.com","sentAt":"2009-02-19T18:08:04Z","receivedAt":"2009-02-19T18:08:04Z","isPatch":true,"sender":{"key":"benji@silverinsanity.com","avatar":"https://gravatar.com/avatar/e06c101dbc25c68114d859b4a9ec7cf8a2c52fd2b0270ef0eac0e2e63ff22311?d=mp&s=160"},"body":"Since SVN tracks empty directories and git does not, we can not assume\nthat the directory exists when creating .gitignore files.\n\nSigned-off-by: Brian Gernhardt <benji@silverinsanity.com>\n---\n git-svn.perl |    5 ++++-\n 1 files changed, 4 insertions(+), 1 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex cbc5211..8acd69e 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -670,7 +670,10 @@ sub cmd_create_ignore {\n \t$gs->prop_walk($gs->{path}, $r, sub {\n \t\tmy ($gs, $path, $props) = @_;\n \t\t# $path is of the form /path/to/dir/\n-\t\tmy $ignore = '.' . $path . '.gitignore';\n+\t\t$path = '.' . $path;\n+\t\t# SVN can have attributes on empty directories, which git won't track\n+\t\tmkpath([$path]) unless -d $path;\n+\t\tmy $ignore = $path . '.gitignore';\n \t\tmy $s = $props->{'svn:ignore'} or return;\n \t\topen(GITIGNORE, '>', $ignore)\n \t\t  or fatal(\"Failed to open `$ignore' for writing: $!\");\n-- \n1.6.2.rc1.241.g7bf82\n"},{"id":"105843","messageId":"20090223043456.GB21136@dcvr.yhbt.net","threadId":"17904","inReplyTo":"1235066884-56575-1-git-send-email-benji@silverinsanity.com","subject":"Re: [PATCH] git-svn: Create leading directories in create-ignore","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2009-02-23T04:34:56Z","receivedAt":"2009-02-23T04:34:56Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Brian Gernhardt <benji@silverinsanity.com> wrote:\n> Since SVN tracks empty directories and git does not, we can not assume\n> that the directory exists when creating .gitignore files.\n> \n> Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>\n\nThanks Brian, applied with minor line wrapping adjustment\nand pushed out to:\n\n  git://git.bogomips.org/git-svn\n\n-- \nEric Wong\n"}]}