By the way I improved this gtmp method since, so that it prepares a
commit message which makes the history clearer (at least to a human)

function gtmp
{
    cd ~/sage
    git checkout d
    rel="$(git log --oneline d ^d~1 | sed s/.*\ //g)"
    tn="$(echo "$1" | grep -o "[0-9]*")"
    echo "==========================="
    echo "trac #$tn: Merged with $rel"
    echo "==========================="
    git branch -D tmp
    git checkout -b tmp d &&
    git pull trac "$1"
}

Example :

~/sage$ gtmp u/ncohen/16347
Switched to branch 'd'
Your branch is up-to-date with 'trac/develop'.
===========================
trac #16347: Merged with 6.3.beta2
===========================
Deleted branch tmp (was 27f6c9a).
Switched to a new branch 'tmp'
>From trac.sagemath.org:sage
 * branch            u/ncohen/16347 -> FETCH_HEAD
....

And then I copy/paste this commit message... As I found no easy way to
make it the default commit message :-)

Nathann

On 31 May 2014 15:52, Nathann Cohen <nathann.co...@gmail.com> wrote:
>> There is nothing wrong with merges
>>
>> * if you need them
>> * if the original branch is the first parent.
>>
>> Doing it the wrong way makes the history more difficult to understand, and
>> we shouldn't teach or facilitate that antipattern.
>
> That's my question from last november :
> https://groups.google.com/d/msg/sage-git/Nokq-kVfONc/e9RMBUvl7ygJ
>
> that's your answer from then :
> https://groups.google.com/d/msg/sage-git/Nokq-kVfONc/sDoYyZOQHY0J
>
> By the way, given that with this trick I can avoi recompiling Sage for
> hours, I still think that it is the right way to work.
>
> Nathann

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to