← Back to team overview

kicad-developers team mailing list archive

Re: Git transition

 

I understand that many people will be using the Bzr UI tools, but Git is
very good at enabling digging in the history using the command line.

I have a handy Git alias which shows me a condensed version of the history
(it's actually coloured in my terminal, so it's really clear what's going on):

* 9f5f0ab (upstream/master) Minor OpenGL GAL code changes
| * 53b2afd (HEAD -> master) Fix .gitconfig syntax
|/
* 7bc8cb5 Fix bug: Impossible to rescale 3D models

The alias is

lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all

lol shows only current or specified branches, lola shows all branches, as above.
>From [1]. Very handy for scanning though and seeing where you are, and can be
piped to grep. You can modify the alias to also print the commit
author name too,
if you like:

lolc = log --graph --decorate --pretty='format:%h %d [%cn] %s' --abbrev-commit

Obviously there are tons of format/print options. So, as Adam was saying,
it is very easy to see what has changed without using email as a middleman, or
having to deal with the full git log.

You also have the --grep options for git log for looking for text in
commit messages,
not to mention -S and -G which only show commits that change the number of
occurrences of a string or contain text within changed lines respectively.

What makes Git so attractive to me is the interactive rebase which means you can
juggle and squash commits extremely easily before sending off. That,
to me, is the
killer feature of Git over Bzr. It provides enormous flexibility to
the developer,
and greatly helps in producing logical commit histories, because you can rebase
unrelated tweaks out as you go along.

The speed helps too!

Cheers,

John

[1] http://blog.kfish.org/2010/04/git-lola.html#!

On Tue, Aug 9, 2016 at 1:02 AM, Chris Pavlina <pavlina.chris@xxxxxxxxx> wrote:
> Well, I can't help with getting email notifications, but I don't
> understand why logs are being grepped either. Getting a summary of
> changes since the last update should be as simple as 'git fetch'
> followed by something like 'git log master..origin/master', and you'll
> get it in a nice summary form :P
>
> Personally I'd go insane if I got an email for every commit ^_^
>
>
> On Mon, Aug 08, 2016 at 12:48:27PM -0400, Wayne Stambaugh wrote:
>> On 8/8/2016 12:23 PM, Chris Pavlina wrote:
>> > Well, we're not looking at Github anymore, right? Just Git on Launchpad?
>> > So the pull request thing doesn't matter.
>> >
>> > We use Stash (Bitbucket) at work, it seems to give much better control.
>> > GitLab is also popular. I really, really want to see us switch to git,
>> > as do many others, but I don't really care about GitHub and I think I'm
>> > not entirely alone. Git is wonderful; GitHub is just a git service, and
>> > honestly a bit of a mediocre one.
>> >
>> > I think there is an advantage to us being on GitHub which is the
>> > community exposure, since it's large and popular. The pull requests are
>> > a side effect of that, one comes with the other. I think we wouldn't
>> > really have a problem closing out frivolous PRs anyway. Also, there are
>> > multiple bots that you can use to "disable" PRs by automatically closing
>> > them, if you really want.
>> >
>> > I'm not sure what sort of notifications you're talking about, but
>> > there's probably already an easy way to do whatever it is you want with
>> > git, without tedious log-grepping. What are Launchpad's notifications
>> > like?
>>
>> Anyone subscribed to lp:kicad will get an email notification of the
>> commit log entry and if the diff is less than 10K (I think) will also
>> get the diff as an attachment when a commit to lp:kicad.  The last time
>> I looked at the implementation status of git on LP, that still wasn't
>> complete unless I am misunderstanding what work they still have left to do.
>>
>> >
>> > On Mon, Aug 08, 2016 at 12:09:34PM -0400, Wayne Stambaugh wrote:
>> >> The last time I looked, notifications of repo commits still were not
>> >> implemented.  This is a show stopper for me.  I don't want to have to
>> >> constantly grep the git commit log to see what changed.  If change
>> >> notifications are working correctly, then I'm OK with moving forward on
>> >> this if you can get the bug fix linking working.  We definitely should
>> >> do some testing before we go live with this.
>> >>
>> >> Before every starts beating the GitHub drum, I have one major issue with
>> >> GitHub and that is control.  There is no way that I know of to moderate
>> >> a project on github.  Anyone with a github account can submit a pull
>> >> requests at anytime even if they are not part of the dev team.  As
>> >> project leader, this is an issue.  I'm already a my limit with the
>> >> development team we have in place and I really don't want to deal with a
>> >> wide open code hosting.  I also have no way of removing someone from the
>> >> list should I need to.  I know it hasn't happened yet but I am not naive
>> >> enough to think that it wont happen.  At this time, I am more
>> >> comfortable with LP until something better comes along or we take full
>> >> control a provide our own hosting.
>> >>
>> >> On 8/8/2016 3:58 AM, Maciej Sumiński wrote:
>> >>> Apparently we have not discussed git transition for a long time now, so
>> >>> I felt it is the right time to raise the subject again to keep our routine.
>> >>>
>> >>> Launchpad now supports merge proposals [1] and it looks like they are
>> >>> still improving git integration. The only missing feature are links
>> >>> between bug fixing commits and respective bug reports (bzr commit ...
>> >>> --fixes=lp:123456). It is not supported by git itself, but might be
>> >>> resolved using webhooks [2] and appropriate keywords in commit messages
>> >>> (e.g. "Fixed a memory leak [fixes #123456]"). If this is the only
>> >>> obstacle, then I volunteer to provide code for the hook.
>> >>>
>> >>> What do you think? Is there anything else that prevents transition?
>> >>>
>> >>> Regards,
>> >>> Orson
>> >>>
>> >>> 1. https://help.launchpad.net/Code/Git
>> >>> 2. https://help.launchpad.net/API/Webhooks
>> >>>
>> >>>
>> >>>
>> >>> _______________________________________________
>> >>> Mailing list: https://launchpad.net/~kicad-developers
>> >>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> >>> Unsubscribe : https://launchpad.net/~kicad-developers
>> >>> More help   : https://help.launchpad.net/ListHelp
>> >>>
>> >>
>> >> _______________________________________________
>> >> Mailing list: https://launchpad.net/~kicad-developers
>> >> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> >> Unsubscribe : https://launchpad.net/~kicad-developers
>> >> More help   : https://help.launchpad.net/ListHelp
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp


References