File: README

package info (click to toggle)
musescore 2.3.2%2Bdfsg1-1~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports-sloppy
  • size: 204,200 kB
  • sloc: cpp: 267,218; xml: 177,839; ansic: 140,048; sh: 6,921; python: 6,867; perl: 423; makefile: 332; awk: 142; pascal: 74; sed: 3
file content (32 lines) | stat: -rw-r--r-- 1,340 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Handling of mscore/revision.h
-----------------------------

The copy of mscore/revision.h in the git repository is just a default, to
prevent build failures from a freshly cloned or checked-out repo. It contains
the string "Unknown" instead of a build number.

It is always possible to update mscore/revision.h with the build number
of the current checked-out branch by doing "make revision". However, the
updated mscore/revision.h should never be commited back to git. This can
be prevented manually by restoring the original value before committing,
with "git checkout -- mscore/revision.h"

But there is an easier way to achieve all this automatically...

The post-checkout script in this directory should be installed as a hook in
git, and will update mscore/revision.h with the branch number automatically
when checking out a new branch.

The hook also does "git update-index --assume-unchanged mscore/revision.h",
so that git does not expect the updated mscore/revision.h file to be staged
or committed. It also stops it from showing up in "git diff" or "git status".

To install the hook from this directory, do:

$ cp -p post-checkout ../../../.git/hooks/

Alternatively from the top-level directory, do:

$ cp -p build/git/hooks/post-checkout .git/hooks/

This only needs doing once, and works for Linux, Windows (MinGW) and OSX.