Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Cleanup of menu actions "Track", "Update", "Refresh" ?

Matthias Sohn <matthias.sohn@xxxxxxxxxxxxxx> wrote:
> While closing gaps in the EGit user guide I stumbled across a neat
> collection of menu actions which seem to do
> almost (not exactly) the same stuff :
> 
>    - *Track*
>    - *Update*
>    - *Refresh*
> 
> See http://wiki.eclipse.org/EGit/User_Guide#Menu_Actions for what I
> collected from the javadoc of the
> implementing classes and by doing some experiments.
> 
> Why the heck do we need all this 3 actions ? I hope we don't add "Resolve
> conflict" as yet another action ;-)
> In native git that's all just *$ git add* or do I miss something here ?

I agree, its crazy.

I *think* the argument for these 3 actions had to do with us not
having real .gitignore support.  Normally `git add` will honor the
ignore patterns, so frequently you can just `git add .` at the top
level of your project and The Right Thing Just Happens(TM).

If we did the same thing in EGit without .gitignore support we
might wind up adding build artifacts to your index.  That would
not be apprecited by the end-user.

So "Track" was to register a new file (or files) and had to be used
explicitly to get us to add something we don't already know about.

"Update" was to stage a modified file we do already know about into
the index.  Its named after the older `git update-index` plumbing
command one had to use before `git add`.

"Refresh" I think is because we weren't always refreshing the index
timestamps with the file timestamps.  So refresh could be used to
make us realize a file is modified, or is unmodified if its content
is the same.

I think the reason we can't just have "Add" yet is we need to get
that ignore support finished.  I know we have a code review pending
for at least some of that in JGit, I unfortunately have lacked the
time [1] to read it.  :-(


[1] Buying a house, packing, moving, unpacking, starting maintenance
    on the house that the seller neglected, trying to keep up with
    $DAY_JOB, and get an intern ramped up, can kill any concept of
    "free time".  *sigh*

-- 
Shawn.


Back to the top