aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-02-29 17:25:45 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-02-29 17:25:45 +0200
commitcfce0a5b4e13de05221fa4d71c08125ecd515a2d (patch)
tree9dee7de59e19834abc3d84e3019ea73229076216
parent921d80c6dbf23b9d3c0b102f1a153bb6291c5433 (diff)
Don't create .gitattributes in bdep-new --package mode
-rw-r--r--bdep/new.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/bdep/new.cxx b/bdep/new.cxx
index fcef234..1ad5300 100644
--- a/bdep/new.cxx
+++ b/bdep/new.cxx
@@ -883,9 +883,9 @@ namespace bdep
//
// See also tests/.gitignore below.
//
- if (!sub)
+ if (vc == vcs::git)
{
- if (vc == vcs::git)
+ if (!sub)
{
// Note: use POSIX directory separators in these files.
//
@@ -918,7 +918,10 @@ namespace bdep
<< "*.exe.manifest" << endl
<< "*.pc" << endl;
os.close ();
+ }
+ if (!pkg && !sub)
+ {
open (out / ".gitattributes");
os << "# This is a good default: files that are auto-detected by git to be text are" << endl
<< "# converted to the platform-native line ending (LF on Unix, CRLF on Windows)" << endl