Skip to content

checkout --orphan improvements

Erick Mattos git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5Documentation: alter checkout --orphan descriptionDocumentation/git-checkout.txt+21 -140 replies
2/5refs: split log_ref_write logic into log_ref_setuprefs.c refs.h+39 -214 replies
3/5checkout --orphan: respect -l option alwaysbuiltin/checkout.c t/t2017-checkout-orphan.sh+85 -248 replies
4/5t3200: test -l with core.logAllRefUpdates optionst/t3200-branch.sh+24 -00 replies
5/5bash completion: add --orphan to 'git checkout'contrib/completion/git-completion.bash+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] checkout --orphan improvements

These series of patches are improvements to 'git checkout --orphan'.

The main reason for them is a corner case which is not being solved by actual implementation. As it is a quite improbable situation and as it was necessary to do more extensive changes to support it then its development was held to be presented in a new developing cycle.

When someone set core.logAllRefUpdates to false reflogs are not created automatically. This behavior is superseeded by -l option. Actually this is not allowed with --orphan by current implementation. Those new patches are made to fix that.

There are also two other patches for configuring completion in bash and to enhance documentation.

To be completely honest I don't see a point of not having the reflogs created and deleted automatically so I see no reason for -l and core.logAllRefUpdates at all. But I do not like to do anything partially thus these new patches. If someone could show me a case please do it. ;-)

[PATCH 1/5] Documentation: alter checkout --orphan description

This one improves documentation text by late corrections from previous threads.

[PATCH 2/5] refs: split log_ref_write logic into log_ref_setup

Prepare the field by separating the logic to set up the reflog from the reflog writing action.

[PATCH 3/5] checkout --orphan: respect -l option always

This is the actual actor.

[PATCH 4/5] t3200: test -l with core.logAllRefUpdates options

Adjusting scripts to test everything extensively.

[PATCH 5/5] bash completion: add --orphan to 'git checkout'

Just do that git change.