<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git.c, 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-02T02:04:53Z</updated>
<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>Merge branch 'pk/rebase-in-c'</title>
<updated>2018-11-02T02:04:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-11-02T02:04:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5ae50845d8a30d7db32e139ce04b712f9deb99cd'/>
<id>urn:sha1:5ae50845d8a30d7db32e139ce04b712f9deb99cd</id>
<content type='text'>
Rewrite of the "rebase" machinery in C.

* pk/rebase-in-c:
  builtin/rebase: support running "git rebase &lt;upstream&gt;"
  rebase: refactor common shell functions into their own file
  rebase: start implementing it as a builtin
</content>
</entry>
<entry>
<title>Merge branch 'rv/alias-help'</title>
<updated>2018-10-26T05:22:13Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-10-26T05:22:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7752999cd6bbe1aff4e34f83ed078ffffc232667'/>
<id>urn:sha1:7752999cd6bbe1aff4e34f83ed078ffffc232667</id>
<content type='text'>
"git cmd --help" when "cmd" is aliased used to only say "cmd is
aliased to ...".  Now it shows that to the standard error stream
and runs "git $cmd --help" where $cmd is the first word of the
alias expansion.

This could be misleading for those who alias a command with options
(e.g. with "[alias] cpn = cherry-pick -n", "git cpn --help" would
show the manual of "cherry-pick", and the reader would not be told
to pay close attention to the part that describes the "--no-commit"
option until closing the pager that showed the contents of the
manual, if the pager is configured to restore the original screen,
or would not be told at all, if the pager simply makes the message
on the standard error scroll away.

* rv/alias-help:
  git-help.txt: document "git help cmd" vs "git cmd --help" for aliases
  git.c: handle_alias: prepend alias info when first argument is -h
  help: redirect to aliased commands for "git cmd --help"
</content>
</entry>
<entry>
<title>Merge branch 'ts/alias-of-alias'</title>
<updated>2018-10-16T07:15:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-10-16T07:15:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=506ee60d222f94a1598769feaba3b3621bd9fa1a'/>
<id>urn:sha1:506ee60d222f94a1598769feaba3b3621bd9fa1a</id>
<content type='text'>
An alias that expands to another alias has so far been forbidden,
but now it is allowed to create such an alias.

* ts/alias-of-alias:
  t0014: introduce an alias testing suite
  alias: show the call history when an alias is looping
  alias: add support for aliases of an alias
</content>
</entry>
<entry>
<title>git.c: handle_alias: prepend alias info when first argument is -h</title>
<updated>2018-10-11T01:21:43Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>rv@rasmusvillemoes.dk</email>
</author>
<published>2018-10-09T11:59:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a9a60b94ccda5ff25faf51f39faeac11cac68346'/>
<id>urn:sha1:a9a60b94ccda5ff25faf51f39faeac11cac68346</id>
<content type='text'>
Most git commands respond to -h anywhere in the command line, or at
least as a first and lone argument, by printing the usage
information. For aliases, we can provide a little more information that
might be useful in interpreting/understanding the following output by
prepending a line telling that the command is an alias, and for what.

When one invokes a simple alias, such as "cp = cherry-pick"
with -h, this results in

$ git cp -h
'cp' is aliased to 'cherry-pick'
usage: git cherry-pick [&lt;options&gt;] &lt;commit-ish&gt;...
...

When the alias consists of more than one word, this provides the
additional benefit of informing the user which options are implicit in
using the alias, e.g. with "cp = cherry-pick -n":

$ git cp -h
'cp' is aliased to 'cherry-pick -n'
usage: git cherry-pick [&lt;options&gt;] &lt;commit-ish&gt;...
...

For shell commands, we cannot know how it responds to -h, but printing
this line to stderr should not hurt, and can help in figuring out what
is happening in a case like

$ git sc -h
'sc' is aliased to '!somecommand'
somecommand: invalid option '-h'

Suggested-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Rasmus Villemoes &lt;rv@rasmusvillemoes.dk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>rebase -i: move rebase--helper modes to rebase--interactive</title>
<updated>2018-10-09T01:44:10Z</updated>
<author>
<name>Alban Gruin</name>
<email>alban.gruin@gmail.com</email>
</author>
<published>2018-09-27T21:56:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=34b47315d9721a576b9536492cca0c11588113a2'/>
<id>urn:sha1:34b47315d9721a576b9536492cca0c11588113a2</id>
<content type='text'>
This moves the rebase--helper modes still used by
git-rebase--preserve-merges.sh (`--shorten-ids`, `--expand-ids`,
`--check-todo-list`, `--rearrange-squash` and `--add-exec-commands`) to
rebase--interactive.c.

git-rebase--preserve-merges.sh is modified accordingly, and
rebase--helper.c is removed as it is useless now.

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 git-rebase--interactive.sh</title>
<updated>2018-10-09T01:44:10Z</updated>
<author>
<name>Alban Gruin</name>
<email>alban.gruin@gmail.com</email>
</author>
<published>2018-09-27T21:56:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cf808208ec09727d993d670619c517bdcb00ca2b'/>
<id>urn:sha1:cf808208ec09727d993d670619c517bdcb00ca2b</id>
<content type='text'>
This removes git-rebase--interactive.sh, as its functionnality has been
replaced by git-rebase--interactive2.

git-rebase--interactive2.c is then renamed to git-rebase--interactive.c.

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: implement the main part of interactive rebase as a builtin</title>
<updated>2018-10-09T01:44:10Z</updated>
<author>
<name>Alban Gruin</name>
<email>alban.gruin@gmail.com</email>
</author>
<published>2018-09-27T21:56:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=53bbcfbde7c29611f16722c3fbcdb2b78718f633'/>
<id>urn:sha1:53bbcfbde7c29611f16722c3fbcdb2b78718f633</id>
<content type='text'>
This rewrites the part of interactive rebase which initializes the
basic state, make the script and complete the action, as a buitin, named
git-rebase--interactive2 for now.  Others modes (`--continue`,
`--edit-todo`, etc.) will be rewritten in the next commit.

git-rebase--interactive.sh is modified to call git-rebase--interactive2
instead of git-rebase--helper.

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>alias: show the call history when an alias is looping</title>
<updated>2018-09-17T15:50:04Z</updated>
<author>
<name>Tim Schumacher</name>
<email>timschumi@gmx.de</email>
</author>
<published>2018-09-16T07:50:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=82f71d9a5a9df718553bf257ad8610e2ef1e1179'/>
<id>urn:sha1:82f71d9a5a9df718553bf257ad8610e2ef1e1179</id>
<content type='text'>
Just printing the command that the user entered is not particularly
helpful when trying to find the alias that causes the loop.

Print the history of substituted commands to help the user find the
offending alias. Mark the entrypoint of the loop with "&lt;==" and the
last command (which looped back to the entrypoint) with "==&gt;".

Signed-off-by: Tim Schumacher &lt;timschumi@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>alias: add support for aliases of an alias</title>
<updated>2018-09-17T15:27:52Z</updated>
<author>
<name>Tim Schumacher</name>
<email>timschumi@gmx.de</email>
</author>
<published>2018-09-16T07:50:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c6d75bc17a045af8cadd2dce982f5737a5ca38bb'/>
<id>urn:sha1:c6d75bc17a045af8cadd2dce982f5737a5ca38bb</id>
<content type='text'>
Aliases can only contain non-alias git commands and their arguments,
not other user-defined aliases.  Resolving further (nested) aliases
is prevented by breaking the loop after the first alias was
processed.  Git then fails with a command-not-found error.

Allow resolving nested aliases by not breaking the loop in
run_argv() after the first alias was processed.  Instead, continue
the loop until `handle_alias()` fails, which means that there are no
further aliases that can be processed.  Prevent looping aliases by
storing substituted commands in `cmd_list` and checking if a command
has been substituted previously.

While we're at it, fix a styling issue just below the added code.

Signed-off-by: Tim Schumacher &lt;timschumi@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
