Page MenuHomeFreeBSD
Paste P613

arcanist: failed to find commit
ArchivedPublic

Authored by jfree on Oct 15 2023, 9:19 PM.
Tags
None
Referenced Files
F69434053: arcanist: failed to find commit
Oct 15 2023, 9:19 PM
Subscribers
None
+ set -e
+ ASSUME_YES=''
+ git config --bool --get arc.assume-yes
+ echo false
+ [ false '!=' false ]
+ VERBOSE=''
+ getopts vy o
+ shift 0
+ [ 4 -ge 1 ]
+ which arc
+ which jq
+ [ '' ]
+ exec
+ verb=create
+ shift
+ [ 3 -eq 0 ]
+ git --exec-path
+ git_sh_setup=/usr/local/libexec/git-core/git-sh-setup
+ [ -f /usr/local/libexec/git-core/git-sh-setup ]
+ SUBDIRECTORY_OK=y
+ USAGE=''
+ . /usr/local/libexec/git-core/git-sh-setup
+ unset CDPATH
+ IFS=$' \t
'
+ git --exec-path
+ . /usr/local/libexec/git-core/git-sh-i18n
+ TEXTDOMAIN=git
+ export TEXTDOMAIN
+ test -z ''
+ TEXTDOMAINDIR=/usr/local/share/locale
+ export TEXTDOMAINDIR
+ GIT_INTERNAL_GETTEXT_SH_SCHEME=fallthrough
+ test -n ''
+ test -n ''
+ type gettext.sh
+ GIT_INTERNAL_GETTEXT_SH_SCHEME=gnu
+ export GIT_INTERNAL_GETTEXT_SH_SCHEME
+ . gettext.sh
+ test 'X\t' '=' 'X\t'
+ echo=echo
+ test -z ''
+ test -n ''
+ basename -- /usr/local/bin/git-arc
+ sed -e 's/-/ /'
+ dashless='git arc'
+ [ -z '' ]
+ eval_gettext 'usage: $dashless $USAGE'
+ gettext 'usage: $dashless $USAGE'
+ envsubst --variables 'usage: $dashless $USAGE'
+ export PATH dashless USAGE
+ envsubst 'usage: $dashless $USAGE'
+ LONG_USAGE='usage: git arc '
+ uname -s
+ test -z ''
+ git_dir_init
+ git rev-parse --git-dir
+ GIT_DIR=/usr/src/.git
+ [ -z y ]
+ test -n /usr/src/.git
+ cd /usr/src/.git
+ pwd
+ GIT_DIR=/usr/src/.git
+ git rev-parse --git-path objects
+ : ../../.git/objects
+ [ -n '' ]
+ [ -n '' ]
+ require_clean_work_tree create
+ git rev-parse --verify HEAD
+ git update-index -q --ignore-submodules --refresh
+ err=0
+ git diff-files --quiet --ignore-submodules
+ git diff-index --cached --quiet --ignore-submodules HEAD --
+ test 0 '=' 1
+ git config --bool --get arc.browse
+ echo false
+ [ false '!=' false ]
+ gitarc__create -r markj HEAD
+ local commit commits doprompt list o prev reviewers subscribers
+ list=''
+ prev=''
+ git config --bool --get arc.list
+ echo false
+ [ false '!=' false ]
+ doprompt=1
+ getopts lp:r:s: o
+ reviewers=markj
+ getopts lp:r:s: o
+ shift 2
+ build_commit_list HEAD
+ local chash _commits commits
+ git rev-parse HEAD
+ _commits=c4a98dcd4d1249a2836539268c28930cff2ed58b
+ git cat-file -e HEAD^{commit}
+ [ -n c4a98dcd4d1249a2836539268c28930cff2ed58b ]
+ commits=' c4a98dcd4d1249a2836539268c28930cff2ed58b'
+ echo ' c4a98dcd4d1249a2836539268c28930cff2ed58b'
+ commits=' c4a98dcd4d1249a2836539268c28930cff2ed58b'
+ [ '' ]
+ create_one_review c4a98dcd4d1249a2836539268c28930cff2ed58b markj '' '' 1
+ local childphid commit doprompt msg parent parentphid reviewers
+ local subscribers
+ commit=c4a98dcd4d1249a2836539268c28930cff2ed58b
+ reviewers=markj
+ subscribers=''
+ parent=''
+ doprompt=1
+ [ 1 ]
+ show_and_prompt c4a98dcd4d1249a2836539268c28930cff2ed58b
+ local commit
+ commit=c4a98dcd4d1249a2836539268c28930cff2ed58b
+ git show c4a98dcd4d1249a2836539268c28930cff2ed58b
commit c4a98dcd4d1249a2836539268c28930cff2ed58b (HEAD -> ff/cap_syslogd-staging, main)
Author: Jake Freeland <jfree@FreeBSD.org>
Date: Sun Oct 15 15:34:06 2023 -0500
syslogd: Keep console and tty descriptors open
Console and tty descriptors are initially opened in parse_action() to
determine whether they are valid using isatty(). That descriptor is then
closed because it is never accessed by syslogd again; ttymsg() will reopen
the tty/console under a new descriptor when needed.
If the user attempts to log to a tty that is inactive outside of
syslogd, then syslogd must keep that descriptor open so the tty remains
accessible. For example, logging to `/dev/ttyvb` requires the initial
`/dev/ttyvb` descriptor to stay open so the user can view its buffer at
any time via ctrl+alt+F12.
As a result, console and tty descriptors must remain open until a
potential configuration reload or a system shutdown. The given
descriptor will be closed in close_filed() in such circumstances.
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index 7db5bab11008..11d1033651a8 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -3053,9 +3053,6 @@ parse_action(const char *p, struct filed *f)
f->f_type = F_TTY;
(void)strlcpy(f->fu_fname, p + sizeof(_PATH_DEV) - 1,
sizeof(f->fu_fname));
- /* This will be reopened by ttymsg(). */
- close(f->f_file);
- f->f_file = -1;
} else {
(void)strlcpy(f->fu_fname, p, sizeof(f->fu_fname));
f->f_type = F_FILE;
+ prompt
+ local resp
+ [ '' ]
+ printf '\nDoes this look OK? [y/N] '
Does this look OK? [y/N] + read -r resp
y
+ return 0
+ mktemp
+ msg=/tmp/tmp.ULIv3JbmEX
+ git show -s '--format=%B' c4a98dcd4d1249a2836539268c28930cff2ed58b
+ printf '\nTest Plan:\n'
+ printf '\nReviewers:\n'
+ printf '%s\n' markj
+ printf '\nSubscribers:\n'
+ printf '%s\n' ''
+ yes
+ env 'EDITOR=true' arc diff --message-file /tmp/tmp.ULIv3JbmEX --never-apply-patches --create --allow-untracked --head c4a98dcd4d1249a2836539268c28930cff2ed58b 'c4a98dcd4d1249a2836539268c28930cff2ed58b~'
Usage Exception: Unable to find any git commit named 'c4a98dcd4d1249a2836539268c28930cff2ed58b' in this repository.
+ [ 1 -eq 0 ]
+ err 'could not create Phabricator diff'
+ warn 'could not create Phabricator diff'
+ basename /usr/local/bin/git-arc
+ echo 'git-arc: could not create Phabricator diff'
git-arc: could not create Phabricator diff
+ exit 1

Event Timeline

jfree created this object in space S1 Global.