Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unwanted .git folders appear in each build subfolder2 #7

Open
tetrapharmakon opened this issue Nov 9, 2021 · 1 comment
Open

unwanted .git folders appear in each build subfolder2 #7

tetrapharmakon opened this issue Nov 9, 2021 · 1 comment
Assignees
Labels

Comments

@tetrapharmakon
Copy link
Collaborator

├── build
│   ├── amsart
│   │   ├── bib
│   │   │   ├── allofthem.bib
│   │   │   └── .git
│   │   ├── eptcs.cls
│   │   ├── fouche
│   │   │   ├── act-fouche.sty
│   │   │   ├── fouche.sty
│   │   │   ├── .git              <- this .git is desirable, because "/fouche" is a submodule
│   │   │   ├── .gitignore
│   │   │   ├── .gitmodules
│   │   │   └── lipics-fouche.sty
│   │   ├── Gemfile
│   │   ├── Gemfile.lock
│   │   ├── .git                  <- this is unwanted.
│   │   │   ├── branches
│   │   │   ├── config
│   │   │   ├── ...

(Note: the issue might be solved by just .gitignoreing the /build directory)

@danielfcastro
Copy link

danielfcastro commented Jul 12, 2023

Maybe this would help.

On fileutils.rb the method cp_r at line 463 would be rewriten as

  def cp_r(src, dest, preserve: nil, noop: nil, verbose: nil,
           dereference_root: true, remove_destination: nil)
    fu_output_message "cp -r#{preserve ? 'p' : ''}#{remove_destination ? ' --remove-destination' : ''} #{[src,dest].flatten.join ' '}" if verbose
    return if noop
    fu_each_src_dest(src, dest) do |s, d|
	  next if File.directory?(s) && ['.git', '.gitignore', '.mnogootexrc', '.latexmkrc'].include?(File.basename(s))
      copy_entry s, d, preserve, dereference_root, remove_destination
    end
  end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants