On Fri, 2005-04-15 at 20:15 +0200, Petr Baudis wrote:
> Dear diary, on Fri, Apr 15, 2005 at 11:28:38AM CEST, I got a letter
> where Martin Schlemmer <[EMAIL PROTECTED]> told me that...
> > Hi,
> > 
> > The egrep regex should not escape the '{' and '}', and also add a check
> > for ' \t' so that we do not pickup stuff like '+----', etc.  Fix typo in
> > assignment.  Check if file exists in new tree before adding/removing
> > (might add support for this lowlevel to increase speed?).  Fix typo in
> > line removing temp files.
> > 
> > Signed-off-by: Martin Schlemmer <[EMAIL PROTECTED]>
> Thanks for the merge and typo fixes. I can't imagine how, but it really
> appeared to work for me that time!
> I'm confused however what does the exits_in_cache() (what exits? exists?)
> gives us, apart of horribly-looking code. What bug does it fix?

My typo it seems - should be exists.  Basically (especially for
gittrack.sh) it will add all files changed between the trees to either
the add or remove queue if this is not done.  This is because it will
just add (say git track linus; git track pasky) the git*.sh files that
is missing in the linus tree (or gitrm.sh if in reverse) although they
are already present there.  So we need to check if the file exists in
the destination tree before we git{add,rm}.sh it - if it do exists, then
its ok to gitrm.sh it, if it does not, it is ok to gitadd.sh it.

The other problem is also that if you keep switching, it will add each
file multiple times to the add/rm queue.  This is a bug with
git{add,rm}.sh which do not check the queue if the file is already
there, and it also add a file even if it is already in the cache - so it
probably need the same type of fix.  I will send a patch when we get how
we check if a file is already in the cache resolved.

Like I said in the patch, it might be better to add support low-level
side (don't know if we can have ls-tree return true/false on file basis,
else add a new tool?).


Martin Schlemmer

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to