Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » EGit safe operations
EGit safe operations [message #788224] Wed, 01 February 2012 14:18 Go to next message
Ondrej Medek is currently offline Ondrej MedekFriend
Messages: 23
Registered: July 2009
Junior Member
Hello,
is there any list of "bug free operations" with EGit? By "bug free operations" I mean I got the same result as running command line git. Of course, without any known bugs or problems.

I thing viewing history, comparing files, staging and committing if fine. But fetch, pull, rebase is making us some headache. I guess especially rebase is not doing so well as a command line git. Also, it seems to me, that command line git merge/rebase can resolve some situations which EGit shows as conflicts.

Thanks
Andy

[Updated on: Mon, 06 February 2012 08:31]

Report message to a moderator

Re: EGit save operations [message #788469 is a reply to message #788224] Wed, 01 February 2012 21:24 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin RosenbergFriend
Messages: 332
Registered: July 2009
Senior Member
Ondrej Medek skrev 2012-02-01 15.19:
> Hello,
> is there any list of "bug free operations" with EGit? By "bug free operations" I mean I got the same result as running command line git. Of course, without any known bugs
> or problems.
>
> I thing viewing history, comparing files, staging and committing if fine. But fetch, pull, rebase is making us some headache. I guess especially rebase is not doing so well
> as a command line git. Also, it seems to me, that command line git merge/rebase can resolve some situations which EGit shows as conflicts.

There is no such list, but if there is difference there should be a bug report.

As for rebase/merge, an important difference is that JGit does not have the recursive strategy
which is the default in C Git and that leads to some problems. There is another thread somewhere
regarding a possible merge bug, but without a concrete example it's hard to fix.

-- robin
Re: EGit save operations [message #788767 is a reply to message #788469] Thu, 02 February 2012 07:25 Go to previous messageGo to next message
Ondrej Medek is currently offline Ondrej MedekFriend
Messages: 23
Registered: July 2009
Junior Member
We have just migrated from Subversion to Git and we are learning git from scratch, so I cannot say what's exactly different and why yet. If so, I would for sure fill a bug report.

What about to make some place in wiki where would be main differences between current stable EGit and current stable version of command-line git? Some list like
- autocrlf = false only
- cannot handle submodules (planned for EGit x.y)
- merge, pull and reabase can do -s resolve strategy only
- etc.

So one can quickly decide when to use a command line git.
Re: EGit save operations [message #789080 is a reply to message #788767] Thu, 02 February 2012 15:29 Go to previous messageGo to next message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
I've been keeping my own notes on egit (in a github repo), including features that aren't supported or don't work exactly as they would in Git. Here's my list:


- JGit does not yet support 'stash'. This is planned for the final
1.3 release. Simple stash/unstash can be handled with an external
launcher using command-line Git.

- JGit does not support any SVN bridging operations and there are
no plans to add it. The most common ones (svn rebase, svn fetch,
svn dcommit) can be handled with external launchers.

- JGit does not support bundles in any way - thet can't be created
pulled, or queried. There are no current plans to add bundle support.

- The only supported merge strategy is 'resolve'. Since the
default strategy in command-line Git is 'recursive'in the
most common case (pulling or merging one branch) you might
well get different behavior from an egit merge or pull.

- JGit is also missing support for a number of configuration settings,
including most of the ones related to merging. It also lacks support
for 'core.autocrlf', which is is important for cross-platform development.
This is planned for 1.3.

- Hooks are not currently supported.

- Submodules are not currently supported.

- When a directory is deleted from the working set, JGit will
immediately remove it from the working tree and stage the
deletion of the files. If you want to undo this you must
manually recreate the deleted directory first. At that
point you can use standard egit tools to recover the deleted
files. [this one might be obsolete]
Re: EGit save operations [message #789120 is a reply to message #789080] Thu, 02 February 2012 16:17 Go to previous messageGo to next message
Ondrej Medek is currently offline Ondrej MedekFriend
Messages: 23
Registered: July 2009
Junior Member
Yep, that's exactly what I was looking for. So I have copy&pasted it here http://wiki.eclipse.org/EGit/Differences_to_Git
Re: EGit save operations [message #789294 is a reply to message #789120] Thu, 02 February 2012 20:31 Go to previous messageGo to next message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
Fwiw my notes repo is:

https://github.com/reshapiro/DVCS

There are odds and ends in here, including extended arguments re: advantages of distributed version control, some notes on Mercurial, pointers to Git references etc etc.

For this audience the file of interest is:

https://github.com/reshapiro/DVCS/blob/master/git/egit-notes.txt

This includes the missing features listed earlier as well as some explanations of how egit operations map to standard Git operations. This is mostly for my own use and for getting co-workers going with egit. It hasn't been exposed to the public before now, I'm sure there are mistakes of various kinds...

Re: EGit save operations [message #789653 is a reply to message #789294] Fri, 03 February 2012 08:31 Go to previous messageGo to next message
Ondrej Medek is currently offline Ondrej MedekFriend
Messages: 23
Registered: July 2009
Junior Member
Nice, I have added a link to your notes to http://wiki.eclipse.org/EGit/Differences_to_Git
Re: EGit save operations [message #789797 is a reply to message #789653] Fri, 03 February 2012 12:22 Go to previous messageGo to next message
Harry Houdini is currently offline Harry HoudiniFriend
Messages: 142
Registered: February 2010
Senior Member
Your text is very useful, R Shapiro.
Thanks.

[Updated on: Fri, 03 February 2012 12:22]

Report message to a moderator

Re: EGit save operations [message #789924 is a reply to message #789797] Fri, 03 February 2012 15:29 Go to previous messageGo to next message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
Glad you found it useful, please let me know about errors or omissions.

Here are a few more common Git operations that I believe are not supported by egit:

- Creating light-weight tags

- Aborting an incomplete merge

- Deleting a remote branch
Re: EGit save operations [message #791235 is a reply to message #789924] Sun, 05 February 2012 13:59 Go to previous messageGo to next message
Manuel Doninger is currently offline Manuel DoningerFriend
Messages: 119
Registered: October 2010
Senior Member
Deleting a remote branch is possible in the Push dialog. Choose the reference you want to delete in the drop down named "Remote ref to delete" and add that spec.

Re: EGit save operations [message #791280 is a reply to message #791235] Sun, 05 February 2012 15:27 Go to previous messageGo to next message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
That's pretty well hidden Smile Can't get there from the 'Push' item in the 'Git' menubar menu, or the toolbar. It's only available on the right-click menu of the repository in the Git Repositories view, and under 'Team -> Remote'.


I updated https://github.com/reshapiro/DVCS/blob/master/git/egit-notes.txt accordingly.

[Updated on: Sun, 05 February 2012 16:06]

Report message to a moderator

Re: EGit save operations [message #791769 is a reply to message #791280] Mon, 06 February 2012 08:38 Go to previous messageGo to next message
Ondrej Medek is currently offline Ondrej MedekFriend
Messages: 23
Registered: July 2009
Junior Member
Thanks, R Shapiro. The list is growing Sad I've updated the http://wiki.eclipse.org/EGit/Differences_to_Git, too.

Re: EGit save operations [message #793776 is a reply to message #791769] Wed, 08 February 2012 14:56 Go to previous messageGo to next message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
One more fairly common operation that I believe is currently unsupported: 'reset' applied to a file or directory (as opposed to a branch, which is supported).

I mention these missing features just so they're on the record. The egit/jgit plugin is way better in this respect than the plugins I've seen in some other IDEs, for instance Intellij IDEA and XCode.
Re: EGit save operations [message #793781 is a reply to message #793776] Wed, 08 February 2012 15:03 Go to previous messageGo to next message
Manuel Doninger is currently offline Manuel DoningerFriend
Messages: 119
Registered: October 2010
Senior Member
The applicable feature is "Replace with", on right click on the resource (project, directory, file). It's called this way because of similar naming of other Eclipse team providers (subversion, CVS).

[Updated on: Wed, 08 February 2012 15:04]

Report message to a moderator

Re: EGit save operations [message #793793 is a reply to message #793781] Wed, 08 February 2012 15:21 Go to previous messageGo to next message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
"Replace With..." is different. It's semantically closer to
git checkout <commit> -- <file>
than it is to
git reset <commit> -- <file>


Also, it doesn't support directories at all.

Re: EGit save operations [message #794372 is a reply to message #793781] Thu, 09 February 2012 07:54 Go to previous messageGo to next message
Ondrej Medek is currently offline Ondrej MedekFriend
Messages: 23
Registered: July 2009
Junior Member
IMHO it's better to name operations like in C Git. I.e. if C Git has git reset file, i would expect a functionality names like "Reset file".
Re: EGit save operations [message #797668 is a reply to message #793793] Mon, 13 February 2012 19:26 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
"git replace [<commit>]-- <path>" does the opposite of "git add -- <path>",
i.e. it only touches the index of the files matching <path> resetting it
to <commit> or HEAD if no commit is specified.

In the EGit Staging View the action "Remove from Git Index" allows to reset selected
staged files to HEAD. Resetting to a commit isn't yet supported by EGit.

On the other hand "Replace with" is the EGit equivalent for "git checkout [<commit>] -- <path>"
Re: EGit save operations [message #797694 is a reply to message #797668] Mon, 13 February 2012 20:13 Go to previous messageGo to next message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
I think we're now in agreement. but just to summarize:

"git checkout <commit> -- <path>" is supported as long as <path> is a file (as opposed to a directory). The relevant egit operation is in "Replace With..."

"git reset <commit> -- <path>" is not supported except for the special case of resetting a file to HEAD. The relevant egit operation is drag-and-drop from "Staged Changes" to "Unstaged Changes" in the Git Staging view (or equivalently, selecting "Remove From Git Index" on the right-click popup in "Staged Changes").

Re: EGit save operations [message #797772 is a reply to message #797668] Mon, 13 February 2012 21:56 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin RosenbergFriend
Messages: 332
Registered: July 2009
Senior Member
Matthias Sohn skrev 2012-02-13 20.26:
> "git replace [<commit>]-- <path>" does the opposite of "git add -- <path>", i.e. it only touches the index of the files matching <path> resetting it to <commit> or HEAD if
> no commit is specified.

Typo?

Git replace is an improved graft and has nothing to do with Replace with.. in Eclipse.

-- robin


> In the EGit Staging View the action "Remove from Git Index" allows to reset selected staged files to HEAD. Resetting to a commit isn't yet supported by EGit.
>
> On the other hand "Replace with" is the EGit equivalent for "git checkout [<commit>] -- <path>"
Re: EGit save operations [message #797777 is a reply to message #797772] Mon, 13 February 2012 22:05 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
oops, yes this is a typo, I meant "git reset [<commit>] -- <path>" instead of "git replace ..."
Previous Topic:How to retrieve commit messages between two tags
Next Topic:Markers for unstaged/staged changes
Goto Forum:
  


Current Time: Thu Apr 18 23:05:01 GMT 2024

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

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

Back to the top