Re: [PATCH v3 04/12] sequencer: introduce new commands to reset the revision
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 12, 2018, 20:46 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1802122145560.35@ZVAVAG-6OXH6DA.rhebcr.pbec.zvpebfbsg.pbz>
- In-Reply-To
- <CAPig+cRVK3r2fSM77=L0zx77oBPyia_8ju79x6WJPT2U5o8e+A@mail.gmail.com>
Hi Eric,
On Mon, 12 Feb 2018, Eric Sunshine wrote:
Show 47 quoted lines
> On Sat, Feb 10, 2018 at 7:10 PM, Johannes Schindelin
> <johannes.schindelin@gmx.de> wrote:
> > [...]
> > This commit implements the commands to label, and to reset to, given
> > revisions. The syntax is:
> >
> > label <name>
> > reset <name>
> > [...]
> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> > ---
> > diff --git a/sequencer.c b/sequencer.c
> > @@ -1922,6 +1951,151 @@ static int do_exec(const char *command_line)
> > +static int safe_append(const char *filename, const char *fmt, ...)
> > +{
> > + [...]
> > + if (write_in_full(fd, buf.buf, buf.len) < 0) {
> > + error_errno(_("could not write to '%s'"), filename);
> > + rollback_lock_file(&lock);
>
> strbuf_release(&buf);
>
> > + return -1;
> > + }
> > + if (commit_lock_file(&lock) < 0) {
> > + rollback_lock_file(&lock);
>
> strbuf_release(&buf);
>
> > + return error(_("failed to finalize '%s'"), filename);
> > + }
> > +
>
> strbuf_release(&buf);
>
> > + return 0;
> > +}
> > +
> > +static int do_reset(const char *name, int len, struct replay_opts *opts)
> > +{
> > + [...]
> > + unpack_tree_opts.reset = 1;
> > +
> > + if (read_cache_unmerged())
>
> rollback_lock_file(&lock);
> strbuf_release(&ref_name);Thank you very much! I fixed these locally and force-pushed the recreate-merges branch to https://github.com/dscho/git. These fixes will be part of v4.
Ciao, Dscho