nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] polished git repo


From: Benno Schulenberg
Subject: Re: [Nano-devel] polished git repo
Date: Thu, 18 Feb 2016 11:35:38 +0100

On Wed, Feb 17, 2016, at 21:41, Kamil Dudka wrote:
> On Wednesday, February 17, 2016 14:28:47 Mike Frysinger wrote:
> > On 17 Feb 2016 20:03, Benno Schulenberg wrote:
> > > On Tue, Feb 16, 2016, at 20:21, Mike Frysinger wrote:
> > > > the history.  for keyword expansion, it's a bit non-trivial, but for the
> > > > svn metadata in the commit message, it's easy to trim.
> > > 
> > > But when you remove that svn metadata, can git still synchronize
> > > with svn?
> 
> The sooner we stop synchronizing it with svn the better.

Yes.  But Chris still has to give his go-ahead.  And we have to choose
a moment, and first agree whether or not to include the git-svn-id tag
in the commit message.  If those tags are the only way to find a given
SVN revision in the git history, then they must stay.

> I guess many of us 
> already maintain a local git repository to access the upstream svn repository.

True.  That makes at least three of us.  :)

> Keeping it synchronized is an unpleasant work for no real benefit.

There's not much difference between doing a 'git pull' or a
'git svn rebase', except that the latter feels "unnatural" in
a git repo.

> > > If trimming that git-svn-id from the commit message is possible
> > > without losing the ability to rebase your repo (for as long as we
> > > are still using svn),
> 
> Loosing the ability to synchronize with svn is not an issue in my view.

Not when the switch to git has been made.  But until then,
Mike's repo must be able to sync.

> The info is in the commit messages in a machine-readable format, so you
> can use 'git log --grep' to look that up.

Yes, when those tags are still there.

>  I believe that by "trimming"
> Mike did not mean dropping svn id from commit messages.

I think that's exactly what Mike meant.

> > > In other words, is there a command in git that does the equivalent
> > > of 'svn diff -c nnnn'?
> 
> There is the 'git diff' command you can use to diff anything with anything.

I was going to say there is no convenient git command to look
at the diff of just one revision or commit.  But there is:

    git log -p  -1  <the-commit-id>

So... I made this little script:

----
#!/bin/sh

COMMIT=$(git log | grep -B15 "trunk/address@hidden" |
                grep ^commit | sed 's/commit //');

git log -p -n1 $COMMIT;
----

Given an SVN revision number, it will behave as 'svn diff -c',
only better (because colored, and with less invoked).

Benno

-- 
http://www.fastmail.com - Does exactly what it says on the tin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]