Bug 217859

Summary: git converter doesn't properly record history for svn mv's
Product: Services Reporter: Enji Cooper <ngie>
Component: Git IntegrationAssignee: Git Admin <git-admin>
Status: Closed Works As Intended    
Severity: Affects Many People CC: allanjude, emaste, garga, np
Priority: ---    
Version: unspecified   
Hardware: Any   
OS: Any   

Description Enji Cooper freebsd_committer freebsd_triage 2017-03-17 01:00:32 UTC
In ^/head@r314579, cxgbetool was moved from tools/tools/cxgbetool to usr.sbin/cxgbetool . Per svn, all of the history has been maintained [1]. Per github though, the tool didn't exist prior to ^/head@r314579 [2].

This is extremely problematic and needs to be fixed because it makes svn mv's
impossible to track.

1. https://svnweb.freebsd.org/base/head/usr.sbin/cxgbetool/cxgbetool.c?view=log
2. https://github.com/freebsd/freebsd/commits/master/usr.sbin/cxgbetool/cxgbetool.c
Comment 1 Ed Maste freebsd_committer freebsd_triage 2017-03-17 04:07:59 UTC
Git does not store metadata on renames, so there's nothing for the git converter to omit. The rename is inferred by the client if you pass the --follow option:

% git log --follow usr.sbin/cxgbetool/cxgbetool.c | head -n  30 
commit 8bbe5d5c1564b3dc90ce25249d4845b18b2fe348
Author: np <np@FreeBSD.org>
Date:   Fri Mar 3 03:11:58 2017 +0000

    Add cxgbetool(8) to the base system.
    
    Move cxgbetool from tools/tools to usr.sbin. Compile and install it on
    platforms where cxgbe(4) is built by default.  Knobs (WITH_CXGBETOOL and
    WITHOUT_CXGBETOOL) have been added so that the user can override the
    default setting.
    
    Reviewed by:    ngie@, gnn@, bdrewery@
    MFC after:      1 month
    Sponsored by:   Chelsio Communications
    Differential Revision:  https://reviews.freebsd.org/D9854

Notes:
    svn path=/head/; revision=314579

commit c2587c68b520026ccf2354b706d4e27e8042dded
Author: np <np@FreeBSD.org>
Date:   Fri Oct 7 19:13:29 2016 +0000

    cxgbetool: Add a loadcfg subcommand to allow a user to upload a firmware
    configuration file to the card.

Notes:
    svn path=/head/; revision=306823

commit 284dd5b4f8495babe92d1009a6a1fb16c114bb29
...

It seems GitHub isn't configured to use this setting in its UI.
Comment 2 Ed Maste freebsd_committer freebsd_triage 2017-03-17 04:14:38 UTC
From http://stackoverflow.com/questions/5646174/how-to-make-github-follow-directory-history-after-renames

> Note: Git 2.6.0 has been released and includes this feature. Following path changes in the log command can be enabled by setting the log.follow config option to true as in:
>
> git config log.follow true

>> Will "git --follow" functionality ever be implemented on Github? If yes, where can I track its progress?
>
> This is something a few other users have requested as well -- we might add it in the future. We currently don't have a public issue tracker, but I'll put another +1 next to it on the Feature Request Listâ„¢ for the team to see.
Comment 3 Ed Maste freebsd_committer freebsd_triage 2017-03-17 04:15:54 UTC
(In reply to Ed Maste from comment #2)

Bah, with fixed formatting:

From http://stackoverflow.com/questions/5646174/how-to-make-github-follow-directory-history-after-renames

> Note: Git 2.6.0 has been released and includes this feature. Following path
> changes in the log command can be enabled by setting the log.follow config
> option to true as in:
>
> git config log.follow true

>> Will "git --follow" functionality ever be implemented on Github? If yes,
>> where can I track its progress?
>
> This is something a few other users have requested as well -- we might add
> it in the future. We currently don't have a public issue tracker, but I'll
> put another +1 next to it on the Feature Request Listâ„¢ for the team to see.