:copydot should ignore vim swap files #1438

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
5 participants
@achiang

achiang commented Dec 10, 2013

Seems fairly common to want to rake deploy while you might still be
editing a blog post in vim (which creates hidden .swp files). If you
attempt to do so, you'll trip on OSX with the following:

cp -r source/_posts/.2013-12-09-test.markdown.swp public/_posts/.2013-12-09-test.markdown.swp
rake aborted!
No such file or directory - public/_posts/.2013-12-09-test.markdown.swp

Instead, let's try to avoid copying .swp files.

See also: commit 254cdd3

:copydot should ignore vim swap files
Seems fairly common to want to `rake deploy` while you might still be
editing a blog post in vim (which creates hidden .swp files). If you
attempt to do so, you'll trip on OSX with the following:

  cp -r source/_posts/.2013-12-09-test.markdown.swp public/_posts/.2013-12-09-test.markdown.swp
  rake aborted!
  No such file or directory - public/_posts/.2013-12-09-test.markdown.swp

Instead, let's try to avoid copying .swp files.

See also: commit 254cdd3
@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Dec 10, 2013

Collaborator

👍

Collaborator

parkr commented Dec 10, 2013

👍

@tamouse

This comment has been minimized.

Show comment
Hide comment
@tamouse

tamouse Dec 26, 2013

Given #1449 as well, it seems that :copydot needs a bit of work to only copy the right, true set of dot files. Is there a ways to nail this down instead of encountering edge cases along the way? Would it be politic to avoid copying dot files from underscore directories in source?

tamouse commented Dec 26, 2013

Given #1449 as well, it seems that :copydot needs a bit of work to only copy the right, true set of dot files. Is there a ways to nail this down instead of encountering edge cases along the way? Would it be politic to avoid copying dot files from underscore directories in source?

@tamouse

This comment has been minimized.

Show comment
Hide comment
@tamouse

tamouse Dec 26, 2013

Also, just noticing, this would not exclude other manky files such as .*~ (editor backups), either.

Also, just noticing, this would not exclude other manky files such as .*~ (editor backups), either.

@tamouse

This comment has been minimized.

Show comment
Hide comment
@tamouse

tamouse Dec 26, 2013

While leaving the note above, I noticed this at https://github.com/imathis/octopress/blob/master/Rakefile#L233 . Do we really want a .gsub here or just a .sub ? We can't predict what someone who repeats the source directory name further down the path might absolutely want, but forcing it to be the destination directory name seems like it might not be what they want:

gsub: source/images/source/.something ~> public/images/public/.something
sub:   source/images/source/.something ~> public/images/source/.something

for example

tamouse commented Dec 26, 2013

While leaving the note above, I noticed this at https://github.com/imathis/octopress/blob/master/Rakefile#L233 . Do we really want a .gsub here or just a .sub ? We can't predict what someone who repeats the source directory name further down the path might absolutely want, but forcing it to be the destination directory name seems like it might not be what they want:

gsub: source/images/source/.something ~> public/images/public/.something
sub:   source/images/source/.something ~> public/images/source/.something

for example

@suzaku

This comment has been minimized.

Show comment
Hide comment

suzaku commented Feb 24, 2015

+1

@dgmstuart

This comment has been minimized.

Show comment
Hide comment
@dgmstuart

dgmstuart Mar 25, 2015

+1

Any reason this isn't getting merged?

+1

Any reason this isn't getting merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment