From: SourceForge.net <no...@so...> - 2008-08-05 17:46:13
|
Bugs item #2037398, was opened at 2008-08-04 13:09 Message generated for change (Comment added) made by anirudha81 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1089899&aid=2037398&group_id=233450 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Object API Group: None >Status: Closed Resolution: None Priority: 5 Private: No Submitted By: Anirudha (anirudha81) Assigned to: Nobody/Anonymous (nobody) Summary: GitAdd in WorkingTree.java does not add files Initial Comment: //Create a new directory to be used as a git repository. repositoryDirectory = FileUtilities.createTempDirectory("Demo_gitRepository"); //Initialize the repository ,similar to git init HelperGitCommands.initRepo(repositoryDirectory); //Create a file in our repository File file = FileUtilities.createFile(repositoryDirectory, "README", "First file in the git repository"); //get the instance of the dotGit Object dotGit = DotGit.getInstance(repositoryDirectory); //get the current working tree from the git repository WorkingTree wt = dotGit.getWorkingTree(); GitAddResponse ar = wt.add(); wt.commitAll("First commit to the git repository"); //Commit fails saying no files added ??? wt.gitADD is not adding files, response object is empty. ---------------------------------------------------------------------- >Comment By: Anirudha (anirudha81) Date: 2008-08-05 23:16 Message: Logged In: YES user_id=1014478 Originator: YES see previous comment ---------------------------------------------------------------------- Comment By: Anirudha (anirudha81) Date: 2008-08-05 23:15 Message: Logged In: YES user_id=1014478 Originator: YES Fixed: Modified gitAdd to handle relative paths. and also gitFileSystemObject. reason : GitAdd always assumed files to be relative to the repodir, but using the GitFileSystem Obj. absolute paths were returned to Git Add.Thus always failing the API implementation of git Add. more test cases are needed to correctly test the GIT Object API. ---------------------------------------------------------------------- Comment By: nutans (nutans) Date: 2008-08-04 18:25 Message: Logged In: YES user_id=2152864 Originator: NO Hi Anirudha, Shouldn't GitAddResponse ar = wt.add() be GitAddResponse ar = wt.add(file)? Otherwise, I don't see the file getting added to the repository. ~Nutan ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1089899&aid=2037398&group_id=233450 |