> However, if we pre-filter to limit the refs in "$tempdir/heads" to
> those that are committish (i.e. those that pass "$ref^0") like the
> patch and subsequent discussion suggests, wouldn't we lose the
> warning for these replace refs and non-committish tags.  We perhaps
> could do something like:
> 
>       git rev-parse --no-flags ... >"$tempdir/raw-heads" || exit
> 
>       while read ref
>       do
>               case "$ref" in ^?*) continue ;; esac
>               if git rev-parse --verify "$ref^0" 2>/dev/null
>                 then
>                       echo "$ref"
>               else
>                       warn "WARNING: not rewriting '$ref' (not a committish)"
>               fi
>       done >"$tempdir/heads" <"$tempdir/raw-heads"
> 
> (note: the else clause is new, relative to my earlier suggestion).

I agree these suggestions.
I'm gonna send a new patch that follow it.

Reply via email to