Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* maint:
  branch: die explicitly why when calling "git branch [-a|-r] branchname".
  fast-import: Document author/committer/tagger name is optional
  SubmittingPatches: hints to know the status of a submitted patch.
  • Loading branch information
Junio C Hamano committed Dec 31, 2009
2 parents 4cc4738 + 9bfff3a commit 37bae10
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 21 deletions.
14 changes: 14 additions & 0 deletions Documentation/SubmittingPatches
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,20 @@ from the list and queue it to 'pu', in order to make it easier for
people play with it without having to pick up and apply the patch to
their trees themselves.

------------------------------------------------
Know the status of your patch after submission

* You can use Git itself to find out when your patch is merged in
master. 'git pull --rebase' will automatically skip already-applied
patches, and will let you know. This works only if you rebase on top
of the branch in which your patch has been merged (i.e. it will not
tell you if your patch is merged in pu if you rebase on top of
master).

* Read the git mailing list, the maintainer regularly posts messages
entitled "What's cooking in git.git" and "What's in git.git" giving
the status of various proposed changes.

------------------------------------------------
MUA specific hints

Expand Down
6 changes: 3 additions & 3 deletions Documentation/git-fast-import.txt
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@ change to the project.
....
'commit' SP <ref> LF
mark?
('author' SP <name> SP LT <email> GT SP <when> LF)?
'committer' SP <name> SP LT <email> GT SP <when> LF
('author' (SP <name>)? SP LT <email> GT SP <when> LF)?
'committer' (SP <name>)? SP LT <email> GT SP <when> LF
data
('from' SP <committish> LF)?
('merge' SP <committish> LF)?
Expand Down Expand Up @@ -657,7 +657,7 @@ lightweight (non-annotated) tags see the `reset` command below.
....
'tag' SP <name> LF
'from' SP <committish> LF
'tagger' SP <name> SP LT <email> GT SP <when> LF
'tagger' (SP <name>)? SP LT <email> GT SP <when> LF
data
....

Expand Down
6 changes: 4 additions & 2 deletions builtin-branch.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,10 +638,12 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
rename_branch(head, argv[0], rename > 1);
else if (rename && (argc == 2))
rename_branch(argv[0], argv[1], rename > 1);
else if (argc <= 2)
else if (argc <= 2) {
if (kinds != REF_LOCAL_BRANCH)
die("-a and -r options to 'git branch' do not make sense with a branch name");
create_branch(head, argv[0], (argc == 2) ? argv[1] : head,
force_create, reflog, track);
else
} else
usage_with_options(builtin_branch_usage, options);

return 0;
Expand Down
6 changes: 3 additions & 3 deletions fast-import.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Format of STDIN stream:
new_commit ::= 'commit' sp ref_str lf
mark?
('author' sp name sp '<' email '>' sp when lf)?
'committer' sp name sp '<' email '>' sp when lf
('author' (sp name)? sp '<' email '>' sp when lf)?
'committer' (sp name)? sp '<' email '>' sp when lf
commit_msg
('from' sp committish lf)?
('merge' sp committish lf)*
Expand All @@ -47,7 +47,7 @@ Format of STDIN stream:
new_tag ::= 'tag' sp tag_str lf
'from' sp committish lf
('tagger' sp name sp '<' email '>' sp when lf)?
('tagger' (sp name)? sp '<' email '>' sp when lf)?
tag_msg;
tag_msg ::= data;
Expand Down
26 changes: 13 additions & 13 deletions t/t5403-post-checkout-hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ test_description='Test the post-checkout hook.'
. ./test-lib.sh

test_expect_success setup '
echo Data for commit0. >a &&
echo Data for commit0. >b &&
git update-index --add a &&
git update-index --add b &&
tree0=$(git write-tree) &&
commit0=$(echo setup | git commit-tree $tree0) &&
git update-ref refs/heads/master $commit0 &&
git clone ./. clone1 &&
git clone ./. clone2 &&
GIT_DIR=clone2/.git git branch -a new2 &&
echo Data for commit1. >clone2/b &&
GIT_DIR=clone2/.git git add clone2/b &&
GIT_DIR=clone2/.git git commit -m new2
echo Data for commit0. >a &&
echo Data for commit0. >b &&
git update-index --add a &&
git update-index --add b &&
tree0=$(git write-tree) &&
commit0=$(echo setup | git commit-tree $tree0) &&
git update-ref refs/heads/master $commit0 &&
git clone ./. clone1 &&
git clone ./. clone2 &&
GIT_DIR=clone2/.git git branch new2 &&
echo Data for commit1. >clone2/b &&
GIT_DIR=clone2/.git git add clone2/b &&
GIT_DIR=clone2/.git git commit -m new2
'

for clone in 1 2; do
Expand Down

0 comments on commit 37bae10

Please sign in to comment.