> Yuki Kokubun <orga.chem.job@xxxxxxxxx> writes: > > >> Yuki Kokubun <orga.chem.job@xxxxxxxxx> writes: > >> > >> > "git filter-branch -- --all" can be confused when refs that refer to objects > >> > other than commits or tags exists. > >> > Because "git rev-parse --all" that is internally used can return refs that > >> > refer to an object other than commit or tag. But it is not considered in the > >> > phase of updating refs. > >> > >> Could you describe what the consequence of that is? We have a ref > >> that points directly at a blob object, or a ref that points at a tag > >> object that points at a blob object. The current code leaves both of > >> these refs in "$tempdir/heads". Then...? > > > > Sorry, this is my wrong. > > I wrongly thought only refs/replace can point at a blob or tree object. > > No need to be sorry. You still need to describe what (bad things) > happen if we do not filter out refs that do not point at committish > in the proposed log message. > > IOW, can you elaborate and clarify your "can be confused" at the > beginning? I meant the confusion is abnormal messages from the output of "git filter-branch -- --all". For example, this is an output of "git filter-branch -- --all": Rewrite bcdbd016c77df3d5641a3cf820b2ed46ba7bf3b4 (5/5) (0 seconds passed, remaining 0 predicted) WARNING: Ref 'refs/heads/master' is unchanged WARNING: Ref 'refs/heads/no-newline' is unchanged WARNING: Ref 'refs/heads/original' is unchanged error: object 1bf53b49c26465454e4ac377f2ed3f91bb1d6ac1 is a tree, not a commit error: object 1bf53b49c26465454e4ac377f2ed3f91bb1d6ac1 is a tree, not a commit fatal: ambiguous argument 'refs/replace/8a2016f3730cad8309c110f819c855403ed0a5b9^0': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' WARNING: Ref 'refs/replace/8a2016f3730cad8309c110f819c855403ed0a5b9' is unchanged WARNING: Ref 'refs/tags/add-file' is unchanged WARNING: Ref 'refs/tags/file' is unchanged error: object 1bf53b49c26465454e4ac377f2ed3f91bb1d6ac1 is a tree, not a commit error: object 1bf53b49c26465454e4ac377f2ed3f91bb1d6ac1 is a tree, not a commit fatal: ambiguous argument 'refs/tags/treetag^0': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' WARNING: Ref 'refs/tags/treetag' is unchanged You can see a lot of terrible messages such as "error" and "fatal". But on the whole, the result of "git filter-branch -- --all" is not so abnormal. So, this is a just problem about abonormal messages. I think this messages should be suppressed. How do you feel about it?