Merge branch 'master' into next

* master:
  Update draft release notes to 1.7.1
  Update draft release notes to 1.7.0.3
  fetch: Fix minor memory leak
  fetch: Future-proof initialization of a refspec on stack
  fetch: Check for a "^{}" suffix with suffixcmp()
  Fix a spelling mistake in a git-p4 console message
  Use test_expect_success for test setups
  daemon: parse_host_and_port SIGSEGV if port is specified
  Makefile: Fix occasional GIT-CFLAGS breakage
  Makefile: Fix CDPATH problem
  notes.c: remove inappropriate call to return
  pull: replace unnecessary sed invocation
This commit is contained in:
Junio C Hamano
2010-03-20 11:43:02 -07:00
13 changed files with 131 additions and 78 deletions

View File

@@ -9,6 +9,9 @@ Fixes since v1.7.0.2
* "git add -i" didn't handle a deleted path very well.
* "git blame" padded line numbers with one extra SP when the total number
of lines was one less than multiple of ten due to an off-by-one error.
* "git fetch --all/--multi" used to discard information for remotes that
are fetched earlier.
@@ -16,6 +19,9 @@ Fixes since v1.7.0.2
or are written by "me", instead of the ones that have "it" _and_ are
written by "me".
* "git log -g branch" misbehaved when there was no entries in the reflog
for the named branch.
* "git mailinfo" (hence "git am") incorrectly removed initial indent from
paragraphs.
@@ -30,5 +36,5 @@ And other minor fixes and documentation updates.
--
exec >/var/tmp/1
echo O=$(git describe)
O=v1.7.0.2-53-g6eb3adf
O=v1.7.0.2-69-g730b020
git shortlog --no-merges $O..

View File

@@ -4,22 +4,51 @@ Git v1.7.1 Release Notes (draft)
Updates since v1.7.0
--------------------
* Some commands (e.g. svn and http interfaces) that interactively ask
password can be told to use an external program given via GIT_ASKPASS.
* Color values given to "color.<cmd>.<slot>" configuration can now have
more than one attributes (e.g. "bold ul").
* "git apply --whitespace=fix" didn't work well when an early patch in
a patch series adds trailing blank lines and a later one depended on
such a block of blank lines at the end.
* "git am" learned "--keep-cr" option to handle inputs that are
mixture of changes to files with and without CRLF line endings.
* "git cvsimport" learned -R option to leave revision mapping between
CVS revisions and resulting git commits.
* "git for-each-ref" learned %(symref), %(symref:short) and %(flag)
tokens.
* "git hash-object --stdin-paths" can take "--no-filters" option now.
* "git init" can be told to look at init.templatedir configuration
variable (obviously that has to come from either /etc/gitconfig or
$HOME/.gitconfig).
* "git grep" learned "--no-index" option, to search inside contents that
are not managed by git.
* "git grep" learned --color=auto/always/never.
* "git hash-object --stdin-paths" can take "--no-filters" option now.
* "git grep" learned to paint filename and line-number in colors.
* "git merge-file" learned to use custom conflict marker size and also use
the "union merge" behaviour.
* "git notes" command has been rewritten in C and learned quite a
many commands.
* "git request-pull" identifies the commit the request is relative to in
a more readable way.
* "git reset" learned "--keep" option that lets you discard commits
near the tip while preserving your local changes in a way similar
to how "git checkout branch" does.
* "git svn" should work better when interacting with repositories
with CRLF line endings.
@@ -31,8 +60,11 @@ Fixes since v1.7.0
All of the fixes in v1.7.0.X maintenance series are included in this
release, unless otherwise noted.
* "git add frotz/nitfol" did not complain when the entire frotz/ directory
was ignored.
---
exec >/var/tmp/1
echo O=$(git describe)
O=v1.7.0.2-181-gc6830a3
O=v1.7.0.2-322-g4e7d08a
git shortlog --no-merges ^maint $O..

View File

@@ -316,6 +316,7 @@ BUILTIN_OBJS =
BUILT_INS =
COMPAT_CFLAGS =
COMPAT_OBJS =
EXTRA_CPPFLAGS =
LIB_H =
LIB_OBJS =
PROGRAM_OBJS =
@@ -326,6 +327,12 @@ SCRIPT_SH =
SCRIPT_LIB =
TEST_PROGRAMS_NEED_X =
# Having this variable in your environment would break pipelines because
# you cause "cd" to echo its destination to stdout. It can also take
# scripts to unexpected places. If you like CDPATH, define it for your
# interactive shell sessions without exporting it.
unexport CDPATH
SCRIPT_SH += git-am.sh
SCRIPT_SH += git-bisect.sh
SCRIPT_SH += git-difftool--helper.sh
@@ -1480,7 +1487,7 @@ strip: $(PROGRAMS) git$X
$(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X
git.o: common-cmds.h
git.s git.o: ALL_CFLAGS += -DGIT_VERSION='"$(GIT_VERSION)"' \
git.s git.o: EXTRA_CPPFLAGS = -DGIT_VERSION='"$(GIT_VERSION)"' \
'-DGIT_HTML_PATH="$(htmldir_SQ)"'
git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
@@ -1488,7 +1495,7 @@ git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
$(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
builtin/help.o: common-cmds.h
builtin/help.s builtin/help.o: ALL_CFLAGS += \
builtin/help.s builtin/help.o: EXTRA_CPPFLAGS = \
'-DGIT_HTML_PATH="$(htmldir_SQ)"' \
'-DGIT_MAN_PATH="$(mandir_SQ)"' \
'-DGIT_INFO_PATH="$(infodir_SQ)"'
@@ -1714,13 +1721,13 @@ endif
ifndef CHECK_HEADER_DEPENDENCIES
$(C_OBJ): %.o: %.c GIT-CFLAGS $(missing_dep_dirs)
$(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $<
$(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<
$(ASM_OBJ): %.o: %.S GIT-CFLAGS $(missing_dep_dirs)
$(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $<
$(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<
endif
%.s: %.c GIT-CFLAGS FORCE
$(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $<
$(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<
ifdef USE_COMPUTED_HEADER_DEPENDENCIES
# Take advantage of gcc's on-the-fly dependency generation
@@ -1760,20 +1767,20 @@ xdiff-interface.o $(XDIFF_OBJS): \
xdiff/xutils.h xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
endif
exec_cmd.s exec_cmd.o: ALL_CFLAGS += \
exec_cmd.s exec_cmd.o: EXTRA_CPPFLAGS = \
'-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' \
'-DBINDIR="$(bindir_relative_SQ)"' \
'-DPREFIX="$(prefix_SQ)"'
builtin/init-db.s builtin/init-db.o: ALL_CFLAGS += \
builtin/init-db.s builtin/init-db.o: EXTRA_CPPFLAGS = \
-DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"'
config.s config.o: ALL_CFLAGS += -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"'
config.s config.o: EXTRA_CPPFLAGS = -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"'
http.s http.o: ALL_CFLAGS += -DGIT_USER_AGENT='"git/$(GIT_VERSION)"'
http.s http.o: EXTRA_CPPFLAGS = -DGIT_USER_AGENT='"git/$(GIT_VERSION)"'
ifdef NO_EXPAT
http-walker.s http-walker.o: ALL_CFLAGS += -DNO_EXPAT
http-walker.s http-walker.o: EXTRA_CPPFLAGS = -DNO_EXPAT
endif
git-%$X: %.o $(GITLIBS)

View File

@@ -107,10 +107,8 @@ static void add_merge_config(struct ref **head,
* there is no entry in the resulting FETCH_HEAD marked
* for merging.
*/
memset(&refspec, 0, sizeof(refspec));
refspec.src = branch->merge[i]->src;
refspec.dst = NULL;
refspec.pattern = 0;
refspec.force = 0;
get_fetch_map(remote_refs, &refspec, tail, 1);
for (rm = *old_tail; rm; rm = rm->next)
rm->merge = 1;
@@ -391,9 +389,10 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
fputc(url[i], fp);
fputc('\n', fp);
if (ref)
if (ref) {
rc |= update_local_ref(ref, what, note);
else
free(ref);
} else
sprintf(note, "* %-*s %-*s -> FETCH_HEAD",
TRANSPORT_SUMMARY_WIDTH, *kind ? kind : "branch",
REFCOL_WIDTH, *what ? what : "HEAD");
@@ -590,7 +589,7 @@ static void find_non_local_tags(struct transport *transport,
* to fetch then we can mark the ref entry in the list
* as one to ignore by setting util to NULL.
*/
if (!strcmp(ref->name + strlen(ref->name) - 3, "^{}")) {
if (!suffixcmp(ref->name, "^{}")) {
if (item && !has_sha1_file(ref->old_sha1) &&
!will_fetch(head, ref->old_sha1) &&
!has_sha1_file(item->util) &&

View File

@@ -802,7 +802,7 @@ class P4Submit(Command):
self.oldWorkingDirectory = os.getcwd()
chdir(self.clientPath)
print "Syncronizing p4 checkout..."
print "Synchronizing p4 checkout..."
p4_system("sync ...")
self.check()

View File

@@ -420,7 +420,7 @@ static void parse_host_and_port(char *hostport, char **host,
*host = hostport;
*port = strrchr(hostport, ':');
if (*port) {
*port = '\0';
**port = '\0';
++*port;
}
}

View File

@@ -41,7 +41,7 @@ strategy_args= diffstat= no_commit= squash= no_ff= ff_only=
log_arg= verbosity= progress=
merge_args=
curr_branch=$(git symbolic-ref -q HEAD)
curr_branch_short=$(echo "$curr_branch" | sed "s|refs/heads/||")
curr_branch_short="${curr_branch#refs/heads/}"
rebase=$(git config --bool branch.$curr_branch_short.rebase)
while :
do

View File

@@ -1031,7 +1031,7 @@ void remove_note(struct notes_tree *t, const unsigned char *object_sha1)
t->dirty = 1;
hashcpy(l.key_sha1, object_sha1);
hashclr(l.val_sha1);
return note_tree_remove(t, t->root, 0, &l);
note_tree_remove(t, t->root, 0, &l);
}
const unsigned char *get_note(struct notes_tree *t,

View File

@@ -11,9 +11,11 @@ line.
'
. ./test-lib.sh
touch foo bar
git update-index --add foo bar
git commit -m "add foo bar"
test_expect_success 'setup' '
touch foo bar &&
git update-index --add foo bar &&
git commit -m "add foo bar"
'
test_expect_success \
'git ls-files --error-unmatch should fail with unmatched path.' \

View File

@@ -22,10 +22,12 @@ check_verify_failure () {
###########################################################
# first create a commit, so we have a valid object/type
# for the tag.
echo Hello >A
git update-index --add A
git commit -m "Initial commit"
head=$(git rev-parse --verify HEAD)
test_expect_success 'setup' '
echo Hello >A &&
git update-index --add A &&
git commit -m "Initial commit" &&
head=$(git rev-parse --verify HEAD)
'
############################################################
# 1. length check

View File

@@ -20,23 +20,25 @@ EOF
cat file1 >file2
cat file1 >file4
git update-index --add --remove file1 file2 file4
git commit -m 'Initial Version' 2>/dev/null
test_expect_success 'setup' "
git update-index --add --remove file1 file2 file4 &&
git commit -m 'Initial Version' 2>/dev/null &&
git checkout -b binary
perl -pe 'y/x/\000/' <file1 >file3
cat file3 >file4
git add file2
perl -pe 'y/\000/v/' <file3 >file1
rm -f file2
git update-index --add --remove file1 file2 file3 file4
git commit -m 'Second Version'
git checkout -b binary &&
perl -pe 'y/x/\000/' <file1 >file3 &&
cat file3 >file4 &&
git add file2 &&
perl -pe 'y/\000/v/' <file3 >file1 &&
rm -f file2 &&
git update-index --add --remove file1 file2 file3 file4 &&
git commit -m 'Second Version' &&
git diff-tree -p master binary >B.diff
git diff-tree -p -C master binary >C.diff
git diff-tree -p master binary >B.diff &&
git diff-tree -p -C master binary >C.diff &&
git diff-tree -p --binary master binary >BF.diff
git diff-tree -p --binary -C master binary >CF.diff
git diff-tree -p --binary master binary >BF.diff &&
git diff-tree -p --binary -C master binary >CF.diff
"
test_expect_success 'stat binary diff -- should not fail.' \
'git checkout master

View File

@@ -8,40 +8,42 @@ test_description='git rerere
. ./test-lib.sh
cat > a1 << EOF
Some title
==========
Whether 'tis nobler in the mind to suffer
The slings and arrows of outrageous fortune,
Or to take arms against a sea of troubles,
And by opposing end them? To die: to sleep;
No more; and by a sleep to say we end
The heart-ache and the thousand natural shocks
That flesh is heir to, 'tis a consummation
Devoutly to be wish'd.
EOF
test_expect_success 'setup' "
cat > a1 <<- EOF &&
Some title
==========
Whether 'tis nobler in the mind to suffer
The slings and arrows of outrageous fortune,
Or to take arms against a sea of troubles,
And by opposing end them? To die: to sleep;
No more; and by a sleep to say we end
The heart-ache and the thousand natural shocks
That flesh is heir to, 'tis a consummation
Devoutly to be wish'd.
EOF
git add a1
git commit -q -a -m initial
git add a1 &&
git commit -q -a -m initial &&
git checkout -b first
cat >> a1 << EOF
Some title
==========
To die, to sleep;
To sleep: perchance to dream: ay, there's the rub;
For in that sleep of death what dreams may come
When we have shuffled off this mortal coil,
Must give us pause: there's the respect
That makes calamity of so long life;
EOF
git commit -q -a -m first
git checkout -b first &&
cat >> a1 <<- EOF &&
Some title
==========
To die, to sleep;
To sleep: perchance to dream: ay, there's the rub;
For in that sleep of death what dreams may come
When we have shuffled off this mortal coil,
Must give us pause: there's the respect
That makes calamity of so long life;
EOF
git commit -q -a -m first &&
git checkout -b second master
git show first:a1 |
sed -e 's/To die, t/To die! T/' -e 's/Some title/Some Title/' > a1
echo "* END *" >>a1
git commit -q -a -m second
git checkout -b second master &&
git show first:a1 |
sed -e 's/To die, t/To die! T/' -e 's/Some title/Some Title/' > a1 &&
echo '* END *' >>a1 &&
git commit -q -a -m second
"
test_expect_success 'nothing recorded without rerere' '
(rm -rf .git/rr-cache; git config rerere.enabled false) &&

View File

@@ -15,9 +15,10 @@ code and message.'
# ----------------------------------------------------------------------
# snapshot settings
test_commit \
'SnapshotTests' \
'i can has snapshot?'
test_expect_success 'setup' "
test_commit 'SnapshotTests' 'i can has snapshot?'
"
cat >>gitweb_config.perl <<\EOF
$feature{'snapshot'}{'override'} = 0;