* Re: difftool -d symlinks, under what conditions
From: Junio C Hamano @ 2013-03-13 19:28 UTC (permalink / raw)
To: John Keeping
Cc: David Aguilar, Matt McClure, git@vger.kernel.org, Tim Henigan
In-Reply-To: <20130313180106.GL2317@serenity.lan>
John Keeping <john@keeping.me.uk> writes:
> On Wed, Mar 13, 2013 at 10:40:55AM -0700, Junio C Hamano wrote:
>> John Keeping <john@keeping.me.uk> writes:
>>
>> > git-hash-object(1) implies that it will apply the clean filter and EOL
>> > conversion when it's given a path to a file in the working tree (as it
>> > is here). Is that not the case?
>>
>> Applying clean to smudged contents _ought to_ recover clean version,
>> but is that "ought to" something you would want to rely on?
>
> How does git-status figure out that file that has been touch'd does not
> have unstaged changes without relying on this? Surely this case is no
> different from that?
I just checked. ce_modified_check_fs() does ce_compare_data() which
does the same "hash the path and compare the resulting hash". So I
think we are OK.
Thanks.
^ permalink raw reply
* Re: [RFC/PATCH] Documentation/technical/api-fswatch.txt: start with outline
From: Junio C Hamano @ 2013-03-13 19:38 UTC (permalink / raw)
To: Karsten Blees
Cc: Duy Nguyen, Ramkumar Ramachandra, Git List,
Torsten Bögershausen, Robert Zeh, Jeff King, Erik Faye-Lund,
Drew Northup
In-Reply-To: <5140BC80.4000201@gmail.com>
Karsten Blees <karsten.blees@gmail.com> writes:
> However, AFAIK inotify doesn't work recursively, so the daemon
> would at least have to track the directory structure to be able to
> register / unregister inotify handlers as directories come and go.
Yes, and you would need one inotify per directory but you do not
have an infinite supply of outstanding inotify watch (wasn't the
limit like 8k per a single uid or something?), so the daemon must be
prepared to say "I'll watch this, that and that directories, but the
consumers should check other directories themselves."
FWIW, I share your suspicion that an effort in the direction this
thread suggests may end up duplicating what the caching vfs layer
already does, and doing so poorly.
^ permalink raw reply
* Deletion of git repo causes incorrect block count on HFS+ case-sensitive
From: Ismail Tabtabai @ 2013-03-13 18:45 UTC (permalink / raw)
To: git
Hello,
When I delete a git repo that I have cloned on my machine using 'rm -rf repo-name' I get an incorrect block count when I attempt a Disk Repair.
I am running OS X 10.8.2 on a user installed SSD. The git version is 1.8.1.5.
Checking file systemChecking Journaled HFS Plus volume.
Detected a case-sensitive volume.
Checking extents overflow file.
Checking catalog file.
Incorrect block count for file pack-8c0dc1a398a22c58ea1eba09de3ee9d935ad1ea3.pack
(It should be 4865 instead of 12244)
Incorrect block count for file pack-db61a037ad0e043e801d8ba1db98b1af14d466af.pack
(It should be 5889 instead of 12245)
Incorrect block count for file pack-db61a037ad0e043e801d8ba1db98b1af14d466af.pack
(It should be 6220 instead of 12245)
Incorrect block count for file pack-286c1444bc32ee2ed0af1d15070e0e31f22ba0a8.pack
(It should be 7937 instead of 12246)
Checking multi-linked files.
Checking catalog hierarchy.
Checking extended attributes file.
Checking volume bitmap.
Volume bitmap needs minor repair for orphaned blocks
Checking volume information.
Invalid volume free block count
(It should be 85306183 instead of 85282114)
Repairing volume.
Rechecking volume.
Checking Journaled HFS Plus volume.
Detected a case-sensitive volume.
Checking extents overflow file.
Checking catalog file.
Checking multi-linked files.
Checking catalog hierarchy.
Checking extended attributes file.
Checking volume bitmap.
Checking volume information.
The volume avicenna was repaired successfully.
Volume repair complete.Updating boot support partitions for the volume as required.
^ permalink raw reply
* [ANNOUNCE] Git v1.8.2
From: Junio C Hamano @ 2013-03-13 20:26 UTC (permalink / raw)
To: git; +Cc: Linux Kernel
The latest feature release Git v1.8.2 is now available at the
usual places.
The release tarballs are found at:
http://code.google.com/p/git-core/downloads/list
and their SHA-1 checksums are:
42960ec7c2d8404af3d3f6d21f32f1e97e6e0a96 git-1.8.2.tar.gz
db1ca968f492f7ad1d4e0c13d07f23c745d10b74 git-htmldocs-1.8.2.tar.gz
a10083a2a1fe6b35919fd6765f25dec18f4fa752 git-manpages-1.8.2.tar.gz
Also the following public repositories all have a copy of the v1.8.2
tag and the master branch that the tag points at:
url = https://kernel.googlesource.com/pub/scm/git/git
url = git://repo.or.cz/alt-git.git
url = https://code.google.com/p/git-core/
url = git://git.sourceforge.jp/gitroot/git-core/git.git
url = git://git-core.git.sourceforge.net/gitroot/git-core/git-core
url = https://github.com/gitster/git
Git v1.8.2 Release Notes
========================
Backward compatibility notes (this release)
-------------------------------------------
"git push $there tag v1.2.3" used to allow replacing a tag v1.2.3
that already exists in the repository $there, if the rewritten tag
you are pushing points at a commit that is a descendant of a commit
that the old tag v1.2.3 points at. This was found to be error prone
and starting with this release, any attempt to update an existing
ref under refs/tags/ hierarchy will fail, without "--force".
When "git add -u" and "git add -A" that does not specify what paths
to add on the command line is run from inside a subdirectory, the
scope of the operation has always been limited to the subdirectory.
Many users found this counter-intuitive, given that "git commit -a"
and other commands operate on the entire tree regardless of where you
are. In this release, these commands give a warning message that
suggests the users to use "git add -u/-A ." when they want to limit
the scope to the current directory; doing so will squelch the message,
while training their fingers.
Backward compatibility notes (for Git 2.0)
------------------------------------------
When "git push [$there]" does not say what to push, we have used the
traditional "matching" semantics so far (all your branches were sent
to the remote as long as there already are branches of the same name
over there). In Git 2.0, the default will change to the "simple"
semantics that pushes the current branch to the branch with the same
name, only when the current branch is set to integrate with that
remote branch. There is a user preference configuration variable
"push.default" to change this. If you are an old-timer who is used
to the "matching" semantics, you can set it to "matching" to keep the
traditional behaviour. If you want to live in the future early,
you can set it to "simple" today without waiting for Git 2.0.
When "git add -u" and "git add -A", that does not specify what paths
to add on the command line is run from inside a subdirectory, these
commands will operate on the entire tree in Git 2.0 for consistency
with "git commit -a" and other commands. Because there will be no
mechanism to make "git add -u" behave as if "git add -u .", it is
important for those who are used to "git add -u" (without pathspec)
updating the index only for paths in the current subdirectory to start
training their fingers to explicitly say "git add -u ." when they mean
it before Git 2.0 comes.
Updates since v1.8.1
--------------------
UI, Workflows & Features
* Initial ports to QNX and z/OS UNIX System Services have started.
* Output from the tests is coloured using "green is okay, yellow is
questionable, red is bad and blue is informative" scheme.
* Mention of "GIT/Git/git" in the documentation have been updated to
be more uniform and consistent. The name of the system and the
concept it embodies is "Git"; the command the users type is "git".
All-caps "GIT" was merely a way to imitate "Git" typeset in small
caps in our ASCII text only documentation and to be avoided.
* The completion script (in contrib/completion) used to let the
default completer to suggest pathnames, which gave too many
irrelevant choices (e.g. "git add" would not want to add an
unmodified path). It learnt to use a more git-aware logic to
enumerate only relevant ones.
* In bare repositories, "git shortlog" and other commands now read
mailmap files from the tip of the history, to help running these
tools in server settings.
* Color specifiers, e.g. "%C(blue)Hello%C(reset)", used in the
"--format=" option of "git log" and friends can be disabled when
the output is not sent to a terminal by prefixing them with
"auto,", e.g. "%C(auto,blue)Hello%C(auto,reset)".
* Scripts can ask Git that wildcard patterns in pathspecs they give do
not have any significance, i.e. take them as literal strings.
* The patterns in .gitignore and .gitattributes files can have **/,
as a pattern that matches 0 or more levels of subdirectory.
E.g. "foo/**/bar" matches "bar" in "foo" itself or in a
subdirectory of "foo".
* When giving arguments without "--" disambiguation, object names
that come earlier on the command line must not be interpretable as
pathspecs and pathspecs that come later on the command line must
not be interpretable as object names. This disambiguation rule has
been tweaked so that ":/" (no other string before or after) is
always interpreted as a pathspec; "git cmd -- :/" is no longer
needed, you can just say "git cmd :/".
* Various "hint" lines Git gives when it asks the user to edit
messages in the editor are commented out with '#' by default. The
core.commentchar configuration variable can be used to customize
this '#' to a different character.
* "git add -u" and "git add -A" without pathspec issues warning to
make users aware that they are only operating on paths inside the
subdirectory they are in. Use ":/" (everything from the top) or
"." (everything from the $cwd) to disambiguate.
* "git blame" (and "git diff") learned the "--no-follow" option.
* "git branch" now rejects some nonsense combinations of command line
arguments (e.g. giving more than one branch name to rename) with
more case-specific error messages.
* "git check-ignore" command to help debugging .gitignore files has
been added.
* "git cherry-pick" can be used to replay a root commit to an unborn
branch.
* "git commit" can be told to use --cleanup=whitespace by setting the
configuration variable commit.cleanup to 'whitespace'.
* "git diff" and other Porcelain commands can be told to use a
non-standard algorithm by setting diff.algorithm configuration
variable.
* "git fetch --mirror" and fetch that uses other forms of refspec
with wildcard used to attempt to update a symbolic ref that match
the wildcard on the receiving end, which made little sense (the
real ref that is pointed at by the symbolic ref would be updated
anyway). Symbolic refs no longer are affected by such a fetch.
* "git format-patch" now detects more cases in which a whole branch
is being exported, and uses the description for the branch, when
asked to write a cover letter for the series.
* "git format-patch" learned "-v $count" option, and prepends a
string "v$count-" to the names of its output files, and also
automatically sets the subject prefix to "PATCH v$count". This
allows patches from rerolled series to be stored under different
names and makes it easier to reuse cover letter messages.
* "git log" and friends can be told with --use-mailmap option to
rewrite the names and email addresses of people using the mailmap
mechanism.
* "git log --cc --graph" now shows the combined diff output with the
ancestry graph.
* "git log --grep=<pattern>" honors i18n.logoutputencoding to look
for the pattern after fixing the log message to the specified
encoding.
* "git mergetool" and "git difftool" learned to list the available
tool backends in a more consistent manner.
* "git mergetool" is aware of TortoiseGitMerge now and uses it over
TortoiseMerge when available.
* "git push" now requires "-f" to update a tag, even if it is a
fast-forward, as tags are meant to be fixed points.
* Error messages from "git push" when it stops to prevent remote refs
from getting overwritten by mistake have been improved to explain
various situations separately.
* "git push" will stop without doing anything if the new "pre-push"
hook exists and exits with a failure.
* When "git rebase" fails to generate patches to be applied (e.g. due
to oom), it failed to detect the failure and instead behaved as if
there were nothing to do. A workaround to use a temporary file has
been applied, but we probably would want to revisit this later, as
it hurts the common case of not failing at all.
* Input and preconditions to "git reset" has been loosened where
appropriate. "git reset $fromtree Makefile" requires $fromtree to
be any tree (it used to require it to be a commit), for example.
"git reset" (without options or parameters) used to error out when
you do not have any commits in your history, but it now gives you
an empty index (to match non-existent commit you are not even on).
* "git status" says what branch is being bisected or rebased when
able, not just "bisecting" or "rebasing".
* "git submodule" started learning a new mode to integrate with the
tip of the remote branch (as opposed to integrating with the commit
recorded in the superproject's gitlink).
* "git upload-pack" which implements the service "ls-remote" and
"fetch" talk to can be told to hide ref hierarchies the server
side internally uses (and that clients have no business learning
about) with transfer.hiderefs configuration.
Foreign Interface
* "git fast-export" has been updated for its use in the context of
the remote helper interface.
* A new remote helper to interact with bzr has been added to contrib/.
* "git p4" got various bugfixes around its branch handling. It is
also made usable with Python 2.4/2.5. In addition, its various
portability issues for Cygwin have been addressed.
* The remote helper to interact with Hg in contrib/ has seen a few
fixes.
Performance, Internal Implementation, etc.
* "git fsck" has been taught to be pickier about entries in tree
objects that should not be there, e.g. ".", ".git", and "..".
* Matching paths with common forms of pathspecs that contain wildcard
characters has been optimized further.
* We stopped paying attention to $GIT_CONFIG environment that points
at a single configuration file from any command other than "git config"
quite a while ago, but "git clone" internally set, exported, and
then unexported the variable during its operation unnecessarily.
* "git reset" internals has been reworked and should be faster in
general. We tried to be careful not to break any behaviour but
there could be corner cases, especially when running the command
from a conflicted state, that we may have missed.
* The implementation of "imap-send" has been updated to reuse xml
quoting code from http-push codepath, and lost a lot of unused
code.
* There is a simple-minded checker for the test scripts in t/
directory to catch most common mistakes (it is not enabled by
default).
* You can build with USE_WILDMATCH=YesPlease to use a replacement
implementation of pattern matching logic used for pathname-like
things, e.g. refnames and paths in the repository. This new
implementation is not expected change the existing behaviour of Git
in this release, except for "git for-each-ref" where you can now
say "refs/**/master" and match with both refs/heads/master and
refs/remotes/origin/master. We plan to use this new implementation
in wider places (e.g. "git ls-files '**/Makefile' may find Makefile
at the top-level, and "git log '**/t*.sh'" may find commits that
touch a shell script whose name begins with "t" at any level) in
future versions of Git, but we are not there yet. By building with
USE_WILDMATCH, using the resulting Git daily and reporting when you
find breakages, you can help us get closer to that goal.
* Some reimplementations of Git do not write all the stat info back
to the index due to their implementation limitations (e.g. jgit).
A configuration option can tell Git to ignore changes to most of
the stat fields and only pay attention to mtime and size, which
these implementations can reliably update. This can be used to
avoid excessive revalidation of contents.
* Some platforms ship with old version of expat where xmlparse.h
needs to be included instead of expat.h; the build procedure has
been taught about this.
* "make clean" on platforms that cannot compute header dependencies
on the fly did not work with implementations of "rm" that do not
like an empty argument list.
Also contains minor documentation updates and code clean-ups.
Fixes since v1.8.1
------------------
Unless otherwise noted, all the fixes since v1.8.1 in the maintenance
track are contained in this release (see release notes to them for
details).
* An element on GIT_CEILING_DIRECTORIES list that does not name the
real path to a directory (i.e. a symbolic link) could have caused
the GIT_DIR discovery logic to escape the ceiling.
* When attempting to read the XDG-style $HOME/.config/git/config and
finding that $HOME/.config/git is a file, we gave a wrong error
message, instead of treating the case as "a custom config file does
not exist there" and moving on.
* The behaviour visible to the end users was confusing, when they
attempt to kill a process spawned in the editor that was in turn
launched by Git with SIGINT (or SIGQUIT), as Git would catch that
signal and die. We ignore these signals now.
(merge 0398fc34 pf/editor-ignore-sigint later to maint).
* A child process that was killed by a signal (e.g. SIGINT) was
reported in an inconsistent way depending on how the process was
spawned by us, with or without a shell in between.
* After failing to create a temporary file using mkstemp(), failing
pathname was not reported correctly on some platforms.
* We used to stuff "user@" and then append what we read from
/etc/mailname to come up with a default e-mail ident, but a bug
lost the "user@" part.
* The attribute mechanism didn't allow limiting attributes to be
applied to only a single directory itself with "path/" like the
exclude mechanism does. The initial implementation of this that
was merged to 'maint' and 1.8.1.2 was with a severe performance
degradations and needs to merge a fix-up topic.
* The smart HTTP clients forgot to verify the content-type that comes
back from the server side to make sure that the request is being
handled properly.
* "git am" did not parse datestamp correctly from Hg generated patch,
when it is run in a locale outside C (or en).
* "git apply" misbehaved when fixing whitespace breakages by removing
excess trailing blank lines.
* "git apply --summary" has been taught to make sure the similarity
value shown in its output is sensible, even when the input had a
bogus value.
* A tar archive created by "git archive" recorded a directory in a
way that made NetBSD's implementation of "tar" sometimes unhappy.
* "git archive" did not record uncompressed size in the header when
streaming a zip archive, which confused some implementations of unzip.
* "git archive" did not parse configuration values in tar.* namespace
correctly.
(merge b3873c3 jk/config-parsing-cleanup later to maint).
* Attempt to "branch --edit-description" an existing branch, while
being on a detached HEAD, errored out.
* "git clean" showed what it was going to do, but sometimes end up
finding that it was not allowed to do so, which resulted in a
confusing output (e.g. after saying that it will remove an
untracked directory, it found an embedded git repository there
which it is not allowed to remove). It now performs the actions
and then reports the outcome more faithfully.
* When "git clone --separate-git-dir=$over_there" is interrupted, it
failed to remove the real location of the $GIT_DIR it created.
This was most visible when interrupting a submodule update.
* "git cvsimport" mishandled timestamps at DST boundary.
* We used to have an arbitrary 32 limit for combined diff input,
resulting in incorrect number of leading colons shown when showing
the "--raw --cc" output.
* "git fetch --depth" was broken in at least three ways. The
resulting history was deeper than specified by one commit, it was
unclear how to wipe the shallowness of the repository with the
command, and documentation was misleading.
(merge cfb70e1 nd/fetch-depth-is-broken later to maint).
* "git log --all -p" that walked refs/notes/textconv/ ref can later
try to use the textconv data incorrectly after it gets freed.
* We forgot to close the file descriptor reading from "gpg" output,
killing "git log --show-signature" on a long history.
* The way "git svn" asked for password using SSH_ASKPASS and
GIT_ASKPASS was not in line with the rest of the system.
* The --graph code fell into infinite loop when asked to do what the
code did not expect.
* http transport was wrong to ask for the username when the
authentication is done by certificate identity.
* "git pack-refs" that ran in parallel to another process that
created new refs had a nasty race.
* Rebasing the history of superproject with change in the submodule
has been broken since v1.7.12.
* After "git add -N" and then writing a tree object out of the
index, the cache-tree data structure got corrupted.
* "git clone" used to allow --bare and --separate-git-dir=$there
options at the same time, which was nonsensical.
* "git rebase --preserve-merges" lost empty merges in recent versions
of Git.
* "git merge --no-edit" computed who were involved in the work done
on the side branch, even though that information is to be discarded
without getting seen in the editor.
* "git merge" started calling prepare-commit-msg hook like "git
commit" does some time ago, but forgot to pay attention to the exit
status of the hook.
* A failure to push due to non-ff while on an unborn branch
dereferenced a NULL pointer when showing an error message.
* When users spell "cc:" in lowercase in the fake "header" in the
trailer part, "git send-email" failed to pick up the addresses from
there. As e-mail headers field names are case insensitive, this
script should follow suit and treat "cc:" and "Cc:" the same way.
* Output from "git status --ignored" showed an unexpected interaction
with "--untracked".
* "gitweb", when sorting by age to show repositories with new
activities first, used to sort repositories with absolutely
nothing in it early, which was not very useful.
* "gitweb"'s code to sanitize control characters before passing it to
"highlight" filter lost known-to-be-safe control characters by
mistake.
* "gitweb" pages served over HTTPS, when configured to show picon or
gravatar, referred to these external resources to be fetched via
HTTP, resulting in mixed contents warning in browsers.
* When a line to be wrapped has a solid run of non space characters
whose length exactly is the wrap width, "git shortlog -w" failed
to add a newline after such a line.
* Command line completion leaked an unnecessary error message while
looking for possible matches with paths in <tree-ish>.
* Command line completion for "tcsh" emitted an unwanted space
after completing a single directory name.
* Command line completion code was inadvertently made incompatible with
older versions of bash by using a newer array notation.
* "git push" was taught to refuse updating the branch that is
currently checked out long time ago, but the user manual was left
stale.
(merge 50995ed wk/man-deny-current-branch-is-default-these-days later to maint).
* Some shells do not behave correctly when IFS is unset; work it
around by explicitly setting it to the default value.
* Some scripted programs written in Python did not get updated when
PYTHON_PATH changed.
(cherry-pick 96a4647fca54031974cd6ad1 later to maint).
* When autoconf is used, any build on a different commit always ran
"config.status --recheck" even when unnecessary.
* A fix was added to the build procedure to work around buggy
versions of ccache broke the auto-generation of dependencies, which
unfortunately is still relevant because some people use ancient
distros.
* The autoconf subsystem passed --mandir down to generated
config.mak.autogen but forgot to do the same for --htmldir.
(merge 55d9bf0 ct/autoconf-htmldir later to maint).
* A change made on v1.8.1.x maintenance track had a nasty regression
to break the build when autoconf is used.
(merge 7f1b697 jn/less-reconfigure later to maint).
* We have been carrying a translated and long-unmaintained copy of an
old version of the tutorial; removed.
* t0050 had tests expecting failures from a bug that was fixed some
time ago.
* t4014, t9502 and t0200 tests had various portability issues that
broke on OpenBSD.
* t9020 and t3600 tests had various portability issues.
* t9200 runs "cvs init" on a directory that already exists, but a
platform can configure this fail for the current user (e.g. you
need to be in the cvsadmin group on NetBSD 6.0).
* t9020 and t9810 had a few non-portable shell script construct.
* Scripts to test bash completion was inherently flaky as it was
affected by whatever random things the user may have on $PATH.
* An element on GIT_CEILING_DIRECTORIES could be a "logical" pathname
that uses a symbolic link to point at somewhere else (e.g. /home/me
that points at /net/host/export/home/me, and the latter directory
is automounted). Earlier when Git saw such a pathname e.g. /home/me
on this environment variable, the "ceiling" mechanism did not take
effect. With this release (the fix has also been merged to the
v1.8.1.x maintenance series), elements on GIT_CEILING_DIRECTORIES
are by default checked for such aliasing coming from symbolic
links. As this needs to actually resolve symbolic links for each
element on the GIT_CEILING_DIRECTORIES, you can disable this
mechanism for some elements by listing them after an empty element
on the GIT_CEILING_DIRECTORIES. e.g. Setting /home/me::/home/him to
GIT_CEILING_DIRECTORIES makes Git resolve symbolic links in
/home/me when checking if the current directory is under /home/me,
but does not do so for /home/him.
(merge 7ec30aa mh/maint-ceil-absolute later to maint).
----------------------------------------------------------------
Changes since v1.8.2-rc3 are as follows:
Antoine Pelisse (1):
perf: update documentation of GIT_PERF_REPEAT_COUNT
Eric Wong (1):
git svn: consistent spacing after "W:" in warnings
Greg Price (1):
add: Clarify documentation of -A and -u
Jan Pešta (1):
git svn: ignore partial svn:mergeinfo
Junio C Hamano (2):
Update draft release notes to 1.8.2
Git 1.8.2
Kevin Bracey (2):
Translate git_more_info_string consistently
git.c: make usage match manual page
Matthieu Moy (2):
add: update pathless 'add [-u|-A]' warning to reflect change of plan
git-completion.bash: zsh does not implement function redirection correctly
^ permalink raw reply
* A note from the maintainer
From: Junio C Hamano @ 2013-03-13 20:26 UTC (permalink / raw)
To: git
Welcome to the Git development community.
This message is written by the maintainer and talks about how Git
project is managed, and how you can work with it.
* Mailing list and the community
The development is primarily done on the Git mailing list. Help
requests, feature proposals, bug reports and patches should be sent to
the list address <git@vger.kernel.org>. You don't have to be
subscribed to send messages. The convention on the list is to keep
everybody involved on Cc:, so it is unnecessary to say "Please Cc: me,
I am not subscribed".
Before sending patches, please read Documentation/SubmittingPatches
and Documentation/CodingGuidelines to familiarize yourself with the
project convention.
If you sent a patch and you did not hear any response from anybody for
several days, it could be that your patch was totally uninteresting,
but it also is possible that it was simply lost in the noise. Please
do not hesitate to send a reminder message in such a case. Messages
getting lost in the noise is a sign that people involved don't have
enough mental/time bandwidth to process them right at the moment, and
it often helps to wait until the list traffic becomes calmer before
sending such a reminder.
The list archive is available at a few public sites:
http://news.gmane.org/gmane.comp.version-control.git/
http://marc.theaimsgroup.com/?l=git
http://www.spinics.net/lists/git/
For those who prefer to read it over NNTP (including the maintainer):
nntp://news.gmane.org/gmane.comp.version-control.git
When you point at a message in a mailing list archive, using
gmane is often the easiest to follow by readers, like this:
http://thread.gmane.org/gmane.comp.version-control.git/27/focus=217
as it also allows people who subscribe to the mailing list as gmane
newsgroup to "jump to" the article.
Some members of the development community can sometimes also be found
on the #git IRC channel on Freenode. Its log is available at:
http://colabti.org/irclogger/irclogger_log/git
* Reporting bugs
When you think git does not behave as you expect, please do not stop
your bug report with just "git does not work". "I used git in this
way, but it did not work" is not much better, neither is "I used git
in this way, and X happend, which is broken". It often is that git is
correct to cause X happen in such a case, and it is your expectation
that is broken. People would not know what other result Y you expected
to see instead of X, if you left it unsaid.
Please remember to always state
- what you wanted to achieve;
- what you did (the version of git and the command sequence to reproduce
the behavior);
- what you saw happen (X above);
- what you expected to see (Y above); and
- how the last two are different.
See http://www.chiark.greenend.org.uk/~sgtatham/bugs.html for further
hints.
* Repositories, branches and documentation.
My public git.git repositories are at:
git://git.kernel.org/pub/scm/git/git.git/
https://kernel.googlesource.com/pub/scm/git/git
git://repo.or.cz/alt-git.git/
https://github.com/git/git/
https://code.google.com/p/git-core/
git://git.sourceforge.jp/gitroot/git-core/git.git/
git://git-core.git.sourceforge.net/gitroot/git-core/git-core/
A few web interfaces are found at:
http://git.kernel.org/?p=git/git.git
https://kernel.googlesource.com/pub/scm/git/git
http://repo.or.cz/w/alt-git.git
Preformatted documentation from the tip of the "master" branch can be
found in:
git://git.kernel.org/pub/scm/git/git-{htmldocs,manpages}.git/
git://repo.or.cz/git-{htmldocs,manpages}.git/
https://code.google.com/p/git-{htmldocs,manpages}.git/
https://github.com/gitster/git-{htmldocs,manpages}.git/
You can browse the HTML manual pages at:
http://git-htmldocs.googlecode.com/git/git.html
There are four branches in git.git repository that track the source tree
of git: "master", "maint", "next", and "pu".
The "master" branch is meant to contain what are very well tested and
ready to be used in a production setting. Every now and then, a
"feature release" is cut from the tip of this branch and they
typically are named with three dotted decimal digits. The last such
release was 1.8.2 done on Mar 13, 2013. You can expect that the tip of
the "master" branch is always more stable than any of the released
versions.
Whenever a feature release is made, "maint" branch is forked off from
"master" at that point. Obvious, safe and urgent fixes after a feature
release are applied to this branch and maintenance releases are cut from
it. The maintenance releases are named with four dotted decimal, named
after the feature release they are updates to; the last such release was
1.8.1.5. New features never go to this branch. This branch is also
merged into "master" to propagate the fixes forward as needed.
A new development does not usually happen on "master". When you send a
series of patches, after review on the mailing list, a separate topic
branch is forked from the tip of "master" and your patches are queued
there, and kept out of "master" while people test it out. The quality of
topic branches are judged primarily by the mailing list discussions.
Topic branches that are in good shape are merged to the "next" branch. In
general, the "next" branch always contains the tip of "master". It might
not be quite rock-solid, but is expected to work more or less without major
breakage. The "next" branch is where new and exciting things take place. A
topic that is in "next" is expected to be polished to perfection before it
is merged to "master".
The "pu" (proposed updates) branch bundles all the remaining topic branches.
The topics on the branch are not complete, well tested, nor well documented
and need further work. When a topic that was in "pu" proves to be in a
testable shape, it is merged to "next".
You can run "git log --first-parent master..pu" to see what topics are
currently in flight. Sometimes, an idea that looked promising turns out
to be not so good and the topic can be dropped from "pu" in such a case.
The two branches "master" and "maint" are never rewound, and "next"
usually will not be either. After a feature release is made from
"master", however, "next" will be rebuilt from the tip of "master"
using the topics that didn't make the cut in the feature release.
Note that being in "next" is not a guarantee to appear in the next
release, nor even in any future release. There were cases that topics
needed reverting a few commits in them before graduating to "master",
or a topic that already was in "next" was reverted from "next" because
fatal flaws were found in it after it was merged.
* Other people's trees, trusted lieutenants and credits.
Documentation/SubmittingPatches outlines to whom your proposed changes
should be sent. As described in contrib/README, I would delegate fixes
and enhancements in contrib/ area to the primary contributors of them.
Although the following are included in git.git repository, they have their
own authoritative repository and maintainers:
- git-gui/ comes from git-gui project, maintained by Pat Thoyts:
git://repo.or.cz/git-gui.git
- gitk-git/ comes from Paul Mackerras's gitk project:
git://ozlabs.org/~paulus/gitk
- po/ comes from the localization coordinator, Jiang Xin:
https://github.com/git-l10n/git-po/
I would like to thank everybody who helped to raise git into the current
shape. Especially I would like to thank the git list regulars whose help
I have relied on and expect to continue relying on heavily:
- Linus Torvalds, Shawn Pearce, Johannes Schindelin, Nicolas Pitre,
René Scharfe, Jeff King, Jonathan Nieder, Johan Herland, Johannes
Sixt, Sverre Rabbelier, Michael J Gruber, Nguyễn Thái Ngọc Duy,
Ævar Arnfjörð Bjarmason and Thomas Rast for helping with general
design and implementation issues and reviews on the mailing list.
- Shawn and Nicolas Pitre for helping with packfile design and
implementation issues.
- Martin Langhoff, Frank Lichtenheld and Ævar Arnfjörð Bjarmason for
cvsserver and cvsimport.
- Paul Mackerras for gitk.
- Eric Wong, David D. Kilzer and Sam Vilain for git-svn.
- Simon Hausmann, Pete Wyckoff and Luke Diamond for git-p4.
- Jakub Narebski, John Hawley, Petr Baudis, Luben Tuikov, Giuseppe
Bilotta for maintaining and enhancing gitweb.
- Ævar Arnfjörð Bjarmason for kicking off the i18n effort, and Jiang
Xin for volunteering to be the l10n coordinator.
- Jens Lehmann, Heiko Voigt and Lars Hjemli for submodule related
Porcelains.
- J. Bruce Fields, Jonathan Nieder, Michael J Gruber and Thomas Rast for
documentation (and countless others for proofreading and fixing).
- Alexandre Julliard for Emacs integration.
- David Aguilar and Charles Bailey for taking good care of git-mergetool
(and Theodore Ts'o for creating it in the first place) and git-difftool.
- Johannes Schindelin, Johannes Sixt, Erik Faye-Lund, Pat Thoyts and others
for their effort to move things forward on the Windows front.
- People on non-Linux platforms for keeping their eyes on portability;
especially, Randal Schwartz, Theodore Ts'o, Jason Riedy, Thomas Glanzmann,
Brandon Casey, Jeff King, Alex Riesen and countless others.
^ permalink raw reply
* What's cooking in git.git (Mar 2013, #04; Wed, 13)
From: Junio C Hamano @ 2013-03-13 20:27 UTC (permalink / raw)
To: git
Here are the topics that have been cooking. Commits prefixed with
'-' are only in 'pu' (proposed updates) while commits prefixed with
'+' are in 'next'.
The tip of the master is at v1.8.2. We have already many topics
lined up for the next cycle, so after a few days to calm down, we
will see exciting changes on 'master' starting from next week.
You can find the changes described here in the integration branches
of the repositories listed at
http://git-blame.blogspot.com/p/git-public-repositories.html
--------------------------------------------------
[New Topics]
* ph/tag-force-no-warn-on-creation (2013-03-13) 1 commit
- tag: --force does not have to warn when creating tags
Will cook in 'next'.
--------------------------------------------------
[Stalled]
* po/help-guides (2013-03-03) 5 commits
- help doc: include --guide option description
- help.c: add list_common_guides_help() function
- help.c: add --guide option
- help.c: use OPT_COUNTUP
- show 'git help <guide>' usage, with examples
Give more visibility to "concept guides" to help "git help" users.
Expecting a reroll.
$gmane/217384
* hv/config-from-strbuf (2013-03-10) 4 commits
- teach config parsing to read from strbuf
- config: make parsing stack struct independent from actual data source
- config: drop file pointer validity check in get_next_char()
- config: factor out config file stack management
Expecting a reroll.
$gmane/217811
* mb/gitweb-highlight-link-target (2012-12-20) 1 commit
- Highlight the link target line in Gitweb using CSS
Expecting a reroll.
$gmane/211935
* mb/remote-default-nn-origin (2012-07-11) 6 commits
- Teach get_default_remote to respect remote.default.
- Test that plain "git fetch" uses remote.default when on a detached HEAD.
- Teach clone to set remote.default.
- Teach "git remote" about remote.default.
- Teach remote.c about the remote.default configuration setting.
- Rename remote.c's default_remote_name static variables.
When the user does not specify what remote to interact with, we
often attempt to use 'origin'. This can now be customized via a
configuration variable.
Expecting a reroll.
$gmane/210151
"The first remote becomes the default" bit is better done as a
separate step.
--------------------------------------------------
[Cooking]
* nd/branch-show-rebase-bisect-state (2013-03-13) 6 commits
- branch: show more information when HEAD is detached
- status: show more info than "currently not on any branch"
- wt-status: move wt_status_get_state() out to wt_status_print()
- wt-status: split wt_status_state parsing function out
- wt-status: move strbuf into read_and_strip_branch()
- Merge branch 'jc/reflog-reverse-walk' into nd/branch-show-rebase-bisect-state
(this branch uses jc/reflog-reverse-walk.)
The changes look sound, but some patches need better description.
* kb/p4merge (2013-03-13) 2 commits
- mergetools/p4merge: create a base if none available
- mergetools/p4merge: swap LOCAL and REMOTE
Looked reasonable.
Will merge to 'next'.
* jc/maint-push-refspec-default-doc (2013-03-08) 1 commit
- Documentation/git-push: clarify the description of defaults
Clarify in the documentation "what" gets pushed to "where" when the
command line to "git push" does not say these explicitly.
Will merge to 'next'.
* jc/reflog-reverse-walk (2013-03-08) 3 commits
- reflog: add for_each_reflog_ent_reverse() API
- for_each_recent_reflog_ent(): simplify opening of a reflog file
- for_each_reflog_ent(): extract a helper to process a single entry
(this branch is used by nd/branch-show-rebase-bisect-state.)
An internal function used to implement "git checkout @{-1}" was
hard to use correctly.
Will merge to 'next'.
* jk/alias-in-bare (2013-03-08) 3 commits
(merged to 'next' on 2013-03-09 at 2f9d72a)
+ setup: suppress implicit "." work-tree for bare repos
+ environment: add GIT_PREFIX to local_repo_env
+ cache.h: drop LOCAL_REPO_ENV_SIZE
An aliased command spawned from a bare repository that does not say
it is bare with "core.bare = yes" is treated as non-bare by mistake.
Will cook in 'next'.
* pw/p4-symlinked-root (2013-03-11) 3 commits
(merged to 'next' on 2013-03-12 at 559b926)
+ git p4: avoid expanding client paths in chdir
+ git p4 test: should honor symlink in p4 client root
+ git p4 test: make sure P4CONFIG relative path works
Will cook in 'next'.
* jc/add-2.0-delete-default (2013-03-08) 3 commits
- git add <pathspec>... defaults to "-A"
- git add: start preparing for "git add <pathspec>..." to default to "-A"
- builtin/add.c: simplify boolean variables
"git add dir/" updated modified files and added new files, but does
not notice removed files, which may be "Huh?" to some users. They
can of course use "git add -A dir/", but why should they?
There seemed to be some interest in this topic, so resurrected and
rebased on top of recent documentation updates to propose a
possible transition plan.
Will merge to and cook in 'next' until Git 2.0.
* jc/add-2.0-u-A-sans-pathspec (2013-03-11) 1 commit
- git add: -u/-A now affects the entire working tree
"git add -u/-A" without pathspec has traditonally limited its
operation to the current directory and its subdirectories, but in
Git 1.8.2 we started encouraging users to be more explicit to
specify "." when they mean it (and use ":/" to make it affect the
entire working tree). With this, we finally change the behaviour
and make it affect the entire working tree in Git 2.0.
Will merge to and cook in 'next' until Git 2.0.
* jk/empty-archive (2013-03-10) 2 commits
(merged to 'next' on 2013-03-12 at 942e592)
+ archive: handle commits with an empty tree
+ test-lib: factor out $GIT_UNZIP setup
"git archive" reports a failure when asked to create an archive out
of an empty tree. It would be more intuitive to give an empty
archive back in such a case.
Will cook in 'next'.
* jk/graph-c-expose-symbols-for-cgit (2013-03-03) 1 commit
(merged to 'next' on 2013-03-04 at be35b12)
+ Revert "graph.c: mark private file-scope symbols as static"
In the v1.8.0 era, we changed symbols that do not have to be global
to file scope static, but a few functions in graph.c were used by
CGit from sideways bypassing the entry points of the API the
in-tree users use.
Will cook in 'next'.
* we/submodule-update-prefix-output (2013-03-03) 1 commit
(merged to 'next' on 2013-03-04 at 908df73)
+ submodule update: when using recursion, show full path
Will cook in 'next'.
* jc/nobody-sets-src-peer-ref (2013-03-04) 1 commit
(merged to 'next' on 2013-03-07 at 1910e21)
+ match_push_refs(): nobody sets src->peer_ref anymore
Dead code removal.
Will cook in 'next'.
* jc/push-follow-tag (2013-03-05) 4 commits
(merged to 'next' on 2013-03-09 at 748fbed)
+ push: --follow-tags
+ commit.c: use clear_commit_marks_many() in in_merge_bases_many()
+ commit.c: add in_merge_bases_many()
+ commit.c: add clear_commit_marks_many()
The new "--follow-tags" option tells "git push" to push relevant
tags when pushing branches out.
Will cook in 'next'.
* jc/maint-reflog-expire-clean-mark-typofix (2013-03-05) 1 commit
(merged to 'next' on 2013-03-07 at 0a61cbb)
+ reflog: fix typo in "reflog expire" clean-up codepath
Will cook in 'next'.
* aw/setup-prefix-pathspec (2013-03-09) 2 commits
(merged to 'next' on 2013-03-12 at 31a4a5e)
+ setup.c: check that the pathspec magic ends with ")"
+ setup.c: stop prefix_pathspec() from looping past the end of string
"git cmd -- ':(top'" was not diagnosed as an invalid syntax, and
instead the parser kept reading beyond the end of the string.
Will cook in 'next'.
* lf/bundle-verify-list-prereqs (2013-03-08) 2 commits
(merged to 'next' on 2013-03-08 at 9e55d6d)
+ bundle: Add colons to list headings in "verify"
+ bundle: Fix "verify" output if history is complete
Will cook in 'next'.
* ks/rfc2047-one-char-at-a-time (2013-03-09) 1 commit
(merged to 'next' on 2013-03-09 at a12465e)
+ format-patch: RFC 2047 says multi-octet character may not be split
When "format-patch" quoted a non-ascii strings on the header files,
it incorrectly applied rfc2047 and chopped a single character in
the middle of it.
Will cook in 'next'.
* kb/name-hash (2013-02-27) 1 commit
(merged to 'next' on 2013-03-05 at 7f7e5d4)
+ name-hash.c: fix endless loop with core.ignorecase=true
The code to keep track of what directory names are known to Git on
platforms with case insensitive filesystems can get confused upon
a hash collision between these pathnames and looped forever.
Will cook in 'next'.
* rs/zip-compresssed-size-with-export-subst (2013-02-27) 1 commit
(merged to 'next' on 2013-03-03 at c1ac6d8)
+ archive-zip: fix compressed size for stored export-subst files
When export-subst is used, "zip" output recorded incorrect
size of the file.
Will cook in 'next'.
* jc/describe (2013-02-28) 1 commit
(merged to 'next' on 2013-03-05 at 6b353f3)
+ describe: --match=<pattern> must limit the refs even when used with --all
The "--match=<pattern>" option of "git describe", when used with
"--all" to allow refs that are not annotated tags to be used as a
base of description, did not restrict the output from the command
to those that match the given pattern.
We may want to have a looser matching that does not restrict to tags,
but that can be done as a follow-up topic; this step is purely a bugfix.
Will cook in 'next'.
* jk/mailsplit-maildir-muttsort (2013-03-02) 1 commit
(merged to 'next' on 2013-03-03 at d5f7735)
+ mailsplit: sort maildir filenames more cleverly
Will cook in 'next'.
* pc/subtree-add-before-fetch (2013-02-28) 1 commit
- contrib/subtree: allow addition of remote branch with name not locally present
Will discard.
Not getting enough reviews.
* tr/line-log (2013-02-28) 5 commits
- log -L: :pattern:file syntax to find by funcname
- Implement line-history search (git log -L)
- Export rewrite_parents() for 'log -L'
- blame: introduce $ as "end of file" in -L syntax
- Refactor parse_loc
Expecting a reroll.
$gmane/217278
* jc/perl-cat-blob (2013-02-22) 1 commit
(merged to 'next' on 2013-02-25 at 7c0079a)
+ Git.pm: fix cat_blob crashes on large files
perl/Git.pm::cat_blob slurped everything in core only to write it
out to a file descriptor, which was not a very smart thing to do.
Will cook in 'next'.
* nd/doc-index-format (2013-02-23) 3 commits
(merged to 'next' on 2013-02-26 at 4d3caea)
+ update-index: list supported idx versions and their features
+ read-cache.c: use INDEX_FORMAT_{LB,UB} in verify_hdr()
+ index-format.txt: mention of v4 is missing in some places
Update the index format documentation to mention the v4 format.
Will cook in 'next'.
* ap/maint-diff-rename-avoid-overlap (2013-03-06) 3 commits
(merged to 'next' on 2013-03-06 at 3bc8dda)
+ tests: make sure rename pretty print works
(merged to 'next' on 2013-02-26 at 19d70bf)
+ diff: prevent pprint_rename from underrunning input
(merged to 'next' on 2013-02-25 at c9bd6d3)
+ diff: Fix rename pretty-print when suffix and prefix overlap
The logic used by "git diff -M --stat" to shorten the names of
files before and after a rename did not work correctly when the
common prefix and suffix between the two filenames overlapped.
Will cook in 'next'.
* ap/maint-update-index-h-is-for-help (2013-02-23) 1 commit
(merged to 'next' on 2013-02-25 at f5f767c)
+ update-index: allow "-h" to also display options
Will cook in 'next'.
* jc/color-diff-doc (2013-02-22) 1 commit
(merged to 'next' on 2013-02-25 at c37541c)
+ diff-options: unconfuse description of --color
Will cook in 'next'.
* nd/branch-error-cases (2013-02-23) 1 commit
(merged to 'next' on 2013-02-25 at 1d0289f)
+ branch: segfault fixes and validation
"git branch" had more cases where it did not bother to check
nonsense command line parameters.
Will cook in 'next'.
* rt/commit-cleanup-config (2013-02-23) 1 commit
(merged to 'next' on 2013-02-25 at 8249b61)
+ t7502: perform commits using alternate editor in a subshell
Fix tests that contaminated their environments and affected new
tests introduced later in the sequence by containing their effects
in their own subshells.
Will cook in 'next'.
* wk/doc-pre-rebase (2013-02-24) 1 commit
(merged to 'next' on 2013-02-25 at a6ec310)
+ Documentation/githooks: Explain pre-rebase parameters
Will cook in 'next'.
* da/downcase-u-in-usage (2013-02-24) 20 commits
(merged to 'next' on 2013-02-26 at 977b67e)
+ contrib/mw-to-git/t/install-wiki.sh: use a lowercase "usage:" string
+ contrib/examples/git-remote.perl: use a lowercase "usage:" string
+ tests: use a lowercase "usage:" string
+ git-svn: use a lowercase "usage:" string
+ Documentation/user-manual.txt: use a lowercase "usage:" string
+ templates/hooks--update.sample: use a lowercase "usage:" string
+ contrib/hooks/setgitperms.perl: use a lowercase "usage:" string
+ contrib/examples: use a lowercase "usage:" string
+ contrib/fast-import/import-zips.py: use spaces instead of tabs
+ contrib/fast-import/import-zips.py: fix broken error message
+ contrib/fast-import: use a lowercase "usage:" string
+ contrib/credential: use a lowercase "usage:" string
+ git-cvsimport: use a lowercase "usage:" string
+ git-cvsimport: use a lowercase "usage:" string
+ git-cvsexportcommit: use a lowercase "usage:" string
+ git-archimport: use a lowercase "usage:" string
+ git-merge-one-file: use a lowercase "usage:" string
+ git-relink: use a lowercase "usage:" string
+ git-svn: use a lowercase "usage:" string
+ git-sh-setup: use a lowercase "usage:" string
Will cook in 'next'.
* dm/ni-maxhost-may-be-missing (2013-02-25) 1 commit
(merged to 'next' on 2013-02-26 at 93ec2c9)
+ git-compat-util.h: Provide missing netdb.h definitions
Will cook in 'next'.
* gp/avoid-explicit-mention-of-dot-git-refs (2013-02-24) 1 commit
(merged to 'next' on 2013-02-26 at ec42d98)
+ Fix ".git/refs" stragglers
Will cook in 'next'.
* gp/describe-match-uses-glob-pattern (2013-02-24) 1 commit
(merged to 'next' on 2013-02-26 at c9cc789)
+ describe: Document --match pattern format
(this branch is used by gp/forbid-describe-all-match.)
Will cook in 'next'.
* jk/common-make-variables-export-safety (2013-02-25) 1 commit
(merged to 'next' on 2013-03-05 at 084ae43)
+ Makefile: make mandir, htmldir and infodir absolute
Make the three variables safer to be exported to submakes by
ensuring that they are full paths so that they can be used as
installation location.
Will cook in 'next'.
* jk/suppress-clang-warning (2013-02-25) 1 commit
- fix clang -Wtautological-compare with unsigned enum
Will merge to 'next'.
* mg/qnx6 (2013-02-25) 1 commit
- QNX: newer QNX 6.x.x is not so crippled
Still under discussion.
Not ready for inclusion.
* mg/unsigned-time-t (2013-02-25) 2 commits
- Fix time offset calculation in case of unsigned time_t
- date.c: fix unsigned time_t comparison
A few workarounds for systems with unsigned time_t.
Will merge to 'next'.
* rj/msvc-build (2013-02-25) 5 commits
(merged to 'next' on 2013-02-26 at 7493068)
+ msvc: avoid collisions between "tags" and "TAGS"
+ msvc: test-svn-fe: Fix linker "unresolved external" error
+ msvc: Fix build by adding missing symbol defines
+ msvc: git-daemon: Fix linker "unresolved external" errors
+ msvc: Fix compilation errors caused by poll.h emulation
Will cook in 'next'.
* wk/user-manual-literal-format (2013-02-25) 1 commit
(merged to 'next' on 2013-02-26 at d59ce38)
+ user-manual: Standardize backtick quoting
Will cook in 'next'.
* jk/utf-8-can-be-spelled-differently (2013-02-25) 1 commit
(merged to 'next' on 2013-02-26 at c079525)
+ utf8: accept alternate spellings of UTF-8
Will cook in 'next'.
* jk/pkt-line-cleanup (2013-02-24) 19 commits
(merged to 'next' on 2013-02-25 at d83e970)
+ remote-curl: always parse incoming refs
+ remote-curl: move ref-parsing code up in file
+ remote-curl: pass buffer straight to get_remote_heads
+ teach get_remote_heads to read from a memory buffer
+ pkt-line: share buffer/descriptor reading implementation
+ pkt-line: provide a LARGE_PACKET_MAX static buffer
+ pkt-line: move LARGE_PACKET_MAX definition from sideband
+ pkt-line: teach packet_read_line to chomp newlines
+ pkt-line: provide a generic reading function with options
+ pkt-line: drop safe_write function
+ pkt-line: move a misplaced comment
+ write_or_die: raise SIGPIPE when we get EPIPE
+ upload-archive: use argv_array to store client arguments
+ upload-archive: do not copy repo name
+ send-pack: prefer prefixcmp over memcmp in receive_status
+ fetch-pack: fix out-of-bounds buffer offset in get_ack
+ upload-pack: remove packet debugging harness
+ upload-pack: do not add duplicate objects to shallow list
+ upload-pack: use get_sha1_hex to parse "shallow" lines
Cleans up pkt-line API, implementation and its callers to make
them more robust.
Will cook in 'next'.
* ob/imap-send-ssl-verify (2013-02-20) 1 commit
(merged to 'next' on 2013-02-25 at e897609)
+ imap-send: support Server Name Indication (RFC4366)
Correctly connect to SSL/TLS sites that serve multiple hostnames on
a single IP by including Server Name Indication in the client-hello.
Will cook in 'next'.
* jc/format-patch (2013-02-21) 2 commits
- format-patch: --inline-single
- format-patch: rename "no_inline" field
A new option to send a single patch to the standard output to be
appended at the bottom of a message. I personally have no need for
this, but it was easy enough to cobble together. Tests, docs and
stripping out more MIMEy stuff are left as exercises to interested
parties.
Not ready for inclusion.
* tk/doc-filter-branch (2013-02-26) 2 commits
(merged to 'next' on 2013-02-26 at bd4638b)
+ Documentation: filter-branch env-filter example
+ git-filter-branch.txt: clarify ident variables usage
Will cook in 'next'.
* bc/commit-complete-lines-given-via-m-option (2013-02-19) 4 commits
(merged to 'next' on 2013-02-19 at cf622b7)
+ Documentation/git-commit.txt: rework the --cleanup section
+ git-commit: only append a newline to -m mesg if necessary
+ t7502: demonstrate breakage with a commit message with trailing newlines
+ t/t7502: compare entire commit message with what was expected
'git commit -m "$str"' when $str was already terminated with a LF
now avoids adding an extra LF to the message.
Will cook in 'next'.
* da/difftool-fixes (2013-02-21) 4 commits
(merged to 'next' on 2013-02-25 at 687db1f)
+ t7800: "defaults" is no longer a builtin tool name
+ t7800: modernize tests
+ t7800: update copyright notice
+ difftool: silence uninitialized variable warning
Minor maintenance updates to difftool, and updates to its tests.
Will cook in 'next'.
* nd/read-directory-recursive-optim (2013-02-17) 1 commit
(merged to 'next' on 2013-02-17 at 36ba9f4)
+ read_directory: avoid invoking exclude machinery on tracked files
"git status" has been optimized by taking advantage of the fact
that paths that are already known to the index do not have to be
checked against the .gitignore mechanism under some conditions.
Will cook in 'next'.
* mg/gpg-interface-using-status (2013-02-14) 5 commits
(merged to 'next' on 2013-02-26 at 93f0e72)
+ pretty: make %GK output the signing key for signed commits
+ pretty: parse the gpg status lines rather than the output
+ gpg_interface: allow to request status return
+ log-tree: rely upon the check in the gpg_interface
+ gpg-interface: check good signature in a reliable way
Call "gpg" using the right API when validating the signature on
tags.
Will cook in 'next'.
* jn/shell-disable-interactive (2013-03-09) 2 commits
- shell: new no-interactive-login command to print a custom message
- shell doc: emphasize purpose and security model
Will merge to 'next'.
* jc/fetch-raw-sha1 (2013-02-07) 4 commits
(merged to 'next' on 2013-02-14 at ffa3c65)
+ fetch: fetch objects by their exact SHA-1 object names
+ upload-pack: optionally allow fetching from the tips of hidden refs
+ fetch: use struct ref to represent refs to be fetched
+ parse_fetch_refspec(): clarify the codeflow a bit
Allows requests to fetch objects at any tip of refs (including
hidden ones). It seems that there may be use cases even outside
Gerrit (e.g. $gmane/215701).
Will cook in 'next'.
* mn/send-email-works-with-credential (2013-02-27) 6 commits
(merged to 'next' on 2013-02-27 at ee7ae0e)
+ git-send-email: use git credential to obtain password
+ Git.pm: add interface for git credential command
+ Git.pm: allow pipes to be closed prior to calling command_close_bidi_pipe
+ Git.pm: refactor command_close_bidi_pipe to use _cmd_close
+ Git.pm: fix example in command_close_bidi_pipe documentation
+ Git.pm: allow command_close_bidi_pipe to be called as method
Hooks the credential system to send-email.
Will cook in 'next'.
* nd/count-garbage (2013-02-15) 4 commits
(merged to 'next' on 2013-02-17 at b2af923)
+ count-objects: report how much disk space taken by garbage files
+ count-objects: report garbage files in pack directory too
+ sha1_file: reorder code in prepare_packed_git_one()
+ git-count-objects.txt: describe each line in -v output
Will cook in 'next'.
* tz/credential-authinfo (2013-02-25) 1 commit
(merged to 'next' on 2013-02-27 at 7a261cb)
+ Add contrib/credentials/netrc with GPG support
A new read-only credential helper (in contrib/) to interact with
the .netrc/.authinfo files. Hopefully mn/send-email-authinfo topic
can rebuild on top of something like this.
Will cook in 'next'.
* jl/submodule-deinit (2013-03-04) 1 commit
(merged to 'next' on 2013-03-05 at 097164e)
+ submodule: add 'deinit' command
There was no Porcelain way to say "I no longer am interested in
this submodule", once you express your interest in a submodule with
"submodule init". "submodule deinit" is the way to do so.
Will cook in 'next'.
* jc/remove-export-from-config-mak-in (2013-03-05) 3 commits
(merged to 'next' on 2013-03-05 at abaa3cb)
+ Fix `make install` when configured with autoconf
(merged to 'next' on 2013-02-12 at eb8af04)
+ Makefile: do not export mandir/htmldir/infodir
(merged to 'next' on 2013-02-07 at 33f7d4f)
+ config.mak.in: remove unused definitions
config.mak.in template had an "export" line to cause a few
common makefile variables to be exported; if they need to be
expoted for autoconf/configure users, they should also be exported
for people who write config.mak the same way. Move the "export" to
the main Makefile. Also, stop exporting mandir that used to be
exported (only) when config.mak.autogen was used. It would have
broken installation of manpages (but not other documentation
formats).
Will cook in 'next'.
* jc/remove-treesame-parent-in-simplify-merges (2013-01-17) 1 commit
(merged to 'next' on 2013-01-30 at b639b47)
+ simplify-merges: drop merge from irrelevant side branch
The --simplify-merges logic did not cull irrelevant parents from a
merge that is otherwise not interesting with respect to the paths
we are following.
This touches a fairly core part of the revision traversal
infrastructure; even though I think this change is correct, please
report immediately if you find any unintended side effect.
Will cook in 'next'.
* jc/push-2.0-default-to-simple (2013-01-16) 14 commits
(merged to 'next' on 2013-01-16 at 23f5df2)
+ t5570: do not assume the "matching" push is the default
+ t5551: do not assume the "matching" push is the default
+ t5550: do not assume the "matching" push is the default
(merged to 'next' on 2013-01-09 at 74c3498)
+ doc: push.default is no longer "matching"
+ push: switch default from "matching" to "simple"
+ t9401: do not assume the "matching" push is the default
+ t9400: do not assume the "matching" push is the default
+ t7406: do not assume the "matching" push is the default
+ t5531: do not assume the "matching" push is the default
+ t5519: do not assume the "matching" push is the default
+ t5517: do not assume the "matching" push is the default
+ t5516: do not assume the "matching" push is the default
+ t5505: do not assume the "matching" push is the default
+ t5404: do not assume the "matching" push is the default
Will cook in 'next' until Git 2.0.
* bc/append-signed-off-by (2013-02-23) 13 commits
(merged to 'next' on 2013-02-25 at 32f7ac2)
+ git-commit: populate the edit buffer with 2 blank lines before s-o-b
+ Unify appending signoff in format-patch, commit and sequencer
+ format-patch: update append_signoff prototype
+ t4014: more tests about appending s-o-b lines
+ sequencer.c: teach append_signoff to avoid adding a duplicate newline
+ sequencer.c: teach append_signoff how to detect duplicate s-o-b
+ sequencer.c: always separate "(cherry picked from" from commit body
+ sequencer.c: require a conforming footer to be preceded by a blank line
+ sequencer.c: recognize "(cherry picked from ..." as part of s-o-b footer
+ t/t3511: add some tests of 'cherry-pick -s' functionality
+ t/test-lib-functions.sh: allow to specify the tag name to test_commit
+ commit, cherry-pick -s: remove broken support for multiline rfc2822 fields
+ sequencer.c: rework search for start of footer to improve clarity
Will cook in 'next'.
* gp/forbid-describe-all-match (2013-02-24) 1 commit
- describe: make --all and --match=PATTERN mutually incompatible
(this branch uses gp/describe-match-uses-glob-pattern.)
"describe --match=<pattern> --all <commit>" ought to mean "use refs
that match <pattern> to describe <commit>; you do not have to limit
yourself to annotated tags." But it doesn't. Disable the
combination.
Will discard.
jc/describe topic fixes the semantics of --match used with --all
option.
^ permalink raw reply
* [PATCH 0/2] difftool --dir-diff: symlink all files matching the working tree
From: John Keeping @ 2013-03-13 20:33 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, David Aguilar, Matt McClure, Tim Henigan,
John Keeping
In-Reply-To: <7vy5dr14mc.fsf@alter.siamese.dyndns.org>
Here's the proper patch. It grew into a series because I noticed a
minor formatting error in the difftool documentation, which the first
commit fixes.
The content of the second patch is the same as was previously posted.
John Keeping (2):
git-difftool(1): fix formatting of --symlink description
difftool --dir-diff: symlink all files matching the working tree
Documentation/git-difftool.txt | 8 +++++---
git-difftool.perl | 21 ++++++++++++++++++---
t/t7800-difftool.sh | 14 ++++++++++++++
3 files changed, 37 insertions(+), 6 deletions(-)
--
1.8.2.rc2.4.g7799588
^ permalink raw reply
* [PATCH 1/2] git-difftool(1): fix formatting of --symlink description
From: John Keeping @ 2013-03-13 20:33 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, David Aguilar, Matt McClure, Tim Henigan,
John Keeping
In-Reply-To: <cover.1363206651.git.john@keeping.me.uk>
Signed-off-by: John Keeping <john@keeping.me.uk>
---
Documentation/git-difftool.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-difftool.txt b/Documentation/git-difftool.txt
index e0e12e9..e575fea 100644
--- a/Documentation/git-difftool.txt
+++ b/Documentation/git-difftool.txt
@@ -74,8 +74,8 @@ with custom merge tool commands and has the same value as `$MERGED`.
'git difftool''s default behavior is create symlinks to the
working tree when run in `--dir-diff` mode.
+
- Specifying `--no-symlinks` instructs 'git difftool' to create
- copies instead. `--no-symlinks` is the default on Windows.
+Specifying `--no-symlinks` instructs 'git difftool' to create copies
+instead. `--no-symlinks` is the default on Windows.
-x <command>::
--extcmd=<command>::
--
1.8.2.rc2.4.g7799588
^ permalink raw reply related
* [PATCH 2/2] difftool --dir-diff: symlink all files matching the working tree
From: John Keeping @ 2013-03-13 20:33 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, David Aguilar, Matt McClure, Tim Henigan,
John Keeping
In-Reply-To: <cover.1363206651.git.john@keeping.me.uk>
Some users like to edit files in their diff tool when using "git
difftool --dir-diff --symlink" to compare against the working tree but
difftool currently only created symlinks when a file contains unstaged
changes.
Change this behaviour so that symlinks are created whenever the
right-hand side of the comparison has the same SHA1 as the file in the
working tree.
Note that textconv filters are handled in the same way as by git-diff
and if a clean filter is not the inverse of its smudge filter we already
get a null SHA1 from "diff --raw" and will symlink the file without
going through the new hash-object based check.
Reported-by: Matt McClure <matthewlmcclure@gmail.com>
Signed-off-by: John Keeping <john@keeping.me.uk>
---
Documentation/git-difftool.txt | 4 +++-
git-difftool.perl | 21 ++++++++++++++++++---
t/t7800-difftool.sh | 14 ++++++++++++++
3 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/Documentation/git-difftool.txt b/Documentation/git-difftool.txt
index e575fea..8361e6e 100644
--- a/Documentation/git-difftool.txt
+++ b/Documentation/git-difftool.txt
@@ -72,7 +72,9 @@ with custom merge tool commands and has the same value as `$MERGED`.
--symlinks::
--no-symlinks::
'git difftool''s default behavior is create symlinks to the
- working tree when run in `--dir-diff` mode.
+ working tree when run in `--dir-diff` mode and the right-hand
+ side of the comparison yields the same content as the file in
+ the working tree.
+
Specifying `--no-symlinks` instructs 'git difftool' to create copies
instead. `--no-symlinks` is the default on Windows.
diff --git a/git-difftool.perl b/git-difftool.perl
index 0a90de4..5f093ae 100755
--- a/git-difftool.perl
+++ b/git-difftool.perl
@@ -83,6 +83,21 @@ sub exit_cleanup
exit($status | ($status >> 8));
}
+sub use_wt_file
+{
+ my ($repo, $workdir, $file, $sha1, $symlinks) = @_;
+ my $null_sha1 = '0' x 40;
+
+ if ($sha1 eq $null_sha1) {
+ return 1;
+ } elsif (not $symlinks) {
+ return 0;
+ }
+
+ my $wt_sha1 = $repo->command_oneline('hash-object', "$workdir/$file");
+ return $sha1 eq $wt_sha1;
+}
+
sub setup_dir_diff
{
my ($repo, $workdir, $symlinks) = @_;
@@ -159,10 +174,10 @@ EOF
}
if ($rmode ne $null_mode) {
- if ($rsha1 ne $null_sha1) {
- $rindex .= "$rmode $rsha1\t$dst_path\0";
- } else {
+ if (use_wt_file($repo, $workdir, $dst_path, $rsha1, $symlinks)) {
push(@working_tree, $dst_path);
+ } else {
+ $rindex .= "$rmode $rsha1\t$dst_path\0";
}
}
}
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
index eb1d3f8..8102ce1 100755
--- a/t/t7800-difftool.sh
+++ b/t/t7800-difftool.sh
@@ -370,6 +370,20 @@ test_expect_success PERL 'difftool --dir-diff' '
echo "$diff" | stdin_contains file
'
+write_script .git/CHECK_SYMLINKS <<\EOF &&
+#!/bin/sh
+test -L "$2/file" &&
+test -L "$2/file2" &&
+test -L "$2/sub/sub"
+echo $?
+EOF
+
+test_expect_success PERL,SYMLINKS 'difftool --dir-diff --symlink without unstaged changes' '
+ result=$(git difftool --dir-diff --symlink \
+ --extcmd "./.git/CHECK_SYMLINKS" branch HEAD) &&
+ test "$result" = 0
+'
+
test_expect_success PERL 'difftool --dir-diff ignores --prompt' '
diff=$(git difftool --dir-diff --prompt --extcmd ls branch) &&
echo "$diff" | stdin_contains sub &&
--
1.8.2.rc2.4.g7799588
^ permalink raw reply related
* RE: Rename conflicts in the index
From: Edward Thomson @ 2013-03-13 20:44 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git@vger.kernel.org
In-Reply-To: <7va9q72n1u.fsf@alter.siamese.dyndns.org>
Junio C Hamano [mailto:gitster@pobox.com] wrote:
> I do not offhand see anything particularly stupid; a new optional index extension
> section CACHE_EXT_RENAME_CONFLICT might be a good addition.
>
> Is "one side moves A to B while the other side moves it to C" the only case, or is
> it just an example? Off the top of my head, "one side moves A to x while the
> other side moves B to x/y" would also be something we would want to know. I
> am sure there are other cases that need to be considered.
Yes, that was just an example. Certainly I was intending that all conflicts
that arose from renames would end up here since one can't really reason
why the merge tool created a conflict by looking at the index alone - even
knowing the merge tool's similarity algorithms, this would be awfully
expensive to piece back together, even if the index did contain non-zero
stage entries for all the items that were involved in the conflicts.
That said, my rather naive initial thought was that we could repeat *all*
conflicts in this area. This would give tools that knew how to understand
this the ability to go to a single place for conflict data, rather than
producing some merge of high-stage entries that comprise non-rename
conflicts and data from the rename conflict area for rename conflicts.
Thanks-
-ed
^ permalink raw reply
* [PATCH] Allow combined diff to ignore white-spaces
From: Antoine Pelisse @ 2013-03-13 21:21 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Antoine Pelisse
In-Reply-To: <7v38wdc4ei.fsf@alter.siamese.dyndns.org>
Currently, it's not possible to use the space-ignoring options (-b, -w,
--ignore-space-at-eol) with combined diff. It makes it pretty impossible
to read a merge between a branch that changed all tabs to spaces, and a
branch with functional changes.
Pass diff flags to diff engine, so that combined diff behaves as normal
diff does with spaces.
Also coalesce lines that are removed from both (or more) parents.
It also means that a conflict-less merge done using a ignore-* strategy
option will not show any conflict if shown in combined-diff using the
same option.
Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
---
OK, I added some tests and coalesce similar lost lines (using the same flags
we used for diff.
combine-diff.c | 57 ++++++++++++++++++++++++++++++-----
t/t4038-diff-combined.sh | 75 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 125 insertions(+), 7 deletions(-)
diff --git a/combine-diff.c b/combine-diff.c
index 35d41cd..0f33983 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -5,6 +5,7 @@
#include "diffcore.h"
#include "quote.h"
#include "xdiff-interface.h"
+#include "xdiff/xmacros.h"
#include "log-tree.h"
#include "refs.h"
#include "userdiff.h"
@@ -122,7 +123,47 @@ static char *grab_blob(const unsigned char *sha1, unsigned int mode,
return blob;
}
-static void append_lost(struct sline *sline, int n, const char *line, int len)
+static int match_string_spaces(const char *line1, int len1,
+ const char *line2, int len2,
+ long flags)
+{
+ if (flags & XDF_WHITESPACE_FLAGS) {
+ for (; len1 > 0 && XDL_ISSPACE(line1[len1 - 1]); len1--);
+ for (; len2 > 0 && XDL_ISSPACE(line2[len2 - 1]); len2--);
+ }
+
+ if (!(flags & (XDF_IGNORE_WHITESPACE | XDF_IGNORE_WHITESPACE_CHANGE)))
+ return (len1 == len2 && !memcmp(line1, line2, len1));
+
+ while (len1 > 0 && len2 > 0) {
+ len1--;
+ len2--;
+ if (XDL_ISSPACE(line1[len1]) || XDL_ISSPACE(line2[len2])) {
+ if ((flags & XDF_IGNORE_WHITESPACE_CHANGE) &&
+ (!XDL_ISSPACE(line1[len1]) || !XDL_ISSPACE(line2[len2])))
+ return 0;
+
+ for (; len1 > 0 && XDL_ISSPACE(line1[len1]); len1--);
+ for (; len2 > 0 && XDL_ISSPACE(line2[len2]); len2--);
+ }
+ if (line1[len1] != line2[len2])
+ return 0;
+ }
+
+ if (flags & XDF_IGNORE_WHITESPACE) {
+ // Consume remaining spaces
+ for (; len1 > 0 && XDL_ISSPACE(line1[len1 - 1]); len1--);
+ for (; len2 > 0 && XDL_ISSPACE(line2[len2 - 1]); len2--);
+ }
+
+ // We matched full line1 and line2
+ if (!len1 && !len2)
+ return 1;
+
+ return 0;
+}
+
+static void append_lost(struct sline *sline, int n, const char *line, int len, long flags)
{
struct lline *lline;
unsigned long this_mask = (1UL<<n);
@@ -133,8 +174,8 @@ static void append_lost(struct sline *sline, int n, const char *line, int len)
if (sline->lost_head) {
lline = sline->next_lost;
while (lline) {
- if (lline->len == len &&
- !memcmp(lline->line, line, len)) {
+ if (match_string_spaces(lline->line, lline->len,
+ line, len, flags)) {
lline->parent_map |= this_mask;
sline->next_lost = lline->next;
return;
@@ -162,6 +203,7 @@ struct combine_diff_state {
int n;
struct sline *sline;
struct sline *lost_bucket;
+ long flags;
};
static void consume_line(void *state_, char *line, unsigned long len)
@@ -201,7 +243,7 @@ static void consume_line(void *state_, char *line, unsigned long len)
return; /* not in any hunk yet */
switch (line[0]) {
case '-':
- append_lost(state->lost_bucket, state->n, line+1, len-1);
+ append_lost(state->lost_bucket, state->n, line+1, len-1, state->flags);
break;
case '+':
state->sline[state->lno-1].flag |= state->nmask;
@@ -215,7 +257,7 @@ static void combine_diff(const unsigned char *parent, unsigned int mode,
struct sline *sline, unsigned int cnt, int n,
int num_parent, int result_deleted,
struct userdiff_driver *textconv,
- const char *path)
+ const char *path, long flags)
{
unsigned int p_lno, lno;
unsigned long nmask = (1UL << n);
@@ -231,9 +273,10 @@ static void combine_diff(const unsigned char *parent, unsigned int mode,
parent_file.ptr = grab_blob(parent, mode, &sz, textconv, path);
parent_file.size = sz;
memset(&xpp, 0, sizeof(xpp));
- xpp.flags = 0;
+ xpp.flags = flags;
memset(&xecfg, 0, sizeof(xecfg));
memset(&state, 0, sizeof(state));
+ state.flags = flags;
state.nmask = nmask;
state.sline = sline;
state.lno = 1;
@@ -962,7 +1005,7 @@ static void show_patch_diff(struct combine_diff_path *elem, int num_parent,
elem->parent[i].mode,
&result_file, sline,
cnt, i, num_parent, result_deleted,
- textconv, elem->path);
+ textconv, elem->path, opt->xdl_opts);
}
show_hunks = make_hunks(sline, cnt, num_parent, dense);
diff --git a/t/t4038-diff-combined.sh b/t/t4038-diff-combined.sh
index 614425a..ba8a56b 100755
--- a/t/t4038-diff-combined.sh
+++ b/t/t4038-diff-combined.sh
@@ -113,4 +113,79 @@ test_expect_success 'check --cc --raw with forty trees' '
grep "^::::::::::::::::::::::::::::::::::::::::[^:]" out
'
+test_expect_success 'setup combined ignore spaces' '
+ git checkout master &&
+ >test &&
+ git add test &&
+ git commit -m initial &&
+
+ echo "
+ always coalesce
+ eol space coalesce \n\
+ space change coalesce
+ all spa ces coalesce
+ eol spaces \n\
+ space change
+ all spa ces" >test &&
+ git commit -m "change three" -a &&
+
+ git checkout -b side HEAD^ &&
+ echo "
+ always coalesce
+ eol space coalesce
+ space change coalesce
+ all spaces coalesce
+ eol spaces
+ space change
+ all spaces" >test &&
+ git commit -m indent -a &&
+
+ test_must_fail git merge master &&
+ echo "
+ eol spaces \n\
+ space change
+ all spa ces" > test &&
+ git commit -m merged -a
+'
+
+test_expect_success 'check combined output (no ignore space)' '
+ git show | test_i18ngrep "^-\s*eol spaces" &&
+ git show | test_i18ngrep "^-\s*eol space coalesce" &&
+ git show | test_i18ngrep "^-\s*space change" &&
+ git show | test_i18ngrep "^-\s*space change coalesce" &&
+ git show | test_i18ngrep "^-\s*all spaces" &&
+ git show | test_i18ngrep "^-\s*all spaces coalesce" &&
+ git show | test_i18ngrep "^--\s*always coalesce"
+'
+
+test_expect_success 'check combined output (ignore space at eol)' '
+ git show --ignore-space-at-eol | test_i18ngrep "^\s*eol spaces" &&
+ git show --ignore-space-at-eol | test_i18ngrep "^--\s*eol space coalesce" &&
+ git show --ignore-space-at-eol | test_i18ngrep "^-\s*space change" &&
+ git show --ignore-space-at-eol | test_i18ngrep "^-\s*space change coalesce" &&
+ git show --ignore-space-at-eol | test_i18ngrep "^-\s*all spaces" &&
+ git show --ignore-space-at-eol | test_i18ngrep "^-\s*all spaces coalesce" &&
+ git show --ignore-space-at-eol | test_i18ngrep "^--\s*always coalesce"
+'
+
+test_expect_success 'check combined output (ignore space change)' '
+ git show -b | test_i18ngrep "^\s*eol spaces" &&
+ git show -b | test_i18ngrep "^--\s*eol space coalesce" &&
+ git show -b | test_i18ngrep "^\s*space change" &&
+ git show -b | test_i18ngrep "^--\s*space change coalesce" &&
+ git show -b | test_i18ngrep "^-\s*all spaces" &&
+ git show -b | test_i18ngrep "^-\s*all spaces coalesce" &&
+ git show -b | test_i18ngrep "^--\s*always coalesce"
+'
+
+test_expect_success 'check combined output (ignore all spaces)' '
+ git show -w | test_i18ngrep "^\s*eol spaces" &&
+ git show -w | test_i18ngrep "^--\s*eol space coalesce" &&
+ git show -w | test_i18ngrep "^\s*space change" &&
+ git show -w | test_i18ngrep "^--\s*space change coalesce" &&
+ git show -w | test_i18ngrep "^\s*all spa ces" &&
+ git show -w | test_i18ngrep "^--\s*all spaces coalesce" &&
+ git show -w | test_i18ngrep "^--\s*always coalesce"
+'
+
test_done
--
1.7.9.5
^ permalink raw reply related
* Re: Tag peeling peculiarities
From: Jeff King @ 2013-03-13 21:58 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Michael Haggerty, git discussion list
In-Reply-To: <7vwqtb2ood.fsf@alter.siamese.dyndns.org>
On Wed, Mar 13, 2013 at 10:29:54AM -0700, Junio C Hamano wrote:
> Michael Haggerty <mhagger@alum.mit.edu> writes:
>
> > It is not
> > clear to me whether the prohibition of tags outside of refs/tags should
> > be made more airtight or whether the peeling of tags outside of
> > refs/tags should be fixed.
>
> Retroactively forbidding presense/creation of tags outside the
> designated refs/tags hierarchy will not fly. I think we should peel
> them when we are reading from "# pack-refs with: peeled" version.
>
> Theoretically, we could introduce "# pack-refs with: fully-peeled"
> that records peeled versions for _all_ annotated tags even in
> unusual places, but that would be introducing problems to existing
> versions of the software to cater to use cases that is not blessed
> officially, so I doubt it has much value.
I agree. The REF_KNOWS_PEELED thing is an optimization, so it's OK to
simply omit the optimization in the corner case, since we don't expect
it to happen often. So what happens now is a bug, but it is a bug in the
reader that mis-applies the optimization, and we can just fix the
reader.
I do not think there is any point in peeling while we are reading the
pack-refs file; it is no more expensive to do so later, and in most
cases we will not even bother peeling. We should simply omit the
REF_KNOWS_PEELED bit so that later calls to peel_ref do not follow the
optimization code path. Something like this:
diff --git a/refs.c b/refs.c
index 175b9fc..ee498c8 100644
--- a/refs.c
+++ b/refs.c
@@ -824,7 +824,10 @@ static void read_packed_refs(FILE *f, struct ref_dir *dir)
refname = parse_ref_line(refline, sha1);
if (refname) {
- last = create_ref_entry(refname, sha1, flag, 1);
+ int this_flag = flag;
+ if (prefixcmp(refname, "refs/tags/"))
+ this_flag &= ~REF_KNOWS_PEELED;
+ last = create_ref_entry(refname, sha1, this_flag, 1);
add_ref(dir, last);
continue;
}
I think with this patch, though, that upload-pack would end up having to
read the object type of everything under refs/heads to decide whether it
needs to be peeled (and in most cases, it does not, making the initial
ref advertisement potentially much more expensive). How do we want to
handle that? Should we teach upload-pack not to bother advertising peels
outside of refs/tags? That would break people who expect tag
auto-following to work for refs outside of refs/tags, but I am not sure
that is a sane thing to expect.
-Peff
^ permalink raw reply related
* Re: Deletion of git repo causes incorrect block count on HFS+ case-sensitive
From: David Aguilar @ 2013-03-13 22:14 UTC (permalink / raw)
To: Ismail Tabtabai; +Cc: git
In-Reply-To: <B6ED348A-2168-42F5-B6EC-81D7E62805ED@me.com>
On Wed, Mar 13, 2013 at 11:45 AM, Ismail Tabtabai <itabtabai@me.com> wrote:
> Hello,
>
> When I delete a git repo that I have cloned on my machine using 'rm -rf repo-name' I get an incorrect block count when I attempt a Disk Repair.
>
> I am running OS X 10.8.2 on a user installed SSD. The git version is 1.8.1.5.
This is not a git issue.
I would recommend inspecting your hardware; this could be a disk going bad.
There's not much git can do to fix a broken HFS+ filesystem or faulty
hardware. If anything, it's an HFS+ / Apple bug, though that is less
likely than a bad disk.
If you haven't already, you should probably start doing backups.
I hope that helps.
> Checking file systemChecking Journaled HFS Plus volume.
> Detected a case-sensitive volume.
> Checking extents overflow file.
> Checking catalog file.
> Incorrect block count for file pack-8c0dc1a398a22c58ea1eba09de3ee9d935ad1ea3.pack
> (It should be 4865 instead of 12244)
> Incorrect block count for file pack-db61a037ad0e043e801d8ba1db98b1af14d466af.pack
> (It should be 5889 instead of 12245)
> Incorrect block count for file pack-db61a037ad0e043e801d8ba1db98b1af14d466af.pack
> (It should be 6220 instead of 12245)
> Incorrect block count for file pack-286c1444bc32ee2ed0af1d15070e0e31f22ba0a8.pack
> (It should be 7937 instead of 12246)
> Checking multi-linked files.
> Checking catalog hierarchy.
> Checking extended attributes file.
> Checking volume bitmap.
> Volume bitmap needs minor repair for orphaned blocks
> Checking volume information.
> Invalid volume free block count
> (It should be 85306183 instead of 85282114)
> Repairing volume.
> Rechecking volume.
> Checking Journaled HFS Plus volume.
> Detected a case-sensitive volume.
> Checking extents overflow file.
> Checking catalog file.
> Checking multi-linked files.
> Checking catalog hierarchy.
> Checking extended attributes file.
> Checking volume bitmap.
> Checking volume information.
> The volume avicenna was repaired successfully.
> Volume repair complete.Updating boot support partitions for the volume as required.
It looks like it repaired itself. bad blocks?
--
David
^ permalink raw reply
* Re: Suggestion for difftool behaviour during a merge conflict
From: David Aguilar @ 2013-03-13 22:26 UTC (permalink / raw)
To: Øystein Walle; +Cc: git
In-Reply-To: <CAFaJEqu8gHSLK5u7v5ZOaJ1XjAhV=F9p46MEo2sDVH4vpXAojA@mail.gmail.com>
On Wed, Mar 13, 2013 at 11:48 AM, Øystein Walle <oystwa@gmail.com> wrote:
> When a merge is ongoing and there are conflicts, 'git difftool' will
> output the exact same --cc-style diff output as 'git diff' will without
> further explanation. This has lead to some confusion: A couple of weeks
> ago a person asked on #git why his difftool wasn't working. After a long
> while we realized difftool's behaviour after invocations such as 'git
> difftool HEAD~ HEAD' would work as expected but 'git difftool' "simply
> wouldn't".
>
> With that in mind I have three suggestions on improving 'git difftool':
>
> - Show a three-way diff between the versions (local, remote, merge)
> using the user's configured difftool. Diffing against the version
> containing the markers will generate some extra noise in the difftool
> and might be confusing, but it's similar in behaviour to how 'git
> difftool' normally works.
>
> - Prompt the user if they want to launch 'git mergetool' instead since
> a merge is ongoing. Reasonable but it might be awkward if the user is
> asked whether the conflict was resolved or not when all they wanted
> to do was to visually diff something.
>
> - Add a notice to stderr saying that a --cc-style diff output is shown
> instead; or document the behaviour in the man page. Definitely the
> simplest option.
>
> I'm willing to try to take a stab at either of these but I wanted to
> bring it up first. There is of course an implicit fourth option which is
> to do nothing, and that I'm wrong about this :)
Thanks for bringing this up.
I think the simplest first step would be to detect this state,
print a message saying that difftool cannot be used during a merge,
and suggest mergetool instead.
We would need to be careful to still allow difftool <ref> <ref>
and only trigger this behavior when the cc-style diff would be printed.
I have a feeling that this happens deep in git-diff.
git-difftool--helper is driven by git-diff via the
GIT_EXTERNAL_DIFF mechanism, and that mechanism is probably not
triggered when in this state, so we may need to add another
breadcrumb that we can build upon.
> Best regards,
> Øystein Walle
cheers,
--
David
^ permalink raw reply
* [PATCH 0/4] contrib/subtree: general updates
From: Paul Campbell @ 2013-03-13 22:32 UTC (permalink / raw)
To: git; +Cc: David Greene, Paul Campbell
Less ambitious patch series this time.
James and Michael's patches add if clauses that use the
bashism 'if []' rather than 'if test'. I've left them as
they are to match the other if clauses within the
git-subtree.sh file. I remember reading a comment on the
list about matching the local style being more important
than the overall project's style. I'm happy to change them
otherwise.
James Roper (1):
contrib/subtree: Teach push to use --force option
Matt Hoffman (1):
contrib/subtree: Replace invisible carriage return with a visible \r
Michael Hart (1):
contrib/subtree: Teach push to abort if split fails
Paul Cartwright (1):
contrib/subtree: Fix typo (s/incldued/included/)
contrib/subtree/git-subtree.sh | 16 ++++++++++++++--
contrib/subtree/git-subtree.txt | 7 ++++++-
2 files changed, 20 insertions(+), 3 deletions(-)
--
1.8.2
^ permalink raw reply
* [PATCH 1/4] contrib/subtree: Teach push to abort if split fails
From: Paul Campbell @ 2013-03-13 22:32 UTC (permalink / raw)
To: git; +Cc: David Greene, Michael Hart, Paul Campbell
In-Reply-To: <1363213963-4065-1-git-send-email-pcampbell@kemitix.net>
From: Michael Hart <michael@adslot.com>
If the subtree split fails it doesn't return the SHA that should be
pushed to the other repository.
Added a check to ensure that split succeeds before trying to push
and display an error message.
Signed-off-by: Paul Campbell <pcampbell@kemitix.net>
---
contrib/subtree/git-subtree.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
index 8a23f58..c68cc6f 100755
--- a/contrib/subtree/git-subtree.sh
+++ b/contrib/subtree/git-subtree.sh
@@ -715,7 +715,12 @@ cmd_push()
repository=$1
refspec=$2
echo "git push using: " $repository $refspec
- git push $repository $(git subtree split --prefix=$prefix):refs/heads/$refspec
+ rev=$(git subtree split --prefix=$prefix)
+ if [ -n "$rev" ]; then
+ git push $repository $rev:refs/heads/$refspec
+ else
+ die "Couldn't push, 'git subtree split' failed."
+ fi
else
die "'$dir' must already exist. Try 'git subtree add'."
fi
--
1.8.2
^ permalink raw reply related
* [PATCH 3/4] contrib/subtree: Fix typo (s/incldued/included/)
From: Paul Campbell @ 2013-03-13 22:32 UTC (permalink / raw)
To: git; +Cc: David Greene, Paul Cartwright, Paul Campbell
In-Reply-To: <1363213963-4065-1-git-send-email-pcampbell@kemitix.net>
From: Paul Cartwright <paul.cartwright@ziilabs.com>
Signed-off-by: Paul Campbell <pcampbell@kemitix.net>
---
contrib/subtree/git-subtree.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/subtree/git-subtree.txt b/contrib/subtree/git-subtree.txt
index 97dd3c9..e1bfa61 100644
--- a/contrib/subtree/git-subtree.txt
+++ b/contrib/subtree/git-subtree.txt
@@ -275,7 +275,7 @@ git-extensions repository in ~/git-extensions/:
name
You can omit the --squash flag, but doing so will increase the number
-of commits that are incldued in your local repository.
+of commits that are included in your local repository.
We now have a ~/git-extensions/git-subtree directory containing code
from the master branch of git://github.com/apenwarr/git-subtree.git
--
1.8.2
^ permalink raw reply related
* [PATCH 2/4] contrib/subtree: Teach push to use --force option
From: Paul Campbell @ 2013-03-13 22:32 UTC (permalink / raw)
To: git; +Cc: David Greene, James Roper, Paul Campbell
In-Reply-To: <1363213963-4065-1-git-send-email-pcampbell@kemitix.net>
From: James Roper <jroper@vz.net>
Allow the --force option to be passed to the child push command.
Signed-off-by: Paul Campbell <pcampbell@kemitix.net>
---
contrib/subtree/git-subtree.sh | 9 ++++++++-
contrib/subtree/git-subtree.txt | 5 +++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
index c68cc6f..2d9b071 100755
--- a/contrib/subtree/git-subtree.sh
+++ b/contrib/subtree/git-subtree.sh
@@ -26,6 +26,8 @@ b,branch= create a new branch from the split subtree
ignore-joins ignore prior --rejoin commits
onto= try connecting new tree to an existing one
rejoin merge the new branch back into HEAD
+ options for 'push'
+f,force use force push
options for 'add', 'merge', 'pull' and 'push'
squash merge subtree changes as a single commit
"
@@ -84,6 +86,7 @@ while [ $# -gt 0 ]; do
-b) branch="$1"; shift ;;
-P) prefix="$1"; shift ;;
-m) message="$1"; shift ;;
+ -f|--force) force=1 ;;
--no-prefix) prefix= ;;
--onto) onto="$1"; shift ;;
--no-onto) onto= ;;
@@ -712,12 +715,16 @@ cmd_push()
die "You must provide <repository> <refspec>"
fi
if [ -e "$dir" ]; then
+ push_opts=
+ if [ "$force" == "1" ]; then
+ push_opts="$push_opts --force"
+ fi
repository=$1
refspec=$2
echo "git push using: " $repository $refspec
rev=$(git subtree split --prefix=$prefix)
if [ -n "$rev" ]; then
- git push $repository $rev:refs/heads/$refspec
+ git push $push_opts $repository $rev:refs/heads/$refspec
else
die "Couldn't push, 'git subtree split' failed."
fi
diff --git a/contrib/subtree/git-subtree.txt b/contrib/subtree/git-subtree.txt
index 7ba853e..97dd3c9 100644
--- a/contrib/subtree/git-subtree.txt
+++ b/contrib/subtree/git-subtree.txt
@@ -255,6 +255,11 @@ OPTIONS FOR split
'--rejoin' when you split, because you don't want the
subproject's history to be part of your project anyway.
+OPTIONS FOR push
+----------------
+-f::
+--force::
+ Uses 'git push --force'.
EXAMPLE 1. Add command
----------------------
--
1.8.2
^ permalink raw reply related
* [PATCH 4/4] contrib/subtree: Replace invisible carriage return with a visible \r
From: Paul Campbell @ 2013-03-13 22:32 UTC (permalink / raw)
To: git; +Cc: David Greene, Matt Hoffman, Paul Campbell
In-Reply-To: <1363213963-4065-1-git-send-email-pcampbell@kemitix.net>
From: Matt Hoffman <matt.hoffman@quantumretail.com>
The ctrl-M (^M) character used for the carriage return (CR) is not visible
in all (most) text editors and is often silently converted to a new
line (NL) or CR/NL combo.
'say' is a wrapper for echo with accepts the option -e to interperet
escaped characters. \r becomes a CR, yet is not munged by text
editors.
Signed-off-by: Paul Campbell <pcampbell@kemitix.net>
Conflicts:
git-subtree.sh
---
contrib/subtree/git-subtree.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
index 2d9b071..5314bd0 100755
--- a/contrib/subtree/git-subtree.sh
+++ b/contrib/subtree/git-subtree.sh
@@ -595,7 +595,7 @@ cmd_split()
eval "$grl" |
while read rev parents; do
revcount=$(($revcount + 1))
- say -n "$revcount/$revmax ($createcount)
"
+ say -ne "$revcount/$revmax ($createcount)\r"
debug "Processing commit: $rev"
exists=$(cache_get $rev)
if [ -n "$exists" ]; then
--
1.8.2
^ permalink raw reply related
* Re: [PATCH 4/4] contrib/subtree: Replace invisible carriage return with a visible \r
From: Paul Campbell @ 2013-03-13 22:36 UTC (permalink / raw)
To: git; +Cc: David Greene, Matt Hoffman, Paul Campbell
In-Reply-To: <1363213963-4065-5-git-send-email-pcampbell@kemitix.net>
On Wed, Mar 13, 2013 at 10:32 PM, Paul Campbell <pcampbell@kemitix.net> wrote:
> From: Matt Hoffman <matt.hoffman@quantumretail.com>
>
> The ctrl-M (^M) character used for the carriage return (CR) is not visible
> in all (most) text editors and is often silently converted to a new
> line (NL) or CR/NL combo.
>
> 'say' is a wrapper for echo with accepts the option -e to interperet
> escaped characters. \r becomes a CR, yet is not munged by text
> editors.
>
> Signed-off-by: Paul Campbell <pcampbell@kemitix.net>
>
> Conflicts:
> git-subtree.sh
Oops. Meant to replace this Conflict line.
> ---
> contrib/subtree/git-subtree.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
> index 2d9b071..5314bd0 100755
> --- a/contrib/subtree/git-subtree.sh
> +++ b/contrib/subtree/git-subtree.sh
> @@ -595,7 +595,7 @@ cmd_split()
> eval "$grl" |
> while read rev parents; do
> revcount=$(($revcount + 1))
> - say -n "$revcount/$revmax ($createcount)
> "
> + say -ne "$revcount/$revmax ($createcount)\r"
> debug "Processing commit: $rev"
> exists=$(cache_get $rev)
> if [ -n "$exists" ]; then
> --
> 1.8.2
>
--
Paul [W] Campbell
^ permalink raw reply
* [PATCH] contrib/subtree: Replace invisible carriage return with a visible \r
From: Paul Campbell @ 2013-03-13 22:42 UTC (permalink / raw)
To: git; +Cc: David Greene, Matt Hoffman, Paul Campbell
In-Reply-To: <CALeLG_kSye2xRoUJ8ytjx-bsj6oSG_brPbj-X3yfXuLA-KEppA@mail.gmail.com>
From: Matt Hoffman <matt.hoffman@quantumretail.com>
The ctrl-M (^M) character used for the carriage return (CR) is not visible
in all (most) text editors and is often silently converted to a new
line (NL) or CR/NL combo.
'say' is a wrapper for echo with accepts the option -e to interperet
escaped characters. \r becomes a CR, yet is not munged by text
editors.
Signed-off-by: Paul Campbell <pcampbell@kemitix.net>
---
Rerolled with the Conflicts lines removed.
contrib/subtree/git-subtree.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
index 2d9b071..5314bd0 100755
--- a/contrib/subtree/git-subtree.sh
+++ b/contrib/subtree/git-subtree.sh
@@ -595,7 +595,7 @@ cmd_split()
eval "$grl" |
while read rev parents; do
revcount=$(($revcount + 1))
- say -n "$revcount/$revmax ($createcount)
"
+ say -ne "$revcount/$revmax ($createcount)\r"
debug "Processing commit: $rev"
exists=$(cache_get $rev)
if [ -n "$exists" ]; then
--
1.8.2
^ permalink raw reply related
* Re: [PATCH] Allow combined diff to ignore white-spaces
From: Junio C Hamano @ 2013-03-13 23:42 UTC (permalink / raw)
To: Antoine Pelisse; +Cc: git
In-Reply-To: <1363209683-10264-1-git-send-email-apelisse@gmail.com>
Antoine Pelisse <apelisse@gmail.com> writes:
> Currently, it's not possible to use the space-ignoring options (-b, -w,
> --ignore-space-at-eol) with combined diff. It makes it pretty impossible
> to read a merge between a branch that changed all tabs to spaces, and a
> branch with functional changes.
>
> Pass diff flags to diff engine, so that combined diff behaves as normal
> diff does with spaces.
> Also coalesce lines that are removed from both (or more) parents.
>
> It also means that a conflict-less merge done using a ignore-* strategy
> option will not show any conflict if shown in combined-diff using the
> same option.
>
> Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
> ---
> OK, I added some tests and coalesce similar lost lines (using the same flags
> we used for diff.
>
> combine-diff.c | 57 ++++++++++++++++++++++++++++++-----
> t/t4038-diff-combined.sh | 75 ++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 125 insertions(+), 7 deletions(-)
>
> diff --git a/combine-diff.c b/combine-diff.c
> index 35d41cd..0f33983 100644
> --- a/combine-diff.c
> +++ b/combine-diff.c
> @@ -5,6 +5,7 @@
> #include "diffcore.h"
> #include "quote.h"
> #include "xdiff-interface.h"
> +#include "xdiff/xmacros.h"
> #include "log-tree.h"
> #include "refs.h"
> #include "userdiff.h"
> @@ -122,7 +123,47 @@ static char *grab_blob(const unsigned char *sha1, unsigned int mode,
> return blob;
> }
>
> -static void append_lost(struct sline *sline, int n, const char *line, int len)
> +static int match_string_spaces(const char *line1, int len1,
> + const char *line2, int len2,
> + long flags)
> +{
> + if (flags & XDF_WHITESPACE_FLAGS) {
> + for (; len1 > 0 && XDL_ISSPACE(line1[len1 - 1]); len1--);
> + for (; len2 > 0 && XDL_ISSPACE(line2[len2 - 1]); len2--);
> + }
This says "any XDF_WHITESPACE_FLAGS causes the trailing blanks
ignored", which is correct: --ignore-space-at-eol, -b or -w are all
we have. OK.
> + if (!(flags & (XDF_IGNORE_WHITESPACE | XDF_IGNORE_WHITESPACE_CHANGE)))
> + return (len1 == len2 && !memcmp(line1, line2, len1));
If --ignore-space-at-eol is the only one given, or none of the
whitespace flags is given, then we can just do memcmp(). OK.
The remainder of the function is only used when either -b or -w is
(or both are) in effect.
> + while (len1 > 0 && len2 > 0) {
> + len1--;
> + len2--;
Scanning from the tail end of the strings...
> + if (XDL_ISSPACE(line1[len1]) || XDL_ISSPACE(line2[len2])) {
> + if ((flags & XDF_IGNORE_WHITESPACE_CHANGE) &&
> + (!XDL_ISSPACE(line1[len1]) || !XDL_ISSPACE(line2[len2])))
> + return 0;
If --ignore-space-change and one side is blank while the other not,
then these cannot be the same. If we see blank on both sides, that
is fine under --ignore-whitespace, too.
> + for (; len1 > 0 && XDL_ISSPACE(line1[len1]); len1--);
> + for (; len2 > 0 && XDL_ISSPACE(line2[len2]); len2--);
Then, strip the blanks, if any, so that the next comparison is done
for the last non-blank char from both sides. OK.
> + }
> + if (line1[len1] != line2[len2])
> + return 0;
And we can say "not same" as soon as we find differences. Rinse
and repeat.
> + }
> +
> + if (flags & XDF_IGNORE_WHITESPACE) {
> + // Consume remaining spaces
No C++/C99 comments in our codebase, please.
> + for (; len1 > 0 && XDL_ISSPACE(line1[len1 - 1]); len1--);
> + for (; len2 > 0 && XDL_ISSPACE(line2[len2 - 1]); len2--);
If we are ignoring all whitespaces, we can simply discard them. OK.
I wonder what happens when --ignore-space-change is in effect but
not --ignore-all-space? The loop must have exited because one (or
both) of len1 and len2 went down to zero. If both are zero, we
obviously have a match, and otherwise, one has blanks at the
beginning and the other does not. Wait, is that really true? Yes,
because if len1 == 0 && len2 != 0, line2[len2] cannot be blank
(otherwise len2 would be zero because we have a loop to eat a run of
blanks).
OK, sounds good.
> + }
> +
> + // We matched full line1 and line2
Likewise for "//".
> + if (!len1 && !len2)
> + return 1;
> +
> + return 0;
> +}
> +static void append_lost(struct sline *sline, int n, const char *line, int len, long flags)
> {
> struct lline *lline;
> unsigned long this_mask = (1UL<<n);
> @@ -133,8 +174,8 @@ static void append_lost(struct sline *sline, int n, const char *line, int len)
> if (sline->lost_head) {
> lline = sline->next_lost;
> while (lline) {
> - if (lline->len == len &&
> - !memcmp(lline->line, line, len)) {
> + if (match_string_spaces(lline->line, lline->len,
> + line, len, flags)) {
> lline->parent_map |= this_mask;
> sline->next_lost = lline->next;
> return;
Nicely done.
Thanks, will queue with comment style fix-ups.
> diff --git a/t/t4038-diff-combined.sh b/t/t4038-diff-combined.sh
> index 614425a..ba8a56b 100755
> --- a/t/t4038-diff-combined.sh
> +++ b/t/t4038-diff-combined.sh
> @@ -113,4 +113,79 @@ test_expect_success 'check --cc --raw with forty trees' '
> grep "^::::::::::::::::::::::::::::::::::::::::[^:]" out
> '
>
> +test_expect_success 'setup combined ignore spaces' '
> + git checkout master &&
> + >test &&
> + git add test &&
> + git commit -m initial &&
> +
> + echo "
> + always coalesce
> + eol space coalesce \n\
> + space change coalesce
> + all spa ces coalesce
> + eol spaces \n\
> + space change
> + all spa ces" >test &&
> + git commit -m "change three" -a &&
> +
> + git checkout -b side HEAD^ &&
> + echo "
> + always coalesce
> + eol space coalesce
> + space change coalesce
> + all spaces coalesce
> + eol spaces
> + space change
> + all spaces" >test &&
> + git commit -m indent -a &&
> +
> + test_must_fail git merge master &&
> + echo "
> + eol spaces \n\
> + space change
> + all spa ces" > test &&
> + git commit -m merged -a
> +'
> +
> +test_expect_success 'check combined output (no ignore space)' '
> + git show | test_i18ngrep "^-\s*eol spaces" &&
> + git show | test_i18ngrep "^-\s*eol space coalesce" &&
> + git show | test_i18ngrep "^-\s*space change" &&
> + git show | test_i18ngrep "^-\s*space change coalesce" &&
> + git show | test_i18ngrep "^-\s*all spaces" &&
> + git show | test_i18ngrep "^-\s*all spaces coalesce" &&
> + git show | test_i18ngrep "^--\s*always coalesce"
> +'
> +
> +test_expect_success 'check combined output (ignore space at eol)' '
> + git show --ignore-space-at-eol | test_i18ngrep "^\s*eol spaces" &&
> + git show --ignore-space-at-eol | test_i18ngrep "^--\s*eol space coalesce" &&
> + git show --ignore-space-at-eol | test_i18ngrep "^-\s*space change" &&
> + git show --ignore-space-at-eol | test_i18ngrep "^-\s*space change coalesce" &&
> + git show --ignore-space-at-eol | test_i18ngrep "^-\s*all spaces" &&
> + git show --ignore-space-at-eol | test_i18ngrep "^-\s*all spaces coalesce" &&
> + git show --ignore-space-at-eol | test_i18ngrep "^--\s*always coalesce"
> +'
> +
> +test_expect_success 'check combined output (ignore space change)' '
> + git show -b | test_i18ngrep "^\s*eol spaces" &&
> + git show -b | test_i18ngrep "^--\s*eol space coalesce" &&
> + git show -b | test_i18ngrep "^\s*space change" &&
> + git show -b | test_i18ngrep "^--\s*space change coalesce" &&
> + git show -b | test_i18ngrep "^-\s*all spaces" &&
> + git show -b | test_i18ngrep "^-\s*all spaces coalesce" &&
> + git show -b | test_i18ngrep "^--\s*always coalesce"
> +'
> +
> +test_expect_success 'check combined output (ignore all spaces)' '
> + git show -w | test_i18ngrep "^\s*eol spaces" &&
> + git show -w | test_i18ngrep "^--\s*eol space coalesce" &&
> + git show -w | test_i18ngrep "^\s*space change" &&
> + git show -w | test_i18ngrep "^--\s*space change coalesce" &&
> + git show -w | test_i18ngrep "^\s*all spa ces" &&
> + git show -w | test_i18ngrep "^--\s*all spaces coalesce" &&
> + git show -w | test_i18ngrep "^--\s*always coalesce"
> +'
> +
> test_done
> --
> 1.7.9.5
^ permalink raw reply
* Re: [PATCH] Allow combined diff to ignore white-spaces
From: Junio C Hamano @ 2013-03-13 23:53 UTC (permalink / raw)
To: Antoine Pelisse; +Cc: git
In-Reply-To: <1363209683-10264-1-git-send-email-apelisse@gmail.com>
Antoine Pelisse <apelisse@gmail.com> writes:
> OK, I added some tests and coalesce similar lost lines (using the same flags
> we used for diff.
Hmph, why doesn't this pass its own tests?
> +test_expect_success 'check combined output (no ignore space)' '
> + git show | test_i18ngrep "^-\s*eol spaces" &&
What kind of grep pattern is "\s*"?
^ permalink raw reply
* [ANN] git-arr 0.11
From: Alberto Bertogli @ 2013-03-13 23:41 UTC (permalink / raw)
To: git
Hi!
I wanted to let you know about git-arr, which is a git repository
browser that can generate static HTML instead of having to run
dynamically.
It is smaller, with less features and a different set of tradeoffs than
gitweb or cgit, but if you have a reduced environment, the static
generation can be useful.
You can find more details on http://blitiri.com.ar/p/git-arr/, and see
an example of the generated output at http://blitiri.com.ar/git/.
It's written in Python, uses the Bottle web framework, and is open
source under the MIT licence.
Please note it's new and there are still some rough edges that I
obviously intend to fix, but it's been working fine for my use cases, so
all feedback is welcome :)
Thanks a lot!
Alberto
^ permalink raw reply
* [PATCH] setup.c: Remove duplicate code from prefix_pathspec()
From: Lukas Fleischer @ 2013-03-14 0:24 UTC (permalink / raw)
To: git; +Cc: Andrew Wong, Junio C Hamano
Only check for ',' explicitly and handle both ')' and '\0' in the else
branch. strcspn() can only return ',', ')' and '\0' at this point so the
new code is completely equivalent to what we had before.
This also fixes following GCC warning:
setup.c: In function ‘get_pathspec’:
setup.c:207:8: warning: ‘nextat’ may be used uninitialized in this function [-Wmaybe-uninitialized]
setup.c:205:15: note: ‘nextat’ was declared here
Signed-off-by: Lukas Fleischer <git@cryptocrack.de>
---
This removes the only warning that currently occurs when building the
next branch.
Junio: Feel free to squash this into Andrew's patch (805da4dee15b,
"setup.c: stop prefix_pathspec() from looping past the end of string").
setup.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/setup.c b/setup.c
index d2335a8..94c1e61 100644
--- a/setup.c
+++ b/setup.c
@@ -207,12 +207,11 @@ static const char *prefix_pathspec(const char *prefix, int prefixlen, const char
*copyfrom && *copyfrom != ')';
copyfrom = nextat) {
size_t len = strcspn(copyfrom, ",)");
- if (copyfrom[len] == '\0')
- nextat = copyfrom + len;
- else if (copyfrom[len] == ')')
- nextat = copyfrom + len;
- else if (copyfrom[len] == ',')
+ if (copyfrom[len] == ',')
nextat = copyfrom + len + 1;
+ else
+ /* handle ')' and '\0' */
+ nextat = copyfrom + len;
if (!len)
continue;
for (i = 0; i < ARRAY_SIZE(pathspec_magic); i++)
--
1.8.2.rc2.352.g908df73
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox