Thread (31 messages) flat view 31 messages, 6 authors, 2021-09-13

Re: [PATCH 0/9] remove dead shell code

From: Peter Baumann <hidden>
Date: 2021-09-02 16:53:45

On Thu, Sep 2, 2021 at 6:04 PM Ævar Arnfjörð Bjarmason [off-list ref] wrote:
Remove dead shell code in git-sh-setup, inspired by parallel
discussion on another topic (but the two don't conflict):
https://lore.kernel.org/git/87lf4f9gre.fsf@evledraar.gmail.com/ (local)

The last two patches were picked from a dropped series of mine
submitted earlier this year, it was dropped because of other more
complex patches that I haven't included here:
https://lore.kernel.org/git/20210311001447.28254-1-avarab@gmail.com/ (local)
[...]

Hm, I have scripts here, implementing some porcelain commands which
follow the same approach as
the git porcelain scripts, e.g.

  #!/bin/bash
  SUBDIRECTORY_OK=Yes
  . git-sh-setup
  require_work_tree
  require_clean_work_tree
  cd_to_toplevel || die "Can't find top level for the git repo"
  set_reflog_action my-special-script                          # this
will be broken by the patch series

I was under the impression that this is how it should be done when one
needs to write some custom git scripts.
If that is the case, then removing these functions might break some
other users scripts out there.
At least  I have a quite an old self written script here which uses
`set_reflog_action`.
Obviously I can manage and adapt the script, but the more generic
question comes to mind if sourcing git-sh-setup
by end users is the correct approach to write porcelain scripts!

-Peter
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help