Skip to content

Commit b240ea2

Browse files
committed
Merge maint branch for tracking l10n updates of git stable version
Use master branch to track l10n updates for git next release, while use maint branch to track l10n updates for git stable version.
2 parents 01b127c + 868d662 commit b240ea2

40 files changed

+779
-213
lines changed

Documentation/RelNotes/1.7.10.1.txt

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
Git v1.7.10.1 Release Notes
2+
===========================
3+
4+
Fixes since v1.7.10
5+
-------------------
6+
7+
* "git add -p" is not designed to deal with unmerged paths but did
8+
not exclude them and tried to apply funny patches only to fail.
9+
10+
* When PATH contains an unreadable directory, alias expansion code
11+
did not kick in, and failed with an error that said "git-subcmd"
12+
was not found.
13+
14+
* "git clean -d -f" (not "-d -f -f") is supposed to protect nested
15+
working trees of independent git repositories that exist in the
16+
current project working tree from getting removed, but the
17+
protection applied only to such working trees that are at the
18+
top-level of the current project by mistake.
19+
20+
* "git commit --author=$name" did not tell the name that was being
21+
recorded in the resulting commit to hooks, even though it does do
22+
so when the end user overrode the authorship via the
23+
"GIT_AUTHOR_NAME" environment variable.
24+
25+
* When "git commit --template F" errors out because the user did not
26+
touch the message, it claimed that it aborts due to "empty
27+
message", which was utterly wrong.
28+
29+
* The regexp configured with diff.wordregex was incorrectly reused
30+
across files.
31+
32+
* An age-old corner case bug in combine diff (only triggered with -U0
33+
and the hunk at the beginning of the file needs to be shown) has
34+
been fixed.
35+
36+
* Rename detection logic used to match two empty files as renames
37+
during merge-recursive, leading to unnatural mismerges.
38+
39+
* Running "notes merge --commit" failed to perform correctly when run
40+
from any directory inside $GIT_DIR/. When "notes merge" stops with
41+
conflicts, $GIT_DIR/NOTES_MERGE_WORKTREE is the place a user edits
42+
to resolve it.
43+
44+
* The 'push to upstream' implementation was broken in some corner
45+
cases. "git push $there" without refspec, when the current branch
46+
is set to push to a remote different from $there, used to push to
47+
$there using the upstream information to a remote unreleated to
48+
$there.
49+
50+
Also contains minor fixes and documentation updates.

Documentation/RelNotes/1.7.7.7.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Git v1.7.7.7 Release Notes
2+
==========================
3+
4+
Fixes since v1.7.7.6
5+
--------------------
6+
7+
* An error message from 'git bundle' had an unmatched single quote pair in it.
8+
9+
* 'git diff --histogram' option was not described.
10+
11+
* 'git imap-send' carried an unused dead code.
12+
13+
Also contains minor fixes and documentation updates.

Documentation/RelNotes/1.7.8.6.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Git v1.7.8.6 Release Notes
2+
==========================
3+
4+
Fixes since v1.7.8.5
5+
--------------------
6+
7+
* An error message from 'git bundle' had an unmatched single quote pair in it.
8+
9+
* 'git diff --histogram' option was not described.
10+
11+
* Documentation for 'git rev-list' had minor formatting errors.
12+
13+
* 'git imap-send' carried an unused dead code.
14+
15+
* The way 'git fetch' implemented its connectivity check over
16+
received objects was overly pessimistic, and wasted a lot of
17+
cycles.
18+
19+
* Various minor backports of fixes from the 'master' and the 'maint'
20+
branch.
21+
22+
Also contains minor fixes and documentation updates.

Documentation/RelNotes/1.7.9.7.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Git v1.7.9.7 Release Notes
2+
==========================
3+
4+
Fixes since v1.7.9.6
5+
--------------------
6+
7+
* An error message from 'git bundle' had an unmatched single quote pair in it.
8+
9+
* The way 'git fetch' implemented its connectivity check over
10+
received objects was overly pessimistic, and wasted a lot of
11+
cycles.
12+
13+
Also contains minor fixes and documentation updates.

Documentation/git-commit.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,14 @@ OPTIONS
132132

133133
-t <file>::
134134
--template=<file>::
135-
Use the contents of the given file as the initial version
136-
of the commit message. The editor is invoked and you can
137-
make subsequent changes. If a message is specified using
138-
the `-m` or `-F` options, this option has no effect. This
139-
overrides the `commit.template` configuration variable.
135+
When editing the commit message, start the editor with the
136+
contents in the given file. The `commit.template` configuration
137+
variable is often used to give this option implicitly to the
138+
command. This mechanism can be used by projects that want to
139+
guide participants with some hints on what to write in the message
140+
in what order. If the user exits the editor without editing the
141+
message, the commit is aborted. This has no effect when a message
142+
is given by other means, e.g. with the `-m` or `-F` options.
140143

141144
-s::
142145
--signoff::

Documentation/git.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@ Documentation for older releases are available here:
4949
* release notes for
5050
link:RelNotes/1.7.10.txt[1.7.10].
5151

52-
* link:v1.7.9.6/git.html[documentation for release 1.7.9.6]
52+
* link:v1.7.9.7/git.html[documentation for release 1.7.9.7]
5353

5454
* release notes for
55+
link:RelNotes/1.7.9.7.txt[1.7.9.7],
5556
link:RelNotes/1.7.9.6.txt[1.7.9.6],
5657
link:RelNotes/1.7.9.5.txt[1.7.9.5],
5758
link:RelNotes/1.7.9.4.txt[1.7.9.4],
@@ -60,19 +61,21 @@ Documentation for older releases are available here:
6061
link:RelNotes/1.7.9.1.txt[1.7.9.1],
6162
link:RelNotes/1.7.9.txt[1.7.9].
6263

63-
* link:v1.7.8.5/git.html[documentation for release 1.7.8.5]
64+
* link:v1.7.8.6/git.html[documentation for release 1.7.8.6]
6465

6566
* release notes for
67+
link:RelNotes/1.7.8.6.txt[1.7.8.6],
6668
link:RelNotes/1.7.8.5.txt[1.7.8.5],
6769
link:RelNotes/1.7.8.4.txt[1.7.8.4],
6870
link:RelNotes/1.7.8.3.txt[1.7.8.3],
6971
link:RelNotes/1.7.8.2.txt[1.7.8.2],
7072
link:RelNotes/1.7.8.1.txt[1.7.8.1],
7173
link:RelNotes/1.7.8.txt[1.7.8].
7274

73-
* link:v1.7.7.6/git.html[documentation for release 1.7.7.6]
75+
* link:v1.7.7.7/git.html[documentation for release 1.7.7.7]
7476

7577
* release notes for
78+
link:RelNotes/1.7.7.7.txt[1.7.7.7],
7679
link:RelNotes/1.7.7.6.txt[1.7.7.6],
7780
link:RelNotes/1.7.7.5.txt[1.7.7.5],
7881
link:RelNotes/1.7.7.4.txt[1.7.7.4],

RelNotes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Documentation/RelNotes/1.7.10.txt
1+
Documentation/RelNotes/1.7.10.1.txt

builtin/commit.c

Lines changed: 62 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -533,9 +533,20 @@ static int is_a_merge(const struct commit *current_head)
533533

534534
static const char sign_off_header[] = "Signed-off-by: ";
535535

536+
static void export_one(const char *var, const char *s, const char *e, int hack)
537+
{
538+
struct strbuf buf = STRBUF_INIT;
539+
if (hack)
540+
strbuf_addch(&buf, hack);
541+
strbuf_addf(&buf, "%.*s", (int)(e - s), s);
542+
setenv(var, buf.buf, 1);
543+
strbuf_release(&buf);
544+
}
545+
536546
static void determine_author_info(struct strbuf *author_ident)
537547
{
538548
char *name, *email, *date;
549+
struct ident_split author;
539550

540551
name = getenv("GIT_AUTHOR_NAME");
541552
email = getenv("GIT_AUTHOR_EMAIL");
@@ -585,6 +596,11 @@ static void determine_author_info(struct strbuf *author_ident)
585596
date = force_date;
586597
strbuf_addstr(author_ident, fmt_ident(name, email, date,
587598
IDENT_ERROR_ON_NO_NAME));
599+
if (!split_ident_line(&author, author_ident->buf, author_ident->len)) {
600+
export_one("GIT_AUTHOR_NAME", author.name_begin, author.name_end, 0);
601+
export_one("GIT_AUTHOR_EMAIL", author.mail_begin, author.mail_end, 0);
602+
export_one("GIT_AUTHOR_DATE", author.date_begin, author.tz_end, '@');
603+
}
588604
}
589605

590606
static int ends_rfc2822_footer(struct strbuf *sb)
@@ -652,6 +668,9 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
652668
int ident_shown = 0;
653669
int clean_message_contents = (cleanup_mode != CLEANUP_NONE);
654670

671+
/* This checks and barfs if author is badly specified */
672+
determine_author_info(author_ident);
673+
655674
if (!no_verify && run_hook(index_file, "pre-commit", NULL))
656675
return 0;
657676

@@ -771,9 +790,6 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
771790

772791
strbuf_release(&sb);
773792

774-
/* This checks and barfs if author is badly specified */
775-
determine_author_info(author_ident);
776-
777793
/* This checks if committer ident is explicitly given */
778794
strbuf_addstr(&committer_ident, git_committer_info(0));
779795
if (use_editor && include_status) {
@@ -905,27 +921,10 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
905921
return 1;
906922
}
907923

908-
/*
909-
* Find out if the message in the strbuf contains only whitespace and
910-
* Signed-off-by lines.
911-
*/
912-
static int message_is_empty(struct strbuf *sb)
924+
static int rest_is_empty(struct strbuf *sb, int start)
913925
{
914-
struct strbuf tmpl = STRBUF_INIT;
926+
int i, eol;
915927
const char *nl;
916-
int eol, i, start = 0;
917-
918-
if (cleanup_mode == CLEANUP_NONE && sb->len)
919-
return 0;
920-
921-
/* See if the template is just a prefix of the message. */
922-
if (template_file && strbuf_read_file(&tmpl, template_file, 0) > 0) {
923-
stripspace(&tmpl, cleanup_mode == CLEANUP_ALL);
924-
if (start + tmpl.len <= sb->len &&
925-
memcmp(tmpl.buf, sb->buf + start, tmpl.len) == 0)
926-
start += tmpl.len;
927-
}
928-
strbuf_release(&tmpl);
929928

930929
/* Check if the rest is just whitespace and Signed-of-by's. */
931930
for (i = start; i < sb->len; i++) {
@@ -948,6 +947,40 @@ static int message_is_empty(struct strbuf *sb)
948947
return 1;
949948
}
950949

950+
/*
951+
* Find out if the message in the strbuf contains only whitespace and
952+
* Signed-off-by lines.
953+
*/
954+
static int message_is_empty(struct strbuf *sb)
955+
{
956+
if (cleanup_mode == CLEANUP_NONE && sb->len)
957+
return 0;
958+
return rest_is_empty(sb, 0);
959+
}
960+
961+
/*
962+
* See if the user edited the message in the editor or left what
963+
* was in the template intact
964+
*/
965+
static int template_untouched(struct strbuf *sb)
966+
{
967+
struct strbuf tmpl = STRBUF_INIT;
968+
char *start;
969+
970+
if (cleanup_mode == CLEANUP_NONE && sb->len)
971+
return 0;
972+
973+
if (!template_file || strbuf_read_file(&tmpl, template_file, 0) <= 0)
974+
return 0;
975+
976+
stripspace(&tmpl, cleanup_mode == CLEANUP_ALL);
977+
start = (char *)skip_prefix(sb->buf, tmpl.buf);
978+
if (!start)
979+
start = sb->buf;
980+
strbuf_release(&tmpl);
981+
return rest_is_empty(sb, start - sb->buf);
982+
}
983+
951984
static const char *find_author_by_nickname(const char *name)
952985
{
953986
struct rev_info revs;
@@ -1055,6 +1088,8 @@ static int parse_and_validate_options(int argc, const char *argv[],
10551088
die(_("Only one of -c/-C/-F/--fixup can be used."));
10561089
if (message.len && f > 0)
10571090
die((_("Option -m cannot be combined with -c/-C/-F/--fixup.")));
1091+
if (f || message.len)
1092+
template_file = NULL;
10581093
if (edit_message)
10591094
use_message = edit_message;
10601095
if (amend && !use_message && !fixup_message)
@@ -1494,6 +1529,11 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
14941529

14951530
if (cleanup_mode != CLEANUP_NONE)
14961531
stripspace(&sb, cleanup_mode == CLEANUP_ALL);
1532+
if (template_untouched(&sb) && !allow_empty_message) {
1533+
rollback_index_files();
1534+
fprintf(stderr, _("Aborting commit; you did not edit the message.\n"));
1535+
exit(1);
1536+
}
14971537
if (message_is_empty(&sb) && !allow_empty_message) {
14981538
rollback_index_files();
14991539
fprintf(stderr, _("Aborting commit due to empty commit message.\n"));

builtin/diff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
327327
add_head_to_pending(&rev);
328328
if (!rev.pending.nr) {
329329
struct tree *tree;
330-
tree = lookup_tree((const unsigned char*)EMPTY_TREE_SHA1_BIN);
330+
tree = lookup_tree(EMPTY_TREE_SHA1_BIN);
331331
add_pending_object(&rev, &tree->object, "HEAD");
332332
}
333333
break;

builtin/push.c

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,16 @@ static void set_refspecs(const char **refs, int nr)
6565
}
6666
}
6767

68+
static int push_url_of_remote(struct remote *remote, const char ***url_p)
69+
{
70+
if (remote->pushurl_nr) {
71+
*url_p = remote->pushurl;
72+
return remote->pushurl_nr;
73+
}
74+
*url_p = remote->url;
75+
return remote->url_nr;
76+
}
77+
6878
static void setup_push_upstream(struct remote *remote)
6979
{
7080
struct strbuf refspec = STRBUF_INIT;
@@ -76,7 +86,7 @@ static void setup_push_upstream(struct remote *remote)
7686
"\n"
7787
" git push %s HEAD:<name-of-remote-branch>\n"),
7888
remote->name);
79-
if (!branch->merge_nr || !branch->merge)
89+
if (!branch->merge_nr || !branch->merge || !branch->remote_name)
8090
die(_("The current branch %s has no upstream branch.\n"
8191
"To push the current branch and set the remote as upstream, use\n"
8292
"\n"
@@ -87,6 +97,12 @@ static void setup_push_upstream(struct remote *remote)
8797
if (branch->merge_nr != 1)
8898
die(_("The current branch %s has multiple upstream branches, "
8999
"refusing to push."), branch->name);
100+
if (strcmp(branch->remote_name, remote->name))
101+
die(_("You are pushing to remote '%s', which is not the upstream of\n"
102+
"your current branch '%s', without telling me what to push\n"
103+
"to update which remote branch."),
104+
remote->name, branch->name);
105+
90106
strbuf_addf(&refspec, "%s:%s", branch->name, branch->merge[0]->src);
91107
add_refspec(refspec.buf);
92108
}
@@ -196,13 +212,7 @@ static int do_push(const char *repo, int flags)
196212
setup_default_push_refspecs(remote);
197213
}
198214
errs = 0;
199-
if (remote->pushurl_nr) {
200-
url = remote->pushurl;
201-
url_nr = remote->pushurl_nr;
202-
} else {
203-
url = remote->url;
204-
url_nr = remote->url_nr;
205-
}
215+
url_nr = push_url_of_remote(remote, &url);
206216
if (url_nr) {
207217
for (i = 0; i < url_nr; i++) {
208218
struct transport *transport =

0 commit comments

Comments
 (0)