>> Magit should only turn on auto-revert-mode for files tracked by
>> Git. It did always automatically revert these files, but used its
>> own code to do so.
>>
>> Anyway, I agree this needs some fine tuning and could be
>> improved. Doing so might take some time though.

> The main problem is that Magit does this upon loading, without even
> being used.  I think that's a bug and needs to be fixed.  The `add-hook'
> call cited by Noam above should probably be in the `magit' function, not
> at the top level, but I don't know the right way.

I do agree that having some functionality turned on by just loading
a library isn't good.  But it is also how Magit has always done it,
I just made it do so by using a built-in mode instead of the broken
code Magit used before.

I could rush out some "fix".  But since I intend to refactor the
"refresh" code anyway (and will put some though into how exactly to
do this, which takes some time) I don't really feel like doing so.
This would also come with the risk of breaking the expectations of
other users.

So there is the option `magit-turn-on-auto-revert-mode' and you are
arguing it should default to nil.  You didn't find this option on your
own even though you knew the relevant term was "auto-revert" and could
have grepped the source for it.

If I changed the default to nil then all those users who have grown
accustomed the buffers _being_ automatically refreshed would now be in
the same position you were in before.  There is no doubt someone would
report that as a regression, and some complaining would happen somewhere
on the interwebs.  I could also set the default to `undecided' and then
force everyone to make a decision, including those users who don't care.

So I think that keeping this turned on is an acceptable compromise for
the time being, considering that this only has an effect in git
repositories.  Sure magit might not be "used", but how would you check
whether magit is in used?  Check whether a magit buffer exists everytime
a file is opened?  What if there is currently no magit buffer but the
user is going to create it later, check all file visiting buffers again?
What if the last magit buffer gets killed?

What I am trying go get across is this: yes, I agree this is not optimal,
but there is no trivial way to fix it in the short run.

  Best regards,
  Jonas





-- 
You received this message because you are subscribed to the Google Groups 
"magit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to