GNU bug report logs -
#34949
27.0.50; Docstring of `vc-deduce-fileset' incomplete
Previous Next
Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>
Date: Fri, 22 Mar 2019 18:04:02 UTC
Severity: minor
Tags: confirmed, fixed
Found in version 27.0.50
Fixed in version 28.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #10 received at 34949 <at> debbugs.gnu.org (full text, mbox):
Philipp Stephani <p.stephani2 <at> gmail.com> writes:
> The docstring of `vc-deduce-fileset' doesn't describe the OBSERVER
> parameter. It also doesn't explain the meaning of the return values
> FILESET-ONLY-FILES, STATE, and CHECKOUT-MODEL.
The OBSERVER thing is a long-standing issue, and people have added
comments about that parameter for decades. It now states (incorrectly):
;; FIXME: OBSERVER is unused. The name is not intuitive and is not
;; documented. It's set to t when called from diff and print-log.
(let (backend)
(cond
((derived-mode-p 'vc-dir-mode)
(vc-dir-deduce-fileset state-model-only-files))
((derived-mode-p 'dired-mode)
(if observer
(vc-dired-deduce-fileset)
(error "State changing VC operations not supported in `dired-mode'")))
But we see that it's used, and used for one thing only: If we call this
function in a dired buffer, the function will signal an error if
OBSERVER is nil. So all the callers of this function pass in t if it's
a non-state-changing operation.
Or am I reading the code wrong?
So the parameter does make some sense: OBSERVER non-nil means that it's
a non-destructive operation we're doing to do (but we only care in dired
buffers).
Having that check in this function may be a bit odd, but...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 5 years and 37 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.