<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/sequencer.h, branch v2.20.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.20.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.20.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-11-13T13:37:23Z</updated>
<entry>
<title>Merge branch 'pw/am-rebase-read-author-script'</title>
<updated>2018-11-13T13:37:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-11-13T13:37:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6b2a52431b238fc3c25ea931def6e5b1cf9e78fb'/>
<id>urn:sha1:6b2a52431b238fc3c25ea931def6e5b1cf9e78fb</id>
<content type='text'>
Unify code to read the author-script used in "git am" and the
commands that use the sequencer machinery, e.g. "git rebase -i".

* pw/am-rebase-read-author-script:
  sequencer: use read_author_script()
  add read_author_script() to libgit
  am: rename read_author_script()
  am: improve author-script error reporting
  am: don't die in read_author_script()
</content>
</entry>
<entry>
<title>Merge branch 'ag/rebase-i-in-c'</title>
<updated>2018-11-02T02:04:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-11-02T02:04:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b49ef560ed66449d24a3fdfe25972c390bb44951'/>
<id>urn:sha1:b49ef560ed66449d24a3fdfe25972c390bb44951</id>
<content type='text'>
Rewrite of the remaining "rebase -i" machinery in C.

* ag/rebase-i-in-c:
  rebase -i: move rebase--helper modes to rebase--interactive
  rebase -i: remove git-rebase--interactive.sh
  rebase--interactive2: rewrite the submodes of interactive rebase in C
  rebase -i: implement the main part of interactive rebase as a builtin
  rebase -i: rewrite init_basic_state() in C
  rebase -i: rewrite write_basic_state() in C
  rebase -i: rewrite the rest of init_revisions_and_shortrevisions() in C
  rebase -i: implement the logic to initialize $revisions in C
  rebase -i: remove unused modes and functions
  rebase -i: rewrite complete_action() in C
  t3404: todo list with commented-out commands only aborts
  sequencer: change the way skip_unnecessary_picks() returns its result
  sequencer: refactor append_todo_help() to write its message to a buffer
  rebase -i: rewrite checkout_onto() in C
  rebase -i: rewrite setup_reflog_action() in C
  sequencer: add a new function to silence a command, except if it fails
  rebase -i: rewrite the edit-todo functionality in C
  editor: add a function to launch the sequence editor
  rebase -i: rewrite append_todo_help() in C
  sequencer: make three functions and an enum from sequencer.c public
</content>
</entry>
<entry>
<title>add read_author_script() to libgit</title>
<updated>2018-11-01T03:08:06Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2018-10-31T10:15:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bcd33ec25f28514776f3b17af6a5a80b1f329f81'/>
<id>urn:sha1:bcd33ec25f28514776f3b17af6a5a80b1f329f81</id>
<content type='text'>
Add read_author_script() to sequencer.c based on the implementation in
builtin/am.c and update read_am_author_script() to use
read_author_script(). The sequencer code that reads the author script
will be updated in the next commit.

Signed-off-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/trailer-fixes'</title>
<updated>2018-09-17T20:53:54Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-09-17T20:53:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fba9654364a523bf146df26052ab05dd52c1d719'/>
<id>urn:sha1:fba9654364a523bf146df26052ab05dd52c1d719</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>rebase -i: rewrite write_basic_state() in C</title>
<updated>2018-08-29T20:38:18Z</updated>
<author>
<name>Alban Gruin</name>
<email>alban.gruin@gmail.com</email>
</author>
<published>2018-08-28T12:10:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=65850686cf072d6de88880247adb7113db8a52f2'/>
<id>urn:sha1:65850686cf072d6de88880247adb7113db8a52f2</id>
<content type='text'>
This rewrites write_basic_state() from git-rebase.sh in C.  This is the
first step in the conversion of init_basic_state(), hence the mode in
rebase--helper.c is called INIT_BASIC_STATE.  init_basic_state() will be
converted in the next commit.

The part of read_strategy_opts() that parses the stategy options is
moved to a new function to allow its use in rebase--helper.c.

Finally, the call to write_basic_state() is removed from
git-rebase--interactive.sh, replaced by a call to `--init-basic-state`.

Signed-off-by: Alban Gruin &lt;alban.gruin@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>rebase -i: remove unused modes and functions</title>
<updated>2018-08-29T20:38:18Z</updated>
<author>
<name>Alban Gruin</name>
<email>alban.gruin@gmail.com</email>
</author>
<published>2018-08-28T12:10:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=91f0d95dcb4dd9c388881b64a7d79a3809927126'/>
<id>urn:sha1:91f0d95dcb4dd9c388881b64a7d79a3809927126</id>
<content type='text'>
This removes the modes `--skip-unnecessary-picks`, `--append-todo-help`,
and `--checkout-onto` from rebase--helper.c, the functions of
git-rebase--interactive.sh that were rendered useless by the rewrite of
complete_action(), and append_todo_help_to_file() from
rebase-interactive.c.

skip_unnecessary_picks() and checkout_onto() becomes static, as they are
only used inside of the sequencer.

Signed-off-by: Alban Gruin &lt;alban.gruin@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>rebase -i: rewrite complete_action() in C</title>
<updated>2018-08-29T20:38:18Z</updated>
<author>
<name>Alban Gruin</name>
<email>alban.gruin@gmail.com</email>
</author>
<published>2018-08-28T12:10:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b97e187364990fb8410355ff8b4365d0e37bbbbe'/>
<id>urn:sha1:b97e187364990fb8410355ff8b4365d0e37bbbbe</id>
<content type='text'>
This rewrites complete_action() from shell to C.

A new mode is added to rebase--helper (`--complete-action`), as well as
a new flag (`--autosquash`).

Finally, complete_action() is stripped from git-rebase--interactive.sh.

The original complete_action() would return the code 2 when the todo
list contained no actions.  This was a special case for rebase -i and
-p; git-rebase.sh would then apply the autostash, delete the state
directory, and die with the message "Nothing to do".  This cleanup is
rewritten in C instead of returning 2.  As rebase -i no longer returns
2, the comment describing this behaviour in git-rebase.sh is updated to
reflect this change.

The message "Nothing to do" is now printed with error(), and so becomes
"error: nothing to do".  Some tests in t3404 check this value, so they
are updated to fit this change.

The first check might seem useless as we write "noop" to the todo list
if it is empty.  Actually, the todo list might contain commented
commands (ie. empty commits).  In this case, complete_action() won’t
write "noop", and will abort without starting the editor.

Signed-off-by: Alban Gruin &lt;alban.gruin@gmail.com&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>
<entry>
<title>Add missing includes and forward declarations</title>
<updated>2018-08-15T18:52:09Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2018-08-15T17:54:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ef3ca95475ce467ae883cc8175ed40e6f7d27800'/>
<id>urn:sha1:ef3ca95475ce467ae883cc8175ed40e6f7d27800</id>
<content type='text'>
I looped over the toplevel header files, creating a temporary two-line C
program for each consisting of
  #include "git-compat-util.h"
  #include $HEADER
This patch is the result of manually fixing errors in compiling those
tiny programs.

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>sequencer: change the way skip_unnecessary_picks() returns its result</title>
<updated>2018-08-10T18:56:22Z</updated>
<author>
<name>Alban Gruin</name>
<email>alban.gruin@gmail.com</email>
</author>
<published>2018-08-10T16:51:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d4ed5d7713c779487a52d30e83185a056c4bf023'/>
<id>urn:sha1:d4ed5d7713c779487a52d30e83185a056c4bf023</id>
<content type='text'>
Instead of skip_unnecessary_picks() printing its result to stdout, it
returns it into a struct object_id, as the rewrite of complete_action()
(to come in the next commit) will need it.

rebase--helper then is modified to fit this change.

Signed-off-by: Alban Gruin &lt;alban.gruin@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
