* scratch branches in Gnu Elpa
@ 2018-10-18 17:47 Michael Heerdegen
2018-10-19 1:07 ` Stefan Monnier
0 siblings, 1 reply; 4+ messages in thread
From: Michael Heerdegen @ 2018-10-18 17:47 UTC (permalink / raw)
To: Emacs Development
Hello,
when I add a branch under scratch/ in Gnu Elpa, I can do there what I
want, right? I mean, including history rewriting stuff, in particular.
What I intend to do is to provide a preview or "developer" version of
el-search that corresponds to the version on my hard disc, to enable
people to check whether a bug is fixed there and such things.
I typically test new features locally quite some time before I upload
them to Gnu Elpa.
Thanks,
Michael.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: scratch branches in Gnu Elpa
2018-10-18 17:47 scratch branches in Gnu Elpa Michael Heerdegen
@ 2018-10-19 1:07 ` Stefan Monnier
2018-10-19 22:14 ` Michael Heerdegen
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2018-10-19 1:07 UTC (permalink / raw)
To: emacs-devel
> when I add a branch under scratch/ in Gnu Elpa, I can do there what I
> want, right? I mean, including history rewriting stuff, in particular.
Yes.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: scratch branches in Gnu Elpa
2018-10-19 1:07 ` Stefan Monnier
@ 2018-10-19 22:14 ` Michael Heerdegen
2018-10-20 1:55 ` Stefan Monnier
0 siblings, 1 reply; 4+ messages in thread
From: Michael Heerdegen @ 2018-10-19 22:14 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> > when I add a branch under scratch/ in Gnu Elpa, I can do there what I
> > want, right? I mean, including history rewriting stuff, in particular.
>
> Yes.
Thanks, but the server denies non-fast-forward pushes of my scratch
branch even when forced (log from Magit):
| 1 git … push -v --force --no-verify origin scratch/mheerdegen-preview\:refs/heads/scratch/mheerdegen-preview
| Pushing to mheerdegen@git.sv.gnu.org:/srv/git/emacs/elpa.git
| Writing objects: 100% (165/165), 105.27 KiB | 4.58 MiB/s, done.
| Total 165 (delta 119), reused 9 (delta 5)
| remote: error: denying non-fast-forward refs/heads/scratch/mheerdegen-preview (you should pull first)
| To git.sv.gnu.org:/srv/git/emacs/elpa.git
| ! [remote rejected] scratch/mheerdegen-preview -> scratch/mheerdegen-preview (non-fast-forward)
| error: failed to push some refs to 'mheerdegen@git.sv.gnu.org:/srv/git/emacs/elpa.git'
Why is that?
While we are here: I use a pre-push hook script like the following to
make pushing fail when a commit message starts with "WIP" (to protect me
from myself). Sorry for my ignorance - how can I change this script so
that /scratch branches are not treated (I'm not good in writing
bash)?
#+begin_src emacs-lisp
remote="$1"
url="$2"
z40=0000000000000000000000000000000000000000
IFS=' '
while read local_ref local_sha remote_ref remote_sha
do
if [ "$local_sha" = $z40 ]
then
# Handle delete
:
else
if [ "$remote_sha" = $z40 ]
then
# New branch, examine all commits
range="$local_sha"
else
# Update to existing branch, examine new commits
range="$remote_sha..$local_sha"
fi
# Check for WIP commit
#commit=`git rev-list -n 1 --grep '^WIP' "$range"`
commit=`git rev-list -n 1 --grep '^WIP' "$range"`
if [ -n "$commit" ]
then
echo "Found WIP commit in $local_ref, not pushing"
exit 1
fi
fi
done
exit 0
#+end_src
TIA,
Michael.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: scratch branches in Gnu Elpa
2018-10-19 22:14 ` Michael Heerdegen
@ 2018-10-20 1:55 ` Stefan Monnier
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2018-10-20 1:55 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: emacs-devel
>> > when I add a branch under scratch/ in Gnu Elpa, I can do there what I
>> > want, right? I mean, including history rewriting stuff, in particular.
>> Yes.
> Thanks, but the server denies non-fast-forward pushes of my scratch
> branch even when forced (log from Magit):
It generally doesn't allow it, indeed. You can still do it by deleting
the branch and then pushing a new branch under the same name.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-10-20 1:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-18 17:47 scratch branches in Gnu Elpa Michael Heerdegen
2018-10-19 1:07 ` Stefan Monnier
2018-10-19 22:14 ` Michael Heerdegen
2018-10-20 1:55 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.