Merge branch 'master' into next

* master:
  "git-fetch --tags $URL" should not overwrite existing tags
  for-each-reflog: not having $GIT_DIR/logs directory is not an error.
  Do not forget to pack objects reachable from HEAD reflog.
  Work around Subversion race in git-svn tests.
  Clarify that git-update-server-info should be run for every git-push
This commit is contained in:
Junio C Hamano
2007-02-12 23:41:55 -08:00
9 changed files with 25 additions and 27 deletions

View File

@@ -133,14 +133,14 @@ info::
in this directory.
info/refs::
This file is to help dumb transports to discover what
refs are available in this repository. Whenever you
create/delete a new branch or a new tag, `git
update-server-info` should be run to keep this file
up-to-date if the repository is published for dumb
transports. The `git-receive-pack` command, which is
run on a remote repository when you `git push` into it,
runs `hooks/update` hook to help you achieve this.
This file helps dumb transports discover what refs are
available in this repository. If the repository is
published for dumb transports, this file should be
regenerated by `git update-server-info` every time a tag
or branch is created or modified. This is normally done
from the `hooks/update` hook, which is run by the
`git-receive-pack` command when you `git push` into the
repository.
info/grafts::
This file records fake commit ancestry information, to

View File

@@ -253,23 +253,10 @@ if test "$tags"
then
taglist=`IFS=' ' &&
echo "$ls_remote_result" |
git-show-ref --exclude-existing=refs/tags/ |
while read sha1 name
do
case "$sha1" in
fail)
exit 1
esac
case "$name" in
*^*) continue ;;
refs/tags/*) ;;
*) continue ;;
esac
if git-check-ref-format "$name"
then
echo ".${name}:${name}"
else
echo >&2 "warning: tag ${name} ignored"
fi
echo ".${name}:${name}"
done` || exit
if test "$#" -gt 1
then

2
refs.c
View File

@@ -1251,7 +1251,7 @@ static int do_for_each_reflog(const char *base, each_ref_fn fn, void *cb_data)
free(log);
closedir(dir);
}
else
else if (*base)
return errno;
return retval;
}

View File

@@ -532,7 +532,7 @@ static void handle_reflog(struct rev_info *revs, unsigned flags)
struct all_refs_cb cb;
cb.all_revs = revs;
cb.all_flags = flags;
for_each_ref(handle_one_reflog, &cb);
for_each_reflog(handle_one_reflog, &cb);
}
static int add_parents_only(struct rev_info *revs, const char *arg, int flags)

View File

@@ -45,3 +45,6 @@ fi
svnrepo="file://$svnrepo"
poke() {
perl -e '@x = stat($ARGV[0]); utime($x[8], $x[9] + 1, $ARGV[0])' "$1"
}

View File

@@ -56,11 +56,14 @@ test_expect_success 'checkout working copy from svn' "svn co $svnrepo test_wc"
test_expect_success 'setup some commits to svn' \
'cd test_wc &&
echo Greetings >> kw.c &&
poke kw.c &&
svn commit -m "Not yet an Id" &&
echo Hello world >> kw.c &&
poke kw.c &&
svn commit -m "Modified file, but still not yet an Id" &&
svn propset svn:keywords Id kw.c &&
svn commit -m "Propset Id"
poke kw.c &&
svn commit -m "Propset Id" &&
cd ..'
test_expect_success 'initialize git-svn' "git-svn init $svnrepo"
@@ -83,7 +86,7 @@ test_expect_success "propset CR on crlf files" \
svn propset svn:eol-style CR empty &&
svn propset svn:eol-style CR crlf &&
svn propset svn:eol-style CR ne_crlf &&
svn commit -m "propset CR on crlf files"
svn commit -m "propset CR on crlf files" &&
cd ..'
test_expect_success 'fetch and pull latest from svn and checkout a new wc' \

View File

@@ -16,6 +16,7 @@ test_expect_success 'initialize repo' "
svn co $svnrepo wc &&
cd wc &&
echo feedme >> branches/a/readme &&
poke branches/a/readme &&
svn commit -m hungry &&
cd trunk &&
svn merge -r3:4 $svnrepo/branches/a &&

View File

@@ -16,11 +16,13 @@ test_expect_success 'initialize repo' "
svn co $svnrepo wc &&
cd wc &&
echo world >> trunk/readme &&
poke trunk/readme &&
svn commit -m 'another commit' &&
svn up &&
svn mv -m 'rename to thunk' trunk thunk &&
svn up &&
echo goodbye >> thunk/readme &&
poke thunk/readme &&
svn commit -m 'bye now' &&
cd ..
"

View File

@@ -18,6 +18,7 @@ test_expect_success 'commit change from svn side' "
svn co $svnrepo t.svn &&
cd t.svn &&
echo second line from svn >> file &&
poke file &&
svn commit -m 'second line from svn' &&
cd .. &&
rm -rf t.svn
@@ -45,6 +46,7 @@ test_expect_failure 'dcommit fails to commit because of conflict' "
svn co $svnrepo t.svn &&
cd t.svn &&
echo fourth line from svn >> file &&
poke file &&
svn commit -m 'fourth line from svn' &&
cd .. &&
rm -rf t.svn &&