<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/sequencer.c, branch v2.19.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.19.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.19.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-11-21T13:58:02Z</updated>
<entry>
<title>Merge branch 'rs/sequencer-oidset-insert-avoids-dups' into maint</title>
<updated>2018-11-21T13:58:02Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-11-21T13:58:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=587b3f5d725cf118b6a58b9c974c01c26a61ec38'/>
<id>urn:sha1:587b3f5d725cf118b6a58b9c974c01c26a61ec38</id>
<content type='text'>
Code clean-up.

* rs/sequencer-oidset-insert-avoids-dups:
  sequencer: use return value of oidset_insert()
</content>
</entry>
<entry>
<title>Merge branch 'en/sequencer-empty-edit-result-aborts' into maint</title>
<updated>2018-11-21T13:57:45Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-11-21T13:57:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8ecf0c83829dab253e190db918e4ede07f0143ef'/>
<id>urn:sha1:8ecf0c83829dab253e190db918e4ede07f0143ef</id>
<content type='text'>
"git rebase" etc. in Git 2.19 fails to abort when given an empty
commit log message as result of editing, which has been corrected.

* en/sequencer-empty-edit-result-aborts:
  sequencer: fix --allow-empty-message behavior, make it smarter
</content>
</entry>
<entry>
<title>Merge branch 'js/rebase-i-autosquash-fix' into maint</title>
<updated>2018-11-21T13:57:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-11-21T13:57:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ff92463b3cdd99c59ec6fe26271617863d4d4b0c'/>
<id>urn:sha1:ff92463b3cdd99c59ec6fe26271617863d4d4b0c</id>
<content type='text'>
"git rebase -i" did not clear the state files correctly when a run
of "squash/fixup" is aborted and then the user manually amended the
commit instead, which has been corrected.

* js/rebase-i-autosquash-fix:
  rebase -i: be careful to wrap up fixup/squash chains
  rebase -i --autosquash: demonstrate a problem skipping the last squash
</content>
</entry>
<entry>
<title>Merge branch 'jk/trailer-fixes' into maint</title>
<updated>2018-11-21T13:57:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-11-21T13:57:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e293824d00c243c6a7afb15324902f693ae751e8'/>
<id>urn:sha1:e293824d00c243c6a7afb15324902f693ae751e8</id>
<content type='text'>
"git interpret-trailers" and its underlying machinery had a buggy
code that attempted to ignore patch text after commit log message,
which triggered in various codepaths that will always get the log
message alone and never get such an input.

* jk/trailer-fixes:
  append_signoff: use size_t for string offsets
  sequencer: ignore "---" divider when parsing trailers
  pretty, ref-filter: format %(trailers) with no_divider option
  interpret-trailers: allow suppressing "---" divider
  interpret-trailers: tighten check for "---" patch boundary
  trailer: pass process_trailer_opts to trailer_info_get()
  trailer: use size_t for iterating trailer list
  trailer: use size_t for string offsets
</content>
</entry>
<entry>
<title>sequencer: use return value of oidset_insert()</title>
<updated>2018-10-04T04:12:01Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2018-10-03T13:06:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6e8fc70fcefd4c362142c7d437488d3fbfdc22a8'/>
<id>urn:sha1:6e8fc70fcefd4c362142c7d437488d3fbfdc22a8</id>
<content type='text'>
oidset_insert() returns 1 if the object ID is already in the set and
doesn't add it again, or 0 if it hadn't been present.  Make use of that
fact instead of checking with an extra oidset_contains() call.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Acked-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>sequencer: fix --allow-empty-message behavior, make it smarter</title>
<updated>2018-09-13T20:25:08Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2018-09-12T21:18:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a3ec9eaf3877fbe1048f5bda37063d6d4eaf1c54'/>
<id>urn:sha1:a3ec9eaf3877fbe1048f5bda37063d6d4eaf1c54</id>
<content type='text'>
In commit b00bf1c9a8dd ("git-rebase: make --allow-empty-message the
default", 2018-06-27), several arguments were given for transplanting
empty commits without halting and asking the user for confirmation on
each commit.  These arguments were incomplete because the logic clearly
assumed the only cases under consideration were transplanting of commits
with empty messages (see the comment about "There are two sources for
commits with empty messages).  It didn't discuss or even consider
rewords, squashes, etc. where the user is explicitly asked for a new
commit message and provides an empty one.  (My bad, I totally should
have thought about that at the time, but just didn't.)

Rewords and squashes are significantly different, though, as described
by SZEDER:

    Let's suppose you start an interactive rebase, choose a commit to
    squash, save the instruction sheet, rebase fires up your editor, and
    then you notice that you mistakenly chose the wrong commit to
    squash.  What do you do, how do you abort?

    Before [that commit] you could clear the commit message, exit the
    editor, and then rebase would say "Aborting commit due to empty
    commit message.", and you get to run 'git rebase --abort', and start
    over.

    But [since that commit, ...] saving the commit message as is would
    let rebase continue and create a bunch of unnecessary objects, and
    then you would have to use the reflog to return to the pre-rebase
    state.

Also, he states:

    The instructions in the commit message template, which is shown for
    'reword' and 'squash', too, still say...

    # Please enter the commit message for your changes. Lines starting
    # with '#' will be ignored, and an empty message aborts the commit.

These are sound arguments that when editing commit messages during a
sequencer operation, that if the commit message is empty then the
operation should halt and ask the user to correct.  The arguments in
commit b00bf1c9a8dd (referenced above) still apply when transplanting
previously created commits with empty commit messages, so the sequencer
should not halt for those.

Furthermore, all rationale so far applies equally for cherry-pick as for
rebase.  Therefore, make the code default to --allow-empty-message when
transplanting an existing commit, and to default to halting when the
user is asked to edit a commit message and provides an empty one -- for
both rebase and cherry-pick.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pw/rebase-i-author-script-fix'</title>
<updated>2018-09-04T21:31:38Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-09-04T21:31:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=064e0b2d4ca76b0c438545a4d2170e589327e31f'/>
<id>urn:sha1:064e0b2d4ca76b0c438545a4d2170e589327e31f</id>
<content type='text'>
Recent "git rebase -i" update started to write bogusly formatted
author-script, with a matching broken reading code.  These are
fixed.

* pw/rebase-i-author-script-fix:
  sequencer: fix quoting in write_author_script
  sequencer: handle errors from read_author_ident()
</content>
</entry>
<entry>
<title>rebase -i: be careful to wrap up fixup/squash chains</title>
<updated>2018-09-04T15:59:33Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2018-08-31T23:45:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=10d2f35436fb350c42bdb8396aee424a9bce44b5'/>
<id>urn:sha1:10d2f35436fb350c42bdb8396aee424a9bce44b5</id>
<content type='text'>
When an interactive rebase was stopped at the end of a fixup/squash
chain, the user might have edited the commit manually before continuing
(with either `git rebase --skip` or `git rebase --continue`, it does not
really matter which).

We need to be very careful to wrap up the fixup/squash chain also in
this scenario: otherwise the next fixup/squash chain would try to pick
up where the previous one was left.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
</entry>
<entry>
<title>i18n: fix mistakes in translated strings</title>
<updated>2018-08-23T21:29:12Z</updated>
<author>
<name>Jean-Noël Avila</name>
<email>jn.avila@free.fr</email>
</author>
<published>2018-08-23T21:00:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=27c929edd6cccfbbedf2fbb8a3175bc7e01bf6c7'/>
<id>urn:sha1:27c929edd6cccfbbedf2fbb8a3175bc7e01bf6c7</id>
<content type='text'>
Fix typos and convert a question which does not expect to be replied
to a simple advice.

Signed-off-by: Jean-Noël Avila &lt;jn.avila@free.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>append_signoff: use size_t for string offsets</title>
<updated>2018-08-23T17:08:51Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2018-08-23T00:50:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=66e83d9b41f7438cb167b9bb54093ebbf0532437'/>
<id>urn:sha1:66e83d9b41f7438cb167b9bb54093ebbf0532437</id>
<content type='text'>
The append_signoff() function takes an "int" to specify the
number of bytes to ignore. Most callers just pass 0, and the
remainder use ignore_non_trailer() to skip over cruft.
That function also returns an int, and uses them internally.

On systems where size_t is larger than an int (i.e., most
64-bit systems), dealing with a ridiculously large commit
message could end up overflowing an int, producing
surprising results (e.g., returning a negative offset, which
would cause us to look outside the original string).

Let's consistently use size_t for these offsets through this
whole stack. As a bonus, this makes the meaning of
"ignore_footer" as an offset (and not a boolean) more clear.
But while we're here, let's also document the interface.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
