forked from rojo-rbx/rojo
Actually skip .gitignore if --skip-git is passed to init (#1172)
This commit is contained in:
@@ -31,6 +31,7 @@ Making a new release? Simply add the new header with the version and date undern
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
* Fixed a bug where passing `--skip-git` to `rojo init` would still create a file named `gitignore.txt` ([#1172])
|
||||||
* A new command `rojo syncback` has been added. It can be used as `rojo syncback [path to project] --input [path to file]`. ([#937])
|
* A new command `rojo syncback` has been added. It can be used as `rojo syncback [path to project] --input [path to file]`. ([#937])
|
||||||
This command takes a Roblox file and pulls Instances out of it and places them in the correct position in the provided project.
|
This command takes a Roblox file and pulls Instances out of it and places them in the correct position in the provided project.
|
||||||
Syncback is primarily controlled by the project file. Any Instances who are either referenced in the project file or a descendant
|
Syncback is primarily controlled by the project file. Any Instances who are either referenced in the project file or a descendant
|
||||||
@@ -73,6 +74,7 @@ Making a new release? Simply add the new header with the version and date undern
|
|||||||
[#937]: https://github.com/rojo-rbx/rojo/pull/937
|
[#937]: https://github.com/rojo-rbx/rojo/pull/937
|
||||||
[#994]: https://github.com/rojo-rbx/rojo/pull/994
|
[#994]: https://github.com/rojo-rbx/rojo/pull/994
|
||||||
[#1159]: https://github.com/rojo-rbx/rojo/pull/1159
|
[#1159]: https://github.com/rojo-rbx/rojo/pull/1159
|
||||||
|
[#1172]: https://github.com/rojo-rbx/rojo/pull/1172
|
||||||
|
|
||||||
## [7.6.1] (November 6th, 2025)
|
## [7.6.1] (November 6th, 2025)
|
||||||
|
|
||||||
|
|||||||
@@ -80,8 +80,12 @@ impl InitCommand {
|
|||||||
} else {
|
} else {
|
||||||
let content = vfs.read_to_string_lf_normalized(&path)?;
|
let content = vfs.read_to_string_lf_normalized(&path)?;
|
||||||
if let Some(file_stem) = path.file_name().and_then(OsStr::to_str) {
|
if let Some(file_stem) = path.file_name().and_then(OsStr::to_str) {
|
||||||
if file_stem == GIT_IGNORE_PLACEHOLDER && !self.skip_git {
|
if file_stem == GIT_IGNORE_PLACEHOLDER {
|
||||||
path.set_file_name(".gitignore");
|
if self.skip_git {
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
path.set_file_name(".gitignore");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
write_if_not_exists(
|
write_if_not_exists(
|
||||||
|
|||||||
Reference in New Issue
Block a user