Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Cherry command available?
Cherry command available? [message #1743141] Mon, 12 September 2016 15:13 Go to next message
Vincent Leon is currently offline Vincent LeonFriend
Messages: 2
Registered: September 2016
Junior Member
Hello!

I am building a small application where I use JGit through Maven dependency so I can use its API to call commands like clone, fetch, log...

I would need to use the cherry command (not cherry-pick) but I cannot find it in the API.
Is it available?
If not is there any way to use it?

Thanks!
Re: Cherry command available? [message #1743203 is a reply to message #1743141] Tue, 13 September 2016 09:39 Go to previous messageGo to next message
Christian Halstrick is currently offline Christian HalstrickFriend
Messages: 241
Registered: July 2009
Senior Member
No, this functionality is not in JGit. I like "git cherry" functionality and sometimes use it by switching to native git for that. But up to know IIRC nobody asked for that functionality in JGit. In contrast to other missing features which can also be achieved by combining other JGit commands "git cherry" is really something new. One would have to diff the patches for all commits in the target branch to that of the commit to be "cherried?". If the patches are equal enough one could determine the commit is already in the target branch. Do you have an interest to contribute?

Ciao
Chris
Re: Cherry command available? [message #1743475 is a reply to message #1743203] Thu, 15 September 2016 18:22 Go to previous messageGo to next message
Vincent Leon is currently offline Vincent LeonFriend
Messages: 2
Registered: September 2016
Junior Member
Thanks for your reply Christian!
Indeed, I discovered this command recently, it's really neat to spot that a commit is most likely generated by a cherry-pick! It avoids to manually generate the patch-id of both commits and compare them.
I could be interested to contribute, but I do have to admit that I feel like the code is a bit hardcore xD How does it work for the contribution?

In the meantime, do you think there is a way to achieve this "cherry-pick detection"? I don't remember having seen the patch-id command neither... Or is it an option of the patch one?

[Updated on: Thu, 15 September 2016 18:24]

Report message to a moderator

Re: Cherry command available? [message #1744388 is a reply to message #1743475] Mon, 26 September 2016 12:49 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 954
Registered: July 2009
Senior Member
If you want to contribute this refer to the contributor guide for instructions how to contribute
https://wiki.eclipse.org/EGit/Contributor_Guide#Contributing_Patches
Previous Topic:Incorrect log results after merge
Next Topic:How does Eclipse/eGit connect workspace to git repo and its project metadata/source files?
Goto Forum:
  


Current Time: Fri Oct 20 18:21:30 GMT 2017

Powered by FUDForum. Page generated in 0.01905 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software