File tree Expand file tree Collapse file tree 7 files changed +16
-27
lines changed
but-cherry-apply/tests/fixtures
but-hunk-dependency/tests/fixtures
but-worktrees/tests/fixtures Expand file tree Collapse file tree 7 files changed +16
-27
lines changed Original file line number Diff line number Diff line change @@ -13,12 +13,12 @@ git init remote
1313 git add . && git commit -m " init"
1414)
1515
16- CHANGE_ID =0
16+ GITBUTLER_CHANGE_ID =0
1717function commit_stack() {
1818 local stack=" ${1:? } "
1919 local message=" ${2:? } "
20- (( CHANGE_ID += 1 ))
21- CHANGE_ID= $CHANGE_ID $CLI branch commit " $stack " -m " $message "
20+ (( GITBUTLER_CHANGE_ID += 1 ))
21+ GITBUTLER_CHANGE_ID= $GITBUTLER_CHANGE_ID $CLI branch commit " $stack " -m " $message "
2222}
2323
2424export GITBUTLER_CLI_DATA_DIR=../user/gitbutler/app-data
Original file line number Diff line number Diff line change @@ -96,9 +96,7 @@ impl Default for HeadersV2 {
9696 HeadersV2 {
9797 // Change ID using base16 encoding
9898 change_id : if cfg ! ( feature = "testing" ) {
99- // TODO: remove the CHANGE_ID dependency, but old tests still need it.
100- // In future, the 'testing' feature alone should be enough.
101- if std:: env:: var ( "CHANGE_ID" ) . is_ok ( ) {
99+ if std:: env:: var ( "GITBUTLER_CHANGE_ID" ) . is_ok ( ) {
102100 ChangeId :: from_number_for_testing ( 1 )
103101 } else {
104102 ChangeId :: generate ( )
Original file line number Diff line number Diff line change @@ -8,12 +8,12 @@ git init remote
88 git add . && git commit -m " init"
99)
1010
11- CHANGE_ID =0
11+ GITBUTLER_CHANGE_ID =0
1212function commit_stack() {
1313 local stack=" ${1:? } "
1414 local message=" ${2:? } "
15- (( CHANGE_ID += 1 ))
16- CHANGE_ID= $CHANGE_ID $CLI branch commit " $stack " -m " $message "
15+ (( GITBUTLER_CHANGE_ID += 1 ))
16+ GITBUTLER_CHANGE_ID= $GITBUTLER_CHANGE_ID $CLI branch commit " $stack " -m " $message "
1717}
1818
1919export GITBUTLER_CLI_DATA_DIR=../user/gitbutler/app-data
@@ -499,8 +499,8 @@ add this line
499499
500500 # Update the project.
501501 git fetch origin
502- (( CHANGE_ID += 1 ))
503- CHANGE_ID= $CHANGE_ID $CLI integrate-upstream merge
502+ (( GITBUTLER_CHANGE_ID += 1 ))
503+ GITBUTLER_CHANGE_ID= $GITBUTLER_CHANGE_ID $CLI integrate-upstream merge
504504
505505 echo " 1
5065062
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ pub fn assure_stable_env() {
115115 . set ( "GIT_COMMITTER_DATE" , "2000-01-02 00:00:00 +0000" )
116116 . set ( "GIT_COMMITTER_EMAIL" , "[email protected] " ) 117117 . set ( "GIT_COMMITTER_NAME" , "committer (From Env)" )
118- . set ( "CHANGE_ID " , "change-id" ) ;
118+ . set ( "GITBUTLER_CHANGE_ID " , "change-id" ) ;
119119 // assure it doesn't get racy.
120120 std:: mem:: forget ( env) ;
121121}
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ function tick () {
2929git clone remote stacked-and-parallel
3030(cd stacked-and-parallel
3131 tick
32- export CHANGE_ID =851ad981-c986-4bb4-8be9-deadbeefeba2
32+ export GITBUTLER_CHANGE_ID =851ad981-c986-4bb4-8be9-deadbeefeba2
3333
3434 git config user.name " Author"
3535 git config user.email
" [email protected] " @@ -63,7 +63,7 @@ git clone remote stacked-and-parallel
6363git clone remote stacked-branches
6464(cd stacked-branches
6565 tick
66- export CHANGE_ID =851ad981-c986-4bb4-8be9-deadbeefeba2
66+ export GITBUTLER_CHANGE_ID =851ad981-c986-4bb4-8be9-deadbeefeba2
6767
6868 git config user.name " Author"
6969 git config user.email
" [email protected] " @@ -84,4 +84,4 @@ git clone remote stacked-branches
8484 $CLI commit -m " feature-b: add line 1" feature-b
8585 echo " feature-b line 2" > bar.txt
8686 $CLI commit -m " feature-b: add line 2" feature-b
87- )
87+ )
Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ impl Sandbox {
182182 cmd = cmd
183183 . args ( shell_words:: split ( args) . expect ( "statically known args must split correctly" ) )
184184 }
185- self . with_updated_env ( cmd) . env ( "CHANGE_ID " , "42" )
185+ self . with_updated_env ( cmd) . env ( "GITBUTLER_CHANGE_ID " , "42" )
186186 }
187187
188188 /// Invoke an isolated `git` with the given `args`, which will be split automatically.
Original file line number Diff line number Diff line change @@ -36,17 +36,8 @@ impl Default for CommitHeadersV2 {
3636 fn default ( ) -> Self {
3737 CommitHeadersV2 {
3838 // Change ID using base16 encoding
39- change_id : if cfg ! ( feature = "testing" ) {
40- std:: env:: var ( "CHANGE_ID" ) . unwrap_or_else ( |_| {
41- eprintln ! (
42- "With 'testing' feature the `CHANGE_ID` \
43- environment variable can be set have stable values"
44- ) ;
45- Uuid :: new_v4 ( ) . to_string ( )
46- } )
47- } else {
48- Uuid :: new_v4 ( ) . to_string ( )
49- } ,
39+ change_id : std:: env:: var ( "GITBUTLER_CHANGE_ID" )
40+ . unwrap_or_else ( |_| Uuid :: new_v4 ( ) . to_string ( ) ) ,
5041 conflicted : None ,
5142 }
5243 }
You can’t perform that action at this time.
0 commit comments