-
Notifications
You must be signed in to change notification settings - Fork 143
Inclusive naming, part II #734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
587ddca
80e1d46
8d8e9ab
ef8a9b7
a80297f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -234,10 +234,10 @@ test_expect_success 'git branch -M master master should work when master is chec | |
git branch -M master master | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Jeff King wrote (reply to this):
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Junio C Hamano wrote (reply to this):
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Jeff King wrote (reply to this):
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Johannes Schindelin wrote (reply to this):
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Junio C Hamano wrote (reply to this):
|
||
' | ||
|
||
test_expect_success 'git branch -M master2 master2 should work when master is checked out' ' | ||
test_expect_success 'git branch -M topic topic should work when master is checked out' ' | ||
git checkout master && | ||
git branch master2 && | ||
git branch -M master2 master2 | ||
git branch topic && | ||
git branch -M topic topic | ||
' | ||
|
||
test_expect_success 'git branch -v -d t should work' ' | ||
|
@@ -324,8 +324,8 @@ test_expect_success 'git branch --list -v with --abbrev' ' | |
test_expect_success 'git branch --column' ' | ||
COLUMNS=81 git branch --column=column >actual && | ||
cat >expect <<\EOF && | ||
a/b/c bam foo l * master mb o/o q | ||
abc bar j/k m/m master2 n o/p r | ||
a/b/c bam foo l * master n o/p r | ||
abc bar j/k m/m mb o/o q topic | ||
EOF | ||
test_cmp expect actual | ||
' | ||
|
@@ -346,13 +346,13 @@ test_expect_success 'git branch --column with an extremely long branch name' ' | |
l | ||
m/m | ||
* master | ||
master2 | ||
mb | ||
n | ||
o/o | ||
o/p | ||
q | ||
r | ||
topic | ||
$long | ||
EOF | ||
test_cmp expect actual | ||
|
@@ -365,8 +365,8 @@ test_expect_success 'git branch with column.*' ' | |
git config --unset column.branch && | ||
git config --unset column.ui && | ||
cat >expect <<\EOF && | ||
a/b/c bam foo l * master mb o/o q | ||
abc bar j/k m/m master2 n o/p r | ||
a/b/c bam foo l * master n o/p r | ||
abc bar j/k m/m mb o/o q topic | ||
EOF | ||
test_cmp expect actual | ||
' | ||
|
@@ -377,7 +377,7 @@ test_expect_success 'git branch --column -v should fail' ' | |
|
||
test_expect_success 'git branch -v with column.ui ignored' ' | ||
git config column.ui column && | ||
COLUMNS=80 git branch -v | cut -c -10 | sed "s/ *$//" >actual && | ||
COLUMNS=80 git branch -v | cut -c -9 | sed "s/ *$//" >actual && | ||
git config --unset column.ui && | ||
cat >expect <<\EOF && | ||
a/b/c | ||
|
@@ -389,13 +389,13 @@ test_expect_success 'git branch -v with column.ui ignored' ' | |
l | ||
m/m | ||
* master | ||
master2 | ||
mb | ||
n | ||
o/o | ||
o/p | ||
q | ||
r | ||
topic | ||
EOF | ||
test_cmp expect actual | ||
' | ||
|
@@ -597,10 +597,10 @@ test_expect_success 'git branch -C master master should work when master is chec | |
git branch -C master master | ||
' | ||
|
||
test_expect_success 'git branch -C master5 master5 should work when master is checked out' ' | ||
test_expect_success 'git branch -C main5 main5 should work when master is checked out' ' | ||
git checkout master && | ||
git branch master5 && | ||
git branch -C master5 master5 | ||
git branch main5 && | ||
git branch -C main5 main5 | ||
' | ||
|
||
test_expect_success 'git branch -C ab cd should overwrite existing config for cd' ' | ||
|
@@ -711,11 +711,11 @@ test_expect_success 'deleting a self-referential symref' ' | |
' | ||
|
||
test_expect_success 'renaming a symref is not allowed' ' | ||
git symbolic-ref refs/heads/master2 refs/heads/master && | ||
test_must_fail git branch -m master2 master3 && | ||
git symbolic-ref refs/heads/master2 && | ||
git symbolic-ref refs/heads/topic refs/heads/master && | ||
test_must_fail git branch -m topic new-topic && | ||
git symbolic-ref refs/heads/topic && | ||
test_path_is_file .git/refs/heads/master && | ||
test_path_is_missing .git/refs/heads/master3 | ||
test_path_is_missing .git/refs/heads/new-topic | ||
' | ||
|
||
test_expect_success SYMLINKS 'git branch -m u v should fail when the reflog for u is a symlink' ' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,24 +15,24 @@ commit_message() { | |
# this test script tries to document them. First, the following commit history | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Junio C Hamano wrote (reply to this):
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Johannes Schindelin wrote (reply to this):
|
||
# is generated (the onelines are shown, time flows from left to right): | ||
# | ||
# master1 - master2 - master3 | ||
# topic_1 - topic_2 - topic_3 | ||
# \ | ||
# README ---------------------- Add subproject master - master4 - files_subtree/master5 | ||
# README ---------------------- Add subproject master - topic_4 - files_subtree/topic_5 | ||
# | ||
# Where the merge moves the files master[123].t into the subdirectory | ||
# files_subtree/ and master4 as well as files_subtree/master5 add files to that | ||
# files_subtree/ and topic_4 as well as files_subtree/topic_5 add files to that | ||
# directory directly. | ||
# | ||
# Then, in subsequent test cases, `git filter-branch` is used to distill just | ||
# the commits that touch files_subtree/. To give it a final pre-rebase touch, | ||
# an empty commit is added on top. The pre-rebase commit history looks like | ||
# this: | ||
# | ||
# Add subproject master - master4 - files_subtree/master5 - Empty commit | ||
# Add subproject master - topic_4 - files_subtree/topic_5 - Empty commit | ||
# | ||
# where the root commit adds three files: master1.t, master2.t and master3.t. | ||
# where the root commit adds three files: topic_1.t, topic_2.t and topic_3.t. | ||
# | ||
# This commit history is then rebased onto `master3` with the | ||
# This commit history is then rebased onto `topic_3` with the | ||
# `-Xsubtree=files_subtree` option in three different ways: | ||
# | ||
# 1. using `--preserve-merges` | ||
|
@@ -43,9 +43,9 @@ test_expect_success 'setup' ' | |
test_commit README && | ||
git init files && | ||
test_commit -C files master1 && | ||
test_commit -C files master2 && | ||
test_commit -C files master3 && | ||
test_commit -C files topic_1 && | ||
test_commit -C files topic_2 && | ||
test_commit -C files topic_3 && | ||
: perform subtree merge into files_subtree/ && | ||
git fetch files refs/heads/master:refs/heads/files-master && | ||
|
@@ -55,8 +55,8 @@ test_expect_success 'setup' ' | |
git commit -m "Add subproject master" && | ||
: add two extra commits to rebase && | ||
test_commit -C files_subtree master4 && | ||
test_commit files_subtree/master5 && | ||
test_commit -C files_subtree topic_4 && | ||
test_commit files_subtree/topic_5 && | ||
git checkout -b to-rebase && | ||
git fast-export --no-data HEAD -- files_subtree/ | | ||
|
@@ -66,22 +66,22 @@ test_expect_success 'setup' ' | |
git commit -m "Empty commit" --allow-empty | ||
' | ||
|
||
# FAILURE: Does not preserve master4. | ||
# FAILURE: Does not preserve topic_4. | ||
test_expect_failure REBASE_P 'Rebase -Xsubtree --preserve-merges --onto commit' ' | ||
reset_rebase && | ||
git checkout -b rebase-preserve-merges to-rebase && | ||
git rebase -Xsubtree=files_subtree --preserve-merges --onto files-master master && | ||
verbose test "$(commit_message HEAD~)" = "master4" && | ||
verbose test "$(commit_message HEAD)" = "files_subtree/master5" | ||
verbose test "$(commit_message HEAD~)" = "topic_4" && | ||
verbose test "$(commit_message HEAD)" = "files_subtree/topic_5" | ||
' | ||
|
||
# FAILURE: Does not preserve master4. | ||
# FAILURE: Does not preserve topic_4. | ||
test_expect_failure REBASE_P 'Rebase -Xsubtree --keep-empty --preserve-merges --onto commit' ' | ||
reset_rebase && | ||
git checkout -b rebase-keep-empty to-rebase && | ||
git rebase -Xsubtree=files_subtree --keep-empty --preserve-merges --onto files-master master && | ||
verbose test "$(commit_message HEAD~2)" = "master4" && | ||
verbose test "$(commit_message HEAD~)" = "files_subtree/master5" && | ||
verbose test "$(commit_message HEAD~2)" = "topic_4" && | ||
verbose test "$(commit_message HEAD~)" = "files_subtree/topic_5" && | ||
verbose test "$(commit_message HEAD)" = "Empty commit" | ||
' | ||
|
||
|
@@ -91,8 +91,8 @@ test_expect_success 'Rebase -Xsubtree --empty=ask --onto commit' ' | |
test_must_fail git rebase -Xsubtree=files_subtree --empty=ask --onto files-master master && | ||
: first pick results in no changes && | ||
git rebase --skip && | ||
verbose test "$(commit_message HEAD~2)" = "master4" && | ||
verbose test "$(commit_message HEAD~)" = "files_subtree/master5" && | ||
verbose test "$(commit_message HEAD~2)" = "topic_4" && | ||
verbose test "$(commit_message HEAD~)" = "files_subtree/topic_5" && | ||
verbose test "$(commit_message HEAD)" = "Empty commit" | ||
' | ||
|
||
|
@@ -102,8 +102,8 @@ test_expect_success 'Rebase -Xsubtree --empty=ask --rebase-merges --onto commit' | |
test_must_fail git rebase -Xsubtree=files_subtree --empty=ask --rebase-merges --onto files-master --root && | ||
: first pick results in no changes && | ||
git rebase --skip && | ||
verbose test "$(commit_message HEAD~2)" = "master4" && | ||
verbose test "$(commit_message HEAD~)" = "files_subtree/master5" && | ||
verbose test "$(commit_message HEAD~2)" = "topic_4" && | ||
verbose test "$(commit_message HEAD~)" = "files_subtree/topic_5" && | ||
verbose test "$(commit_message HEAD)" = "Empty commit" | ||
' | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, Junio C Hamano wrote (reply to this):