git/builtin
Christian Couder 7b644c8c5a rev-list: allow missing tips with --missing=[print|allow*]
In 9830926c7d (rev-list: add commit object support in `--missing`
option, 2023-10-27) we fixed the `--missing` option in `git rev-list`
so that it works with with missing commits, not just blobs/trees.

Unfortunately, such a command would still fail with a "fatal: bad
object <oid>" if it is passed a missing commit, blob or tree as an
argument (before the rev walking even begins).

When such a command is used to find the dependencies of some objects,
for example the dependencies of quarantined objects (see the
"QUARANTINE ENVIRONMENT" section in the git-receive-pack(1)
documentation), it would be better if the command would instead
consider such missing objects, especially commits, in the same way as
other missing objects.

If, for example `--missing=print` is used, it would be nice for some
use cases if the missing tips passed as arguments were reported in
the same way as other missing objects instead of the command just
failing.

We could introduce a new option to make it work like this, but most
users are likely to prefer the command to have this behavior as the
default one. Introducing a new option would require another dumb loop
to look for that option early, which isn't nice.

Also we made `git rev-list` work with missing commits very recently
and the command is most often passed commits as arguments. So let's
consider this as a bug fix related to these recent changes.

While at it let's add a NEEDSWORK comment to say that we should get
rid of the existing ugly dumb loops that parse the
`--exclude-promisor-objects` and `--missing=...` options early.

Helped-by: Linus Arver <linusa@google.com>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-14 09:39:14 -08:00
..
add.c Merge branch 'en/header-cleanup' 2024-01-08 14:05:15 -08:00
am.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
annotate.c
apply.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
archive.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:33 -08:00
bisect.c Merge branch 'en/header-cleanup' 2024-01-08 14:05:15 -08:00
blame.c Merge branch 'en/header-cleanup' 2024-01-08 14:05:15 -08:00
branch.c branch: make the advice to force-deleting a conditional one 2024-01-11 17:15:54 -08:00
bugreport.c bugreport: reject positional arguments 2023-10-29 08:56:17 +09:00
bundle.c
cat-file.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
check-attr.c
check-ignore.c
check-mailmap.c
check-ref-format.c
checkout--worker.c
checkout-index.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
checkout.c Merge branch 'en/header-cleanup' 2024-01-08 14:05:15 -08:00
clean.c clean: factorize incompatibility message 2023-12-09 07:41:03 +09:00
clone.c Merge branch 'ps/refstorage-extension' 2024-01-16 10:11:57 -08:00
column.c Merge branch 'rs/column-leakfix' 2023-12-18 14:10:13 -08:00
commit-graph.c Merge branch 'ja/doc-placeholders-fix' 2024-02-08 13:20:34 -08:00
commit-tree.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
commit.c refs: convert MERGE_AUTOSTASH to become a normal pseudo-ref 2024-01-19 11:10:41 -08:00
config.c config: add back code comment 2024-01-29 10:27:53 -08:00
count-objects.c
credential-cache--daemon.c
credential-cache.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
credential-store.c
credential.c
describe.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
diagnose.c
diff-files.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
diff-index.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
diff-tree.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
diff.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
difftool.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
fast-export.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
fast-import.c fast-import: use mem_pool_calloc() 2023-12-26 11:06:23 -08:00
fetch-pack.c
fetch.c Merge branch 'tb/fetch-all-configuration' 2024-01-19 15:04:45 -08:00
fmt-merge-msg.c
for-each-ref.c Merge branch 'en/header-cleanup' 2024-01-08 14:05:15 -08:00
for-each-repo.c
fsck.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:33 -08:00
fsmonitor--daemon.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:33 -08:00
gc.c maintenance: use XDG config if it exists 2024-01-18 12:17:42 -08:00
get-tar-commit-id.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
grep.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:33 -08:00
hash-object.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
help.c
hook.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
index-pack.c Merge branch 'jc/index-pack-fsck-levels' 2024-02-08 13:20:33 -08:00
init-db.c Merge branch 'ps/refstorage-extension' 2024-01-16 10:11:57 -08:00
interpret-trailers.c Merge branch 'la/trailer-test-and-doc-updates' 2023-10-13 14:18:27 -07:00
log.c Merge branch 'en/header-cleanup' 2024-01-08 14:05:15 -08:00
ls-files.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
ls-remote.c Merge branch 'en/header-cleanup' 2024-01-08 14:05:15 -08:00
ls-tree.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
mailinfo.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
mailsplit.c
merge-base.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
merge-file.c merge-file: add --diff-algorithm option 2023-11-22 14:23:06 +09:00
merge-index.c
merge-ours.c
merge-recursive.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
merge-tree.c Merge branch 'en/header-cleanup' 2024-01-08 14:05:15 -08:00
merge.c refs: convert MERGE_AUTOSTASH to become a normal pseudo-ref 2024-01-19 11:10:41 -08:00
mktag.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:33 -08:00
mktree.c
multi-pack-index.c
mv.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
name-rev.c
notes.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
pack-objects.c Merge branch 'tb/multi-pack-verbatim-reuse' 2024-01-12 16:09:56 -08:00
pack-redundant.c
pack-refs.c
patch-id.c
prune-packed.c
prune.c
pull.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
push.c Merge branch 'en/header-cleanup' 2024-01-08 14:05:15 -08:00
range-diff.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
read-tree.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
rebase.c refs: convert AUTO_MERGE to become a normal pseudo-ref 2024-01-19 11:10:41 -08:00
receive-pack.c Merge branch 'en/header-cleanup' 2024-01-08 14:05:15 -08:00
reflog.c Merge branch 'jb/reflog-expire-delete-dry-run-options' 2023-12-18 14:10:12 -08:00
remote-ext.c
remote-fd.c
remote.c
repack.c Merge branch 'en/header-cleanup' 2024-01-08 14:05:15 -08:00
replace.c
replay.c replay: stop assuming replayed branches do not diverge 2023-11-26 10:10:50 +09:00
rerere.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
reset.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
rev-list.c rev-list: allow missing tips with --missing=[print|allow*] 2024-02-14 09:39:14 -08:00
rev-parse.c builtin/rev-parse: introduce `--show-ref-format` flag 2024-01-02 09:24:48 -08:00
revert.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
rm.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
send-pack.c Merge branch 'es/some-up-to-date-messages-must-stay' 2024-01-26 08:54:45 -08:00
shortlog.c
show-branch.c
show-index.c
show-ref.c Merge branch 'tc/show-ref-exists-fix' 2024-01-29 16:02:59 -08:00
sparse-checkout.c Merge branch 'en/sparse-checkout-eoo' 2024-01-08 14:05:16 -08:00
stash.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
stripspace.c
submodule--helper.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
symbolic-ref.c
tag.c Merge branch 'en/header-cleanup' 2024-01-08 14:05:15 -08:00
unpack-file.c
unpack-objects.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
update-index.c Merge branch 'jc/unresolve-removal' 2023-10-02 11:20:00 -07:00
update-ref.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
update-server-info.c
upload-archive.c
upload-pack.c
var.c config: rename global config function 2024-01-18 12:17:41 -08:00
verify-commit.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
verify-pack.c
verify-tag.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
worktree.c Merge branch 'jc/comment-style-fixes' 2024-02-06 14:31:21 -08:00
write-tree.c