(cc-ing the git list)
Felipe Contreras wrote:

> When an object has already been exported (and thus is in the marks) it
> is flagged as SHOWN, so it will not be exported again, even if this time
> it's exported through a different ref.
>
> We don't need the object to be exported again, but we want the ref
> updated

Yes, makes perfect sense.

For what it's worth,
Acked-by: Jonathan Nieder <jrnie...@gmail.com>

[...]
> --- a/t/t5800-remote-helpers.sh
> +++ b/t/t5800-remote-helpers.sh
> @@ -145,4 +145,15 @@ test_expect_failure 'push new branch with old:new 
> refspec' '
>       compare_refs clone HEAD server refs/heads/new-refspec
>  '
>  
> +test_expect_success 'push ref with existing object' '
> +     (cd localclone &&
> +     git branch point-to-master master &&
> +     git push origin point-to-master
> +     ) &&
> +
> +     (cd server &&
> +     git show-ref refs/heads/point-to-master
> +     )

Style: if you indent like this, the test becomes clearer:

        (
                cd localclone &&
                git branch point-to-master master &&
                git push origin point-to-master
        ) &&
        (
                cd server &&
                git rev-parse --verify refs/heads/point-to-master
        )

[...]
> +test_expect_success 'refs are updated even if no commits need to be 
> exported' '
> +     git fast-export --import-marks=tmp-marks \
> +             --export-marks=tmp-marks master > /dev/null &&

The redirect just makes the test log with "-v" less informative, so
I'd drop it.

> +     git fast-export --import-marks=tmp-marks \
> +             --export-marks=tmp-marks master > actual &&
> +     test_cmp expected actual

Redirections in git shell scripts are generally spelled as
"do_something >actual", without a space between the operator and
filename.

Hope that helps,
Jonathan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to