From: Junio C Hamano <hidden> Date: 2016-06-15 22:42:39
It's been two weeks since the last "What's in" update, so here
is the current status.
* The 'master' branch has these since the last announcement.
- Andy Whitcroft spotted a long-standing bug that prevented
send-pack to deal correctly with a ref whose name is longer
than 45 bytes, where we did not have to have any such limit.
- Jakub Narebski keeps working on gitweb, with help from Aneesh
Kumar, Dennis Stosberg, Luben Tuikov, and Martin Waitz.
There are a lot of clean-ups, including these notables:
- mechanism to selectively enable or disable features by site
administrators and repository owners.
- snapshot and blame are now elective features using the above.
- gitweb no longer uses temporary files to generate diffs.
- Jakub also updated a few autoconf stuff.
- Christian Couder's GIT_TRACE updates.
- Franck Bui-Huu's clean-up to the code for "format-patch -s".
- git-daemon acquired a mechanism to selectively enable or
disable features by site administrators and repository
owners.
- pack-objects validates the data it copies from existing pack
or new-style loose objects.
- Other small clean-ups, fixes and updates from Johannes Schindelin,
Jonas Fonseca, Linus Torvalds, Martin Langhoff, Matthias Kestenholz,
Sergey Vlasov and Shawn Pearce.
- gitk updates from Paul Mackerras.
* The 'next' branch, in addition, has these.
- Andy Whitcroft taught send-pack to use git-rev-list --stdin
so that we do not have to be limited by the number of refs
exec() command-line can hold.
- Pasky's Git.pm is on hold; it was discussed and agreed that
Git.xs layer was a bit premature and is hurting the adoption
of the entire series.
- Franck Bui-Huu and Rene Scharfe with a bit help from me added
git-archive command to unify git-tar-tree/git-zip-tree and
make them accessible over network.
- Jeff King rewrote run_status() shell function in git-commit
and git-status in C.
- Per requests from the list, "git apply" automatically applies
binary patches without having to be given --binary flag.
- Likewise, "git diff --binary" does not give full index line for
non-binary part of the patch anymore.
- Pack-objects learned to run rev-list logic internally when
given --revs parameter; the refs arguments you would normally
give the upstream rev-list can be fed from its standard
input, instead of usual list of objects.
- Pack-objects also knows how to pretend objects that are in
named packs are unpacked. This would make easy to update
repack to incrementally pack loose objects and recent
"active" pack(s).
- I have a few patches to upload-pack that would help
upload-pack when downloader has more roots than the uploader
has, but this is frozen until I hear real-world feedback.
- unpack-objects learned a trick not to stop when fed a corrupt
pack; instead it can make the best effort to recover from
such an error that was detected.
* The 'pu' branch, in addition, has these.
- I have a wip to implement index, working tree and zero or
more trees in parallel but I haven't looked at it for some
time.
From: Jakub Narebski <hidden> Date: 2016-06-15 22:42:39
Junio C Hamano wrote:
- Andy Whitcroft taught send-pack to use git-rev-list --stdin
so that we do not have to be limited by the number of refs
exec() command-line can hold.
[...]
- Pack-objects learned to run rev-list logic internally when
given --revs parameter; the refs arguments you would normally
give the upstream rev-list can be fed from its standard
input, instead of usual list of objects.
BTW. could you please document the above?
Perhaps those two options, --stdin to feed arguments from standard input,
and -revs to run rev-list logic internally should be used whenever possible
in all the git commands? This would allow to avoid forks and/or command
line length limit.
In 'next' currently the following commands have --stdin implemented:
* git-update-index: --stdin to feed list of paths, one per line
* git-diff-tree: --stdin to loop over <tree-ish>, or pairs of
<tree-ish>[*1*]
* git-hash-object: --stdin is equivalent of '-' special file
* git-http-fetch and git-local-fetch have some strange --stdin
* git-name-rev with --stdin functions as filter
* git-rev-list: --stdin to feed list of <commits>; it is not clear from
the manpage if one can use ^<commit>, and commit related options
and shortcuts like --not, <commit>..<commit>, <commit>...<commit>
And the following have --revs implemented
* git-pack-objects: --revs to provide arguments to rev-list from stdin,
instead of list of objects. UNDOCUMENTED.
It would be nice if the following commands had --stdin or had it's --stdin
usage extended:
* git-diff-tree: --stdin to allow to provide path limits, separated
by ' -- ' from <tree-ish> or pair of <tree-ish> (does git-diff-tree allow
for diff3-like behavior? then perhaps also three <tree-ish>)
* git-ls-tree: --stdin to loop over <tree-ish>, one tree per line.
* git-cat-object: --stdin to loop over objects, plus -z to change separator
between records to NULL (or have it turned on by default).
For all "loop" --stdin, the output should begin with the line which was
arguments, like git-diff-tree outputs first <tree-ish> used for diff.
I think it is quite often to use git-rev-list ...| git-diff-tree ...
pipeline, so it might be worth to add --revs option to git-diff-tree.
Or it might not.
P.S. does git-merge take -F <file> option?
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
From: Junio C Hamano <hidden> Date: 2016-06-15 22:42:40
* The 'maint' branch has this since the last announcement (v1.4.2.1).
- Liu Yubao fixed duplicate xmalloc in builtin-add.
- "git-am --skip" incorrectly insisted that its standard
input to be connected to a tty. Fixed.
* The 'master' branch has these since the last announcement.
- http-fetch from a repository that uses alternates to borrow
from neighbouring repositories were quite broken for some
time now. This has been fixed (this fix is also in
v1.4.2.1).
- Andy Whitcroft taught send-pack to use git-rev-list --stdin
so that we can deal with repositories with massive number
of refs more efficiently.
- A handful clean-ups, fixes and documentation updates by
Christian Couder, Dmitry V. Levin, Jonas Fonseca and Linus.
- Franck Bui-Huu and Rene Scharfe added 'git-archive' command,
that will eventually supersede 'git-tar-tree' and
'git-zip-tree'.
I think zip-tree can be deprecated without hurting too many
users, judging from its short existence, but I suspect that
deprecating tar-tree needs to be done very carefully.
Perhaps we should drop "tar-tree --remote" and "upload-tar",
but keep tar-tree but make it internally a synonym for
"archive --format=tar". We should also update our toplevel
Makefile to use git-archive.
- Jakub Narebski continues improving gitweb with help from
Martin Waitz, and Matthias Lederhofer.
We really need some test suites for gitweb.
- Jeff King rewrote run_status() shell function used in
git-commit and git-status in C, and made it colorful while
he was at it. Johannes Schindelin taught it --untracked.
- unpack-objects with "-r" now makes the best effort to
recover objects from a corrupt packfile.
- apply does not need --binary anymore to take a binary patch.
- diff --binary does not produce full 40-byte index lines
unless necessary.
- pack-objects learned --revs option, which lets it not to
rely on rev-list. Instead of taking the list of objects to
pack from the standard input, it can read the list of rev
parameters and run rev-list logic internally.
- rev-list learned --unpacked=<existing pack> option.
- Linus taught git-grep "-h" option to suppress filename
output.
- "git-am --skip" incorrectly insisted that its standard
input to be connected to a tty. Fixed.
- "git-apply" learned to handle --unified=0 patches more
gracefully by allowing some sanity checks that cannot be
done with such patches to be disabled.
- Sasha Khapyorsky noticed that http-fetch commit walker can
almost deal with ftp:// transport already, and added
minimum updates to support it.
* The 'next' branch, in addition, has these.
- Git.pm is on hold, waiting for stripping out Git.xs part before
going forward.
- Linus introduced packed refs and taught the core about
them. Christian Couder taught git-branch about them and
Jeff King taught wt-status about it.
There are still some things that are broken which need to
be addressed before this series is pushed out to "master".
I offhand know of these two but there probably are others:
- "git branch -d" does not work.
- "git ls-remote rsync://" does not work.
- An experimental git-for-each-ref command to help language
bindings to get information on many refs at once. Hopefully
Jakub can teach gitweb to use it to speed things up.
* The 'pu' branch, in addition, has these.
- Jon Loeliger's git-daemon virtual hosting patch; this will be
dropped and replaced with his updated version.
- "git log --author=foo", "git log --grep=pattern" support.
- I haven't started cleaning up the para-walk changes yet; they
are still in the form of a messy 10-series patchset. When I
find time I'd like to rewrite diff-index with it and see how
well it performs.
From: Jakub Narebski <hidden> Date: 2016-06-15 22:42:40
Junio C Hamano wrote:
- An experimental git-for-each-ref command to help language
bindings to get information on many refs at once. Hopefully
Jakub can teach gitweb to use it to speed things up.
I use 'origin' (or 'next') version of gitweb, while using _released_
version of git (git-core-1.4.2.1-1.i386.rpm). So at least for now
I wouldn't be able to _test_ the git-for-each-ref.
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
From: Jakub Narebski <hidden> Date: 2016-06-15 22:42:40
Junio C Hamano wrote:
We really need some test suites for gitweb.
Could we use the git.git repository itself for testing gitweb?
At least checking if there are any errors or warnings?
The problem with test suite is that you really need _two_ tests;
first if there are any errors or warnings, then if page looks like
it should. The first can be done by simply running gitweb with
at least the following enviromental variables set:
export GATEWAY_INTERFACE="CGI/1.1"
export HTTP_ACCEPT="*/*"
export REQUEST_METHOD="GET"
export QUERY_STRING=""$1""
The second should be done by looking at gitweb output.
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
- Franck Bui-Huu and Rene Scharfe added 'git-archive' command,
that will eventually supersede 'git-tar-tree' and
'git-zip-tree'.
I still have one issue, but haven't found out the solution yet.
Actually I even don't know if its related to 'archive/upload-archive'
commands. Could someone give it a try to tell me if he can at least
reproduce it ?
Here is the scenario (git-daemon and git-archive are executed on the
same machine):
git-daemon is started with the following command:
$ git daemon --verbose --syslog --export-all \
--enable=upload-archive --base-path=/home/fbuihuu/tmp/ --reuseaddr
git-archive is run to archive a small repo located in ~/tmp/test-git.
This is done in an endless loop:
$ while true; do
git archive --format=tar --remote=git://localhost/test-git HEAD | tar tf -
done
a
b
a
b
a
b
a
b
a
b
a
b
a
b # stuck !!!
So after a couple of loops, git-archive is stuck waiting for git-daemon but
daemon seems to be stuck somewhere.
Syslog shows something interesting here:
[...]
Sep 18 16:11:42 25-fbuihuu git-daemon: [16549] Connection from 127.0.0.1:30373
Sep 18 16:11:42 25-fbuihuu git-daemon: [16549] Extended attributes (16 bytes) exist <host=localhost>
Sep 18 16:11:42 25-fbuihuu git-daemon: [16549] Request upload-archive for '/test-git2'
Sep 18 16:11:42 25-fbuihuu git-upload-archive: finished
Sep 18 16:11:42 25-fbuihuu git-daemon: [16549] Disconnected
Sep 18 16:11:42 25-fbuihuu git-daemon: [16553] Connection from 127.0.0.1:30629
Sep 18 16:11:42 25-fbuihuu git-daemon: [16553] Extended attributes (16 bytes) exist <host=localhost>
Sep 18 16:11:42 25-fbuihuu git-daemon: [16553] Request upload-archive for '/test-git2'
Sep 18 16:11:42 25-fbuihuu git-upload-archive: finished
[END]
It looks like git-daemon never receives the SIGCHLD signal that is
normally sent by upload-archive once it has finished its job.
Franck
From: Junio C Hamano <hidden> Date: 2016-06-15 22:42:41
* The 'maint' branch has these fixes since the last announcement.
t3403-rebase-skip failed when run while its standard input is
connected to /dev/null. It turns out that an earlier safety
check to prevent git-am to be fed a new patch while there is
a leftover .dotest/ directory was incorrect. Fixed.
There was an unnecessary xmalloc() in builtin-add. Removed.
* The 'master' branch has these since the last announcement.
Recent change to http-fetch.c did not play well with older
curl releases. Fixed.
Clean-up of gitweb continues. Notably, generation the
summary page makes fewer call to git executable.
Receive-pack has an added safety check that lets the
repository owner to forbid non-fast-forward push into a
shared repository by setting receive.denyNonFastforwards
configuration variable.
Output from git-describe can now be used as an abbreviated
object name.
git-resolve is now officially deprecated. The next "master"
release (1.4.3) will ship with a version that gives an
annoying "deprecation warning" message, and the command will
be removed from the release after that.
There was a build problem in upload-archive on OpenBSD. Fixed.
git-zip-tree is now superseded by "git-archive --format=zip".
Miscellaneous clean-ups and documentation updates.
* The 'next' branch, in addition, has these.
A new command git-show-ref was added to list and verify local
references.
A new command git-for-each-ref was added to help Porcelains
to make smaller number of calls to git binary to obtain
summary information for refs.
cvsimport was updated to use git-for-each-ref.
Git.pm topic lost Git.xs for now.
The resolve_ref() internal API was straightened out to work
solely on refname (i.e. string that begins with "refs/"),
instead of pathnames. To deal with many refs efficiently,
there is now a "packed-ref" format where many refs are stored
in a single flat file instead of the traditional
one-ref-per-file format.
git-diff --color highlights trailing whitespaces and SP
followed by TAB in indentation as common whitespace errors.
git-daemon now has a virtual host support.
upload-pack stops the fetch-pack on the other side when
downloader has more roots than uploader; otherwise the
downloader would send "have" from a development line that
the uploader does not know about til its root.
git-log learned --author=, --committer= and --grep= options
to filter commits.
pack-objects now creates version 3 packs; this allows a copy
of larger block of data to be expressed.
Per branch configuration items branch."branchname".remote can
specify what remotes/ file instead of usual "origin" should
be used when no option is given to "git fetch" while on the
named branch. Similarly, branch."branchname".merge can
specify which remote branches to be merged while on the named
branch.
git-svnimport learned a new trick to parse log message for
Signed-off-by: lines and pick authorship information from
there. I haven't heard Ack nor Nack from any subversion
users, but we will hopefully hear somebody scream if it
breaks things after pushing it out to "master".
* The 'pu' branch, in addition, has these.
git-apply --whitespace learned to notice SP before TAB in
indent as a common whitespace error, in addition to the
trailing whitespaces it already knew about.
git-diff output is unfriendly to GNU patch when the filename
contained a SP. Appending a TAB after filename in this case
works the problem around. However, git-apply needs to learn
about it as well, so it did.
There is one new data type in the pack format that records
delta base object by offset in the stream instead of 20-byte
object name. This reduces the resulting packsize by 3 to 5%.
One additional test for git-branch is in, but the current
implementation of git-branch fails it.