0

Is it possible at all?

I've read in documentation that you can configure it in your local .git/config like:

[remote "origin"]
  fetch = +refs/heads/*:refs/remotes/origin/*

But it is local settings and as i understand i can't push it to i.e. github or bitbucket. Is it possible to force everyone to pull notes?

Kirill
  • 6,762
  • 4
  • 51
  • 81
  • What is the documentation saying that? – Basile Starynkevitch May 26 '17 at 16:37
  • @BasileStarynkevitch oops it was blog post https://git-scm.com/blog/2010/08/25/notes.html – Kirill May 26 '17 at 16:39
  • git and force everyone to do something sounds strange – Ôrel May 26 '17 at 16:50
  • @Ôrel we just want so everyone saw git notes in `git log` because notes contain corresponding revision number when project used Subversion. It is tedious for everyone who wants to find commit by svn revision number to search for `git fetch origin refs/notes/*:refs/notes/*` and execute it – Kirill May 26 '17 at 16:53

1 Answers1

1

Is it possible to force everyone to pull notes?

(emphasis mine) No.

[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*

This is the normal setting. You need to add a setting to copy notes references. There are many possible ways to do that, e.g., if you never make your own notes:

[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    fetch = refs/notes/commits:refs/notes/commits

If you do make your own notes, you will want something fancier, e.g.:

[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    fetch = +refs/notes/commits:refs/notes/origin/commits

and then manipulate the core.notesRef setting and/or use --notes= when running git log.

Everyone who wants the notes, however, must specifically ask for the notes, by adding an extra fetch line to their configurations.

torek
  • 448,244
  • 59
  • 642
  • 775