Skip to content

Commit 2fd3fd9

Browse files
committed
Merge tag 'relix/v2.2.2'
2 parents 4be40e6 + c5af77d commit 2fd3fd9

34 files changed

+347
-98
lines changed

Documentation/RelNotes/2.2.2.txt

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
Git v2.2.2 Release Notes
2+
========================
3+
4+
Fixes since v2.2.1
5+
------------------
6+
7+
* "git checkout $treeish $path", when $path in the index and the
8+
working tree already matched what is in $treeish at the $path,
9+
still overwrote the $path unnecessarily.
10+
11+
* "git config --get-color" did not parse its command line arguments
12+
carefully.
13+
14+
* open() emulated on Windows platforms did not give EISDIR upon
15+
an attempt to open a directory for writing.
16+
17+
* A few code paths used abs() when they should have used labs() on
18+
long integers.
19+
20+
* "gitweb" used to depend on a behaviour recent CGI.pm deprecated.
21+
22+
* "git init" (hence "git clone") initialized the per-repository
23+
configuration file .git/config with x-bit by mistake.
24+
25+
* Git 2.0 was supposed to make the "simple" mode for the default of
26+
"git push", but it didn't.
27+
28+
* "Everyday" document had a broken link.
29+
30+
* The build procedure did not bother fixing perl and python scripts
31+
when NO_PERL and NO_PYTHON build-time configuration changed.
32+
33+
* The code that reads the reflog from the newer to the older entries
34+
did not handle an entry that crosses a boundary of block it uses to
35+
read them correctly.
36+
37+
* "git apply" was described in the documentation to take --ignore-date
38+
option, which it does not.
39+
40+
* Traditionally we tried to avoid interpreting date strings given by
41+
the user as future dates, e.g. GIT_COMMITTER_DATE=2014-12-10 when
42+
used early November 2014 was taken as "October 12, 2014" because it
43+
is likely that a date in the future, December 10, is a mistake.
44+
This heuristics has been loosened to allow people to express future
45+
dates (most notably, --until=<date> may want to be far in the
46+
future) and we no longer tiebreak by future-ness of the date when
47+
48+
(1) ISO-like format is used, and
49+
(2) the string can make sense interpreted as both y-m-d and y-d-m.
50+
51+
Git may still have to use the heuristics to tiebreak between dd/mm/yy
52+
and mm/dd/yy, though.
53+
54+
* The code to abbreviate an object name to its short unique prefix
55+
has been optimized when no abbreviation was requested.
56+
57+
* "git add --ignore-errors ..." did not ignore an error to
58+
give a file that did not exist.
59+
60+
* Git did not correctly read an overlong refname from a packed refs
61+
file.
62+
63+
Also contains typofixes, documentation updates and trivial code clean-ups.

Documentation/config.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,10 @@ accepted are `normal`, `black`, `red`, `green`, `yellow`, `blue`,
850850
`blink` and `reverse`. The first color given is the foreground; the
851851
second is the background. The position of the attribute, if any,
852852
doesn't matter.
853+
+
854+
Colors (foreground and background) may also be given as numbers between
855+
0 and 255; these use ANSI 256-color mode (but note that not all
856+
terminals may support this).
853857

854858
color.diff::
855859
Whether to use ANSI escape sequences to add color to patches.

Documentation/git-am.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ default. You can use `--no-utf8` to override this.
8383
it is supposed to apply to and we have those blobs
8484
available locally.
8585

86-
--ignore-date::
8786
--ignore-space-change::
8887
--ignore-whitespace::
8988
--whitespace=<option>::

Documentation/git-push.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ When the command line does not specify what to push with `<refspec>...`
3434
arguments or `--all`, `--mirror`, `--tags` options, the command finds
3535
the default `<refspec>` by consulting `remote.*.push` configuration,
3636
and if it is not found, honors `push.default` configuration to decide
37-
what to push (See gitlink:git-config[1] for the meaning of `push.default`).
37+
what to push (See linkgit:git-config[1] for the meaning of `push.default`).
3838

3939

4040
OPTIONS[[OPTIONS]]

Documentation/git.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ unreleased) version of Git, that is available from the 'master'
4343
branch of the `git.git` repository.
4444
Documentation for older releases are available here:
4545

46-
* link:v2.2.1/git.html[documentation for release 2.2.1]
46+
* link:v2.2.2/git.html[documentation for release 2.2.2]
4747

4848
* release notes for
49+
link:RelNotes/2.2.2.txt[2.2.2],
4950
link:RelNotes/2.2.1.txt[2.2.1],
5051
link:RelNotes/2.2.0.txt[2.2].
5152

GIT-VERSION-GEN

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
GVF=GIT-VERSION-FILE
4-
DEF_VER=v2.2.1
4+
DEF_VER=v2.2.2
55

66
LF='
77
'

Makefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,7 +1662,7 @@ GIT-SCRIPT-DEFINES: FORCE
16621662
fi
16631663

16641664

1665-
$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh GIT-SCRIPT-DEFINES
1665+
$(SCRIPT_SH_GEN) : % : %.sh GIT-SCRIPT-DEFINES
16661666
$(QUIET_GEN)$(cmd_munge_script) && \
16671667
chmod +x $@+ && \
16681668
mv $@+ $@
@@ -1676,8 +1676,11 @@ git.res: git.rc GIT-VERSION-FILE
16761676
$(join -DMAJOR= -DMINOR=, $(wordlist 1,2,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \
16771677
-DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@
16781678

1679+
# This makes sure we depend on the NO_PERL setting itself.
1680+
$(SCRIPT_PERL_GEN): GIT-BUILD-OPTIONS
1681+
16791682
ifndef NO_PERL
1680-
$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
1683+
$(SCRIPT_PERL_GEN): perl/perl.mak
16811684

16821685
perl/perl.mak: perl/PM.stamp
16831686

@@ -1690,7 +1693,7 @@ perl/perl.mak: GIT-CFLAGS GIT-PREFIX perl/Makefile perl/Makefile.PL
16901693
$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
16911694

16921695
PERL_DEFINES = $(PERL_PATH_SQ):$(PERLLIB_EXTRA_SQ)
1693-
$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl perl/perl.mak GIT-PERL-DEFINES GIT-VERSION-FILE
1696+
$(SCRIPT_PERL_GEN): % : %.perl perl/perl.mak GIT-PERL-DEFINES GIT-VERSION-FILE
16941697
$(QUIET_GEN)$(RM) $@ $@+ && \
16951698
INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \
16961699
INSTLIBDIR_EXTRA='$(PERLLIB_EXTRA_SQ)' && \
@@ -1724,7 +1727,7 @@ git-instaweb: git-instaweb.sh gitweb GIT-SCRIPT-DEFINES
17241727
chmod +x $@+ && \
17251728
mv $@+ $@
17261729
else # NO_PERL
1727-
$(patsubst %.perl,%,$(SCRIPT_PERL)) git-instaweb: % : unimplemented.sh
1730+
$(SCRIPT_PERL_GEN) git-instaweb: % : unimplemented.sh
17281731
$(QUIET_GEN)$(RM) $@ $@+ && \
17291732
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
17301733
-e 's|@@REASON@@|NO_PERL=$(NO_PERL)|g' \
@@ -1733,6 +1736,9 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)) git-instaweb: % : unimplemented.sh
17331736
mv $@+ $@
17341737
endif # NO_PERL
17351738

1739+
# This makes sure we depend on the NO_PYTHON setting itself.
1740+
$(SCRIPT_PYTHON_GEN): GIT-BUILD-OPTIONS
1741+
17361742
ifndef NO_PYTHON
17371743
$(SCRIPT_PYTHON_GEN): GIT-CFLAGS GIT-PREFIX GIT-PYTHON-VARS
17381744
$(SCRIPT_PYTHON_GEN): % : %.py

RelNotes

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

builtin/add.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ static int add_files(struct dir_struct *dir, int flags)
284284
for (i = 0; i < dir->ignored_nr; i++)
285285
fprintf(stderr, "%s\n", dir->ignored[i]->name);
286286
fprintf(stderr, _("Use -f if you really want to add them.\n"));
287-
die(_("no files added"));
287+
exit_status = 1;
288288
}
289289

290290
for (i = 0; i < dir->nr; i++)

builtin/checkout.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ static int update_some(const unsigned char *sha1, const char *base, int baselen,
6767
{
6868
int len;
6969
struct cache_entry *ce;
70+
int pos;
7071

7172
if (S_ISDIR(mode))
7273
return READ_TREE_RECURSIVE;
@@ -79,6 +80,23 @@ static int update_some(const unsigned char *sha1, const char *base, int baselen,
7980
ce->ce_flags = create_ce_flags(0) | CE_UPDATE;
8081
ce->ce_namelen = len;
8182
ce->ce_mode = create_ce_mode(mode);
83+
84+
/*
85+
* If the entry is the same as the current index, we can leave the old
86+
* entry in place. Whether it is UPTODATE or not, checkout_entry will
87+
* do the right thing.
88+
*/
89+
pos = cache_name_pos(ce->name, ce->ce_namelen);
90+
if (pos >= 0) {
91+
struct cache_entry *old = active_cache[pos];
92+
if (ce->ce_mode == old->ce_mode &&
93+
!hashcmp(ce->sha1, old->sha1)) {
94+
old->ce_flags |= CE_UPDATE;
95+
free(ce);
96+
return 0;
97+
}
98+
}
99+
82100
add_cache_entry(ce, ADD_CACHE_OK_TO_ADD | ADD_CACHE_OK_TO_REPLACE);
83101
return 0;
84102
}

0 commit comments

Comments
 (0)