[Kde-scm-interest] Git history
Thomas McGuire
thomas at kdab.com
Sun Mar 28 15:29:20 CEST 2010
Hi,
On Sunday 28 March 2010 09:42:09 Thiago Macieira wrote:
> Em Domingo 28. Março 2010, às 08.54.02, Torgny Nyblom escreveu:
> > Currently I've been unable to find a way to get git to follow history
> > correct when a sub directory has been moved across a module border and
> > has been renamed at the same time, for instance kdepim/akonadi/libakonadi
> > -> kdepimlibs/akonadi at r788342. The history is there but git cannot
> > follow the current HEAD backwards across the border.
>
> That's how Git works. Never mind the issue.
What do you mean with that? Essentially all history is gone, since even git
log -C -C --follow can't access it. Surely this is just a problem with
svn2git?
This is what I get for akonadi/item.cpp in kdepimlibs:
> git log -C -C --follow akonadi/item.cpp
> [..]
> commit e4adcdabf0046389fbefd9c46b29c7d5a62dff40
> Author: Tobias Koenig <tokoe at kde dot org>
> Date: Fri Mar 21 12:03:58 2008 +0000
>
> Welcome libakonadi-kde to kdepimlibs!
>
> svn path=/trunk/KDE/kdepimlibs/; revision=788342
> git whatchanged -n1 e4adcdabf0046389fbefd9c46b29c7d5a62dff40 | grep item.cpp
> :000000 100644 0000000... 12f753b... A akonadi/item.cpp
This shows that the move history of e4adcdabf0046389fbefd9c46b29c7d5a62dff40
is not complete, it should have "D libakonadi/item.cpp" in it, shouldn't it?
So I wondered and where libakonadi/item.cpp was deleted:
> git whatchanged | grep -B100 "libakonadi/item.cpp"
> commit ef0d005a9a098c8f56887bd76db560f796c4f480
> Author: Volker Krause <vkrause at kde dot org>
> Date: Fri Mar 21 14:17:58 2008 +0000
>
> Moved to pimlibs.
>
> svn path=/trunk/KDE/kdepim/akonadi/; revision=788412
> [..]
> :100644 000000 12f753b... 0000000... D libakonadi/item.cpp
So I think svn2git got confused here because the move of libakonadi was done
in two steps:
1. kdepim/libakonadi was _copied_ to kdepimlibs/akonadi
3. some changes to kdepimlibs/akonadi
3. kdepim/libakonadi was deleted
Now, the interesting thing:
Running "git blame -C -C akonadi/item.cpp" somehow still manages to detect the
history, I see commits before Mar 21 12:03:58 2008 there, when the file was
still named libakonadi/item.cpp.
Can the Git history be somehow modified so that the D and the A are in the
same Git commit? With that, git log -C -C --follow would probably be able to
find it, and this would be less confusing.
Regards,
Thomas
--
Thomas McGuire | thomas at kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel. Germany +49-30-521325470, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-scm-interest/attachments/20100328/a383f620/attachment.sig
More information about the Kde-scm-interest
mailing list