branch develop updated (301ce86 -> c7b7c06)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository scmwebeditor. See http://git.nuiton.org/scmwebeditor.git from 301ce86 Make the refresh after the actions in the popups automatically display the browse tree on the browse page new c7b7c06 When creating a new directory on Git repositories, the automatically created file is named "placeholder" and it contains an information message The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit c7b7c06fab37b098794390776c87175e9e428474 Author: Hugo PIGEON <hpigeon@codelutin.com> Date: Tue Jun 2 17:28:35 2015 +0200 When creating a new directory on Git repositories, the automatically created file is named "placeholder" and it contains an information message Summary of changes: .../java/org/nuiton/scmwebeditor/git/GitFileManager.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository scmwebeditor. See http://git.nuiton.org/scmwebeditor.git commit c7b7c06fab37b098794390776c87175e9e428474 Author: Hugo PIGEON <hpigeon@codelutin.com> Date: Tue Jun 2 17:28:35 2015 +0200 When creating a new directory on Git repositories, the automatically created file is named "placeholder" and it contains an information message --- .../java/org/nuiton/scmwebeditor/git/GitFileManager.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/swe-git/src/main/java/org/nuiton/scmwebeditor/git/GitFileManager.java b/swe-git/src/main/java/org/nuiton/scmwebeditor/git/GitFileManager.java index edeebc8..f6b665e 100644 --- a/swe-git/src/main/java/org/nuiton/scmwebeditor/git/GitFileManager.java +++ b/swe-git/src/main/java/org/nuiton/scmwebeditor/git/GitFileManager.java @@ -48,6 +48,10 @@ public class GitFileManager implements ScmFileManager { private static final Log log = LogFactory.getLog(GitFileManager.class); + protected static String PLACEHOLDER_MESSAGE = "This file has been automatically added by SCMWebEditor when you " + + "created its directory.\nGit repositories require at least one file per directory, so this file was created " + + "according to this rule.\nYou can remove this file once you have added other files in this directory."; + /** the connection to the Git repository */ GitConnection connection; @@ -423,11 +427,11 @@ public class GitFileManager implements ScmFileManager { File file = new File(connection.getLocalDirectory().getAbsolutePath() + File.separator + pathOnRepo + File.separator + dto.getDirectoryName()); file.mkdir(); - File emptyFile = new File(file.getAbsolutePath() + File.separator + ".gitignore"); + File emptyFile = new File(file.getAbsolutePath() + File.separator + "placeholder"); try { emptyFile.createNewFile(); - FileUtils.writeStringToFile(emptyFile, " "); + FileUtils.writeStringToFile(emptyFile, PLACEHOLDER_MESSAGE); } catch (IOException e) { if (log.isErrorEnabled()) { log.error("Can not create file '" + emptyFile.getAbsolutePath() + "'"); @@ -453,9 +457,9 @@ public class GitFileManager implements ScmFileManager { String toAdd; if (pathOnRepo.equals("")) { - toAdd = dto.getDirectoryName() + "/.gitignore"; + toAdd = dto.getDirectoryName() + "/placeholder"; } else { - toAdd = pathOnRepo + "/" + dto.getDirectoryName() + "/.gitignore"; + toAdd = pathOnRepo + "/" + dto.getDirectoryName() + "/placeholder"; } add.addFilepattern(toAdd); -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm