Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 366025 - org.eclipse.jgit.pgm.Main chokes on sh style lines with quoting
Summary: org.eclipse.jgit.pgm.Main chokes on sh style lines with quoting
Status: RESOLVED INVALID
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 1.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-08 08:03 EST by Tomasz Zarna CLA
Modified: 2011-12-09 07:14 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Zarna CLA 2011-12-08 08:03:49 EST
--git-dir D:\temp\clone1\.git commit -m 'first commit'

org.eclipse.jgit.api.errors.JGitInternalException: Entry not found by path: commit'
	at org.eclipse.jgit.api.CommitCommand.createTemporaryIndex(CommitCommand.java:415)
	at org.eclipse.jgit.api.CommitCommand.call(CommitCommand.java:195)
	at org.eclipse.jgit.pgm.Commit.run(Commit.java:87)
	at org.eclipse.jgit.pgm.TextBuiltin.execute(TextBuiltin.java:148)
	at org.eclipse.jgit.pgm.Main.execute(Main.java:191)
	at org.eclipse.jgit.pgm.Main.run(Main.java:120)
	at org.eclipse.jgit.pgm.Main.main(Main.java:94)

See also comments on http://egit.eclipse.org/r/#patch,sidebyside,4720,1,org.eclipse.jgit.test/tst/org/eclipse/jgit/pgm/CLIGitCommand.java
Comment 1 Robin Rosenberg CLA 2011-12-09 07:14:05 EST
Quoting is someting the shell handles. jgit is not a shell so it relies
on the shell that invokes it to parse the argument. CMD.exe does not recognize 
single quotes which is why this fails in cmd, possibly in powershell too, 
but it will work in bash, even on Windows.

JGit should not try to interfere with the shell you are using.