* Re: [PATCH] Remove the suggestion to use parsecvs, which is currently broken.
From: Eric S. Raymond @ 2013-01-07 20:41 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Heiko Voigt, git
In-Reply-To: <7vehhwiyt6.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com>:
> In the longer term, if parsecvs is revived either by Eric or
> somebody else, we will add the mention back to the documentation,
> probably with an updated URL.
I'm working on the revival right now. Repository generation is still
broken, and likely to remain so until I can make the export-stream stage
work, but just a few minutes ago I coaxed it into generating what looks
like graphviz markup describing a commit graph on standard output.
Even though dot(1) barfs on the markup, this is encouraging. It almost
certainly means that the analysis and parsing stages aren't broken, and
by stubbing out enough functions I can figure out what is being passed
to the broken repository-maker well enough for my purposes.
Actually, I've already figured out how to generate blob and commit-header
markup. The hard part is generating fileops; I don't quite understand
the generated data structures well enough to do that yet. But I'm
making progress, and feeling more optimistic than I was yesterday.
In related news, I've sent Michael Haggerty patches that fix the visible
problems with cvs2git that I enumerated in previous mail.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
^ permalink raw reply
* Re: [PATCH v2] status: always report ignored tracked directories
From: Antoine Pelisse @ 2013-01-07 20:24 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jeff King, Torsten Bögershausen, git
In-Reply-To: <7vip78izir.fsf@alter.siamese.dyndns.org>
> Here is my attempt...
>
> When enumerating paths that are ignored, paths the index knows
> about are not included in the result. The "index knows about"
> check is done by consulting the name hash, not the actual
> contents of the index:
>
> - When core.ignorecase is false, directory names are not in the
> name hash, and ignored ones are shown as ignored (directories
> can never be tracked anyway).
>
> - When core.ignorecase is true, however, the name hash keeps
> track of the names of directories, in order to detect
> additions of the paths under different cases. This causes
> ignored directories to be mistakenly excluded when
> enumerating ignored paths.
>
> Stop excluding directories that are in the name hash when
> looking for ignored files in dir_add_name(); the names that are
> actually in the index are excluded much earlier in the callchain
> in treat_file(), so this fix will not make them mistakenly
> identified as ignored.
>
> Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
> Reviewed-by: Jeff King <peff@peff.net>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
I like it a lot, thanks to both of you
^ permalink raw reply
* The tip of 'next' has been rewound.
From: Junio C Hamano @ 2013-01-07 20:04 UTC (permalink / raw)
To: git
Just to let you contributors know, your next "git fetch" will notice
that remotes/origin/next has been rewound. Two topics have been
kicked back to 'pu', and the branch has been reordered somewhat.
I'll start merging bugfix topics that have graduated to master since
v1.8.1 to maint so that we can have v1.8.1.1 sometime next week. We
haven't seen any real regression report for v1.8.1 since tagging it,
and it has been a week, so this may be the first 'maint' release
without "brown paper bag regression fix" for quite some time ;-)
^ permalink raw reply
* Re: [PATCH] Remove the suggestion to use parsecvs, which is currently broken.
From: Junio C Hamano @ 2013-01-07 19:21 UTC (permalink / raw)
To: Heiko Voigt; +Cc: Eric S. Raymond, git
In-Reply-To: <20130106163420.GA3378@book-mint>
Heiko Voigt <hvoigt@hvoigt.net> writes:
> Hi,
>
> On Fri, Dec 28, 2012 at 11:42:00PM -0500, Eric S. Raymond wrote:
>> Heiko Voigt <hvoigt@hvoigt.net>:
>> > Maybe you could add that information to the parsecvs compile
>> > instructions? I think just because it takes some effort to compile does
>> > not justify to remove this useful pointer here. When I was converting a
>> > legacy cvs repository this pointer would have helped me a lot.
>>
>> I'm parsecvs's maintainer now. It's not in good shape; there is at
>> least one other known showstopper besides the build issue. I would
>> strongly prefer to direct peoples' attention away from it until I
>> have time to fix it and cut a release. This is not a distant
>> prospect - two or three weeks out, maybe.
>
> So for this short amount of time you want to change gits documentation?
> Is this hint causing you trouble? Are there many people asking for
> support because of that?
>
> Even if it takes some effort to get parsecvs running I would like to
> keep the hint to a good and proven cvs importer.
I do not mind changing the documentation, but now I re-read the
change, I tend to agree that dropping the last (un)maintained
version of parsecvs may be detrimental. Most people will not
download parsecvs from keith's page, but first will try the one
shipped with their distros, and the recent maintainer change for
that tool would not have any impact to these users.
But at the same time, by the time this change reaches these users
who may benefit by the mention of parsecvs via the distro route, the
situation may be different, so I do not think it is such a big deal.
In the longer term, if parsecvs is revived either by Eric or
somebody else, we will add the mention back to the documentation,
probably with an updated URL.
^ permalink raw reply
* [PATCH] Prevent space after directories in tcsh completion
From: Marc Khouzam @ 2013-01-07 19:07 UTC (permalink / raw)
To: 'git@vger.kernel.org'
Cc: 'Junio C Hamano', 'felipe.contreras@gmail.com',
'szeder@ira.uka.de'
If git-completion.bash returns a single directory as a completion,
tcsh will automatically add a space after it, which is not what the
user wants.
This commit prevents tcsh from doing this.
Also, a check is added to make sure the tcsh version used is recent
enough to allow completion to work as expected.
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
---
This update is meant to have tcsh completion work better if the
feature "git-completion.bash: add support for path completion"
is accepted.
See http://www.mail-archive.com/git@vger.kernel.org/msg14137.html
This commit does not depend on that other feature though and can
be applied right away.
Furthermore, based on feedback I received, some users are running
versions of tcsh that are over 5 years old and don't provide the
proper support for this script. I've added a check to let the user
know of such (sad) situation nicely.
Thanks
Marc
contrib/completion/git-completion.tcsh | 33 +++++++++++++++++++++------------
1 file changed, 21 insertions(+), 12 deletions(-)
diff --git a/contrib/completion/git-completion.tcsh b/contrib/completion/git-completion.tcsh
index 8aafb63..3e3889f 100644
--- a/contrib/completion/git-completion.tcsh
+++ b/contrib/completion/git-completion.tcsh
@@ -13,6 +13,7 @@
#
# To use this completion script:
#
+# 0) You need tcsh 6.16.00 or newer.
# 1) Copy both this file and the bash completion script to ${HOME}.
# You _must_ use the name ${HOME}/.git-completion.bash for the
# bash script.
@@ -24,6 +25,15 @@
# set autolist=ambiguous
# It will tell tcsh to list the possible completion choices.
+set __git_tcsh_completion_version = `\echo ${tcsh} | \sed 's/\./ /g'`
+if ( ${__git_tcsh_completion_version[1]} < 6 || \
+ ( ${__git_tcsh_completion_version[1]} == 6 && \
+ ${__git_tcsh_completion_version[2]} < 16 ) ) then
+ echo "git-completion.tcsh: Your version of tcsh is too old, you need version 6.16.00 or newer. Git completion will not work."
+ exit
+endif
+unset __git_tcsh_completion_version
+
set __git_tcsh_completion_original_script = ${HOME}/.git-completion.bash
set __git_tcsh_completion_script = ${HOME}/.git-completion.tcsh.bash
@@ -64,9 +74,7 @@ fi
_\${1}
IFS=\$'\n'
-if [ \${#COMPREPLY[*]} -gt 0 ]; then
- echo "\${COMPREPLY[*]}" | sort | uniq
-else
+if [ \${#COMPREPLY[*]} -eq 0 ]; then
# No completions suggested. In this case, we want tcsh to perform
# standard file completion. However, there does not seem to be way
# to tell tcsh to do that. To help the user, we try to simulate
@@ -85,19 +93,20 @@ else
# We don't support ~ expansion: too tricky.
if [ "\${TO_COMPLETE:0:1}" != "~" ]; then
# Use ls so as to add the '/' at the end of directories.
- RESULT=(\`ls -dp \${TO_COMPLETE}* 2> /dev/null\`)
- echo \${RESULT[*]}
-
- # If there is a single completion and it is a directory,
- # we output it a second time to trick tcsh into not adding a space
- # after it.
- if [ \${#RESULT[*]} -eq 1 ] && [ "\${RESULT[0]: -1}" == "/" ]; then
- echo \${RESULT[*]}
- fi
+ COMPREPLY=(\`ls -dp \${TO_COMPLETE}* 2> /dev/null\`)
fi
fi
fi
+# tcsh does not automatically remove duplicates, so we do it ourselves
+echo "\${COMPREPLY[*]}" | sort | uniq
+
+# If there is a single completion and it is a directory, we output it
+# a second time to trick tcsh into not adding a space after it.
+if [ \${#COMPREPLY[*]} -eq 1 ] && [ "\${COMPREPLY[0]: -1}" == "/" ]; then
+ echo "\${COMPREPLY[*]}"
+fi
+
EOF
# Don't need this variable anymore, so don't pollute the users environment
--
1.8.1.367.g8e14972.dirty
^ permalink raw reply related
* Re: [PATCH v2] status: always report ignored tracked directories
From: Junio C Hamano @ 2013-01-07 19:06 UTC (permalink / raw)
To: Antoine Pelisse; +Cc: Jeff King, tboegi, git
In-Reply-To: <1357510179-22852-1-git-send-email-apelisse@gmail.com>
Antoine Pelisse <apelisse@gmail.com> writes:
First, thanks for working on this.
The explanation is a bit confusing, especially for people like me,
as it does not make it clear that there are two kinds of "paths in
the index". Files can be added to the index ("git add" and then
shown via "ls-files") and these are what we usually call "files in
the index". But there is a separate "name hash" that keeps track of
"paths the index knows about" in play, and that is what is discussed
in the description.
> Tracked directories (i.e. directories containing tracked files)
> that are ignored must be reported as ignored if they contain
> untracked files.
>
> Currently, files in the index can't be reported as ignored and are
> automatically dropped from the list:
"file in the index" will never be ignored, period. Some paths the
index knows about, namely, directory names in name hash, may need to
be reported as ignored.
It is not clear what "list" the above "dropped from the list" refers
to. The list of paths that becomes the result of "status"?
> - When core.ignorecase is false, directories (which are not directly
> tracked) are not listed as part of the index, and the directory can be
> shown as ignored.
>
> - When core.ignorecase is true on the other hand, directories are
> reported as part of the index, and the directory is dropped, thus not
> displayed as ignored.
>
> Fix that behavior by allowing indexed file to be added when looking for
> ignored files.
>
> - Ignored tracked and untracked directories are treated the same way
> when looking for ignored files, so we should not care about their index
> status.
> - Files are dismissed by treat_file() if they belong to the
> index, so that step would have been a no-op anyway.
Here is my attempt...
When enumerating paths that are ignored, paths the index knows
about are not included in the result. The "index knows about"
check is done by consulting the name hash, not the actual
contents of the index:
- When core.ignorecase is false, directory names are not in the
name hash, and ignored ones are shown as ignored (directories
can never be tracked anyway).
- When core.ignorecase is true, however, the name hash keeps
track of the names of directories, in order to detect
additions of the paths under different cases. This causes
ignored directories to be mistakenly excluded when
enumerating ignored paths.
Stop excluding directories that are in the name hash when
looking for ignored files in dir_add_name(); the names that are
actually in the index are excluded much earlier in the callchain
in treat_file(), so this fix will not make them mistakenly
identified as ignored.
Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff --git a/dir.c b/dir.c
index 9b80348..f836590 100644
--- a/dir.c
+++ b/dir.c
@@ -672,7 +672,8 @@ static struct dir_entry *dir_entry_new(const char *pathname, int len)
static struct dir_entry *dir_add_name(struct dir_struct *dir, const char *pathname, int len)
{
- if (cache_name_exists(pathname, len, ignore_case))
+ if (!(dir->flags & DIR_SHOW_IGNORED) &&
+ cache_name_exists(pathname, len, ignore_case))
return NULL;
ALLOC_GROW(dir->entries, dir->nr+1, dir->alloc);
@@ -877,11 +878,7 @@ static int treat_file(struct dir_struct *dir, struct strbuf *path, int exclude,
if (exclude)
exclude_file = !(dir->flags & DIR_SHOW_IGNORED);
else if (dir->flags & DIR_SHOW_IGNORED) {
- /*
- * Optimization:
- * Don't spend time on indexed files, they won't be
- * added to the list anyway
- */
+ /* Always exclude indexed files */
struct cache_entry *ce = index_name_exists(&the_index,
path->buf, path->len, ignore_case);
^ permalink raw reply related
* [PATCH] git clone depth of 0 not possible.
From: Stefan Beller @ 2013-01-07 18:06 UTC (permalink / raw)
To: schlotter, gitster, Ralf.Wildenhues, git; +Cc: Stefan Beller
Currently it is not possible to have a shallow depth of
just 0, i.e. only one commit in that repository after cloning.
The minimum number of commits is 2, caused by depth=1.
I had no good idea how to add this behavior to git clone as
the depth variable in git_transport_options struct (file transport.h)
uses value 0 for another meaning, so it would have need changes at
all places, where the transport options depth is being used
(e.g. fetch)
So I documented the current behavior, see attached patch.
Stefan Beller (1):
Documentation on depth option in git clone.
Documentation/git-clone.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--
1.8.1.80.g3e293fb.dirty
^ permalink raw reply
* Re: [PATCH] refs: do not use cached refs in repack_without_ref
From: Martin Fick @ 2013-01-07 18:14 UTC (permalink / raw)
To: Jeff King; +Cc: Michael Haggerty, git, Junio C Hamano
In-Reply-To: <201301071109.12086.mfick@codeaurora.org>
...[Sorry about the previous HTML reposts]
Jeff King <peff@peff.net> wrote:
>On Mon, Dec 31, 2012 at 03:30:53AM -0700, Martin Fick
wrote:
>
>> The general approach is to setup a transaction and
>> either commit or abort it. A transaction can be setup
>> by renaming an appropriately setup directory to the
>> "ref.lock" name. If the rename succeeds, the
>> transaction is begun. Any actor can abort the
>> transaction (up until it is committed) by simply
>> deleting the "ref.lock" directory, so it is not at
>> risk of going stale.
>
> Deleting a directory is not atomic, as you first have
> to remove the contents, putting it into a potentially
> inconsistent state. I'll assume you deal with that
> later...
Right, these simple single file transactions have at
best 1 important file/directory in them, once deleted
the transaction is aborted (can no longer complete).
However to support multi file transactions, a better
approach is likely to rename the uuid directory to have
a .delete extension before deleting stuff in it.
> > One important piece of the transaction is the use
> > of uuids. The uuids provide a mechanism to tie the
> > atomic commit pieces to the transactions and thus to
> > prevent long sleeping process from inadvertently
> > performing actions which could be out of date when
> > they wake finally up.
> >
>Has this been a problem for you in practice?
No, but as you say, we don't currently hold locks for
very long. I anticipate it being a problem in a
clustered environment when transactions start spanning
repos from java processes, with insane amounts of RAM,
which can sometimes have unpredictable indeterminately
long java GC cycles at inopportune times.. It would seem
short sighted if Gerrit at least did not assume this
will be a problem.
But, deletes today in git are not so short and Michael's
fixes may make things worse? But, as you point out, that
should perhaps be solved a different way.
> Avoiding this is one of the reasons that git does not
> take out long locks; instead, it takes the lock only
> at the moment it is ready to write, and aborts if it
> has been updated since the longer-term operation
> began. This has its own problems (you might do a lot
> of work only to have your operation aborted), but I
> am not sure that your proposal improves on that.
It does not, it might increase this.
> Git typically holds ref locks for a few syscalls. If
> you are conservative about leaving potentially stale
> locks in place (e.g., give them a few minutes to
> complete before assuming they are now bogus), you will
> not run into that problem.
In a distributed environment even a few minutes might
not be enough, processes could be on a remote server
with a temporarily split network, that could cause
delays longer than your typical local expectations.
But there is also the other piece of this problem, how
do you detect stale locks? How long will it be stale
until a user figures it out and reports it? How many
other users will simply have failed pushes and wonder
why without reporting them?
> > In each case, the atomic commit piece is the
> > renaming of a file. For the create and update
> > pieces, a file is renamed from the "ref.lock"
> > dir to the "ref" file resulting in an update to
> > the sha for the ref.
>
> I think we've had problems with cross-directory
> renames on some filesystems, but I don't recall the
> details. I know that Coda does not like
> cross-directory links, but cross-directory renames
> are OK (and in fact we fall back to the latter when
> the former does not work).
>
> Ah, here we go: 5723fe7 (Avoid cross-directory renames
> and linking on object creation, 2008-06-14). Looks
> like NFS is the culprit.
If the renames fail we can fall back to regular file
locking, the hard part to detect and deal with would be
if the renames don't fail but become copies/mkdirs.
>> In the case of a delete, the actor may verify that
>> "ref" currently contains the sha to "prune" if it
>> needs to, and then renames the "ref" file to
>> "ref.lock/uuid/delete". On success, the ref was
>> deleted.
>>
>> Whether successful or not, the actor may now simply
>> delete the "ref.lock" directory, clearing the way for
>> a new transaction. Any other actor may delete this
>> directory at any time also, likely either on conflict
>> (if they are attempting to initiate a transaction),
>> or after a grace period just to cleanup the FS. Any
>> actor may also safely cleanup the tmp directories,
>> preferably also after a grace period.
>
> Hmm. So what happens to the "delete" file when the
> ref.lock directory is being deleted? Presumably
> deleting the ref.lock directory means doing it
> recursively (which is non-atomic). But then why are
> we keeping the delete file at all, if we're just about
> to remove it?
We are not trying to keep it, but we need to ensure that
our transaction has not yet been aborted: the rename
does this. If we just deleted the file, we may sleep
and another transaction may abort our transaction and
complete before we wake up and actually delete the file.
But by using a rename we tie the delete atomically to
the transaction, it cannot succeed if our transaction
was aborted during a sleep since the directory we are
renaming the file into would be gone! This is sort of
the magic piece that makes the whole scheme special,
safe deletes tend to be the hardest part.
>What happens if another process wants to cancel a
> transaction that is partially done? That is, the
> ref.lock directory is created, but it contains the
> uuid subdir? It sounds like it's OK to just delete
> from it, and the original process will then fail at
> its rename?
Yes, exactly. But again, it might be better to cause a
rename of the uuid dir before deleting it.
>> One neat part about this scheme is that I believe it
>> would be backwards compatible with the current
>> locking mechanism since the transaction directory
>> will simply appear to be a lock to older clients.
>> And the old lock file should continue to lock
>> out these newer transactions.
>
>Yeah, I don't see anything that would prevent that.
> The current code only cares about open("$ref.lock",
> O_EXCL). But that should be correct and atomic with
> respect to the renamed directories. You are depending
> on atomic directory renames. Those aren't used
> anywhere yet in git, as far as I know. So that may run
> into problems (but there's no reason this system
> couldn't be optional for filesystems that are more
> abled, and other systems could fall back to the
> straight-file locking).
Right.
> So in response to your question, no, I don't see any
> real showstoppers here.
Alright, cool, thanks for the review and analysis, I
appreciate it.
> And unlike the "all refs are files in a directory"
> scheme, it's confined to writing, which solves the
> readdir() atomicity questions I had there.
Right, I couldn't see a way around those, I think it was
inherently flawed.
> I still can't say I'm super excited about it, just
> because it seems like a solution in search of a
> problem that I have not experienced myself.
It might be. But at least a solution is out there now.
If time indicates that it is needed, I feel better
knowing there is a solution.
Murphy has a way of making unlikely problems real
annoyances in automated distributed environments. The
problem is not usually one real annoying problem, those
get fixed. The problem we deal mostly with is 1000
infrequent problems, all different, but they add up to a
system which needs constant maintenance. And the
maintenance is hard since each problem is different, the
analysis is difficult and requires expertise.
> Fixing the minor remaining races on ref packing would
> be nice, but I do not think those are a problem of the
> on-disk lock representation. The reason they are not
> fixed now is from an attempt to keep lock contention
> low between unrelated updates (something which we
> should probably give up on in favor of correctness;
> but that is orthogonal to whether we do it with the
> existing file locks or with a new system).
Agreed.
>A much stronger fix for that would be to record deletes
> in the loose ref storage so that we don't have to
> update the packed-refs file as often (because it is
> inherently a lock bottleneck, and because it is
> wasteful when you have a very large number of refs).
> But that means dealing with directory/file conflicts
> between deleted and existing branches, which is a
> pain.
Makes sense.
Thanks again for your thoughts,
-Martin
--
The Qualcomm Innovation Center, Inc. is a member of Code
Aurora Forum, hosted by The Linux Foundation
^ permalink raw reply
* [PATCH] Documentation on depth option in git clone.
From: Stefan Beller @ 2013-01-07 18:10 UTC (permalink / raw)
To: gitster, schlotter, Ralf.Wildenhues, git; +Cc: Stefan Beller
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
---
Documentation/git-clone.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index 7fefdb0..e76aa50 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -186,7 +186,8 @@ objects from the source repository into a pack in the cloned repository.
it, nor push from nor into it), but is adequate if you
are only interested in the recent history of a large project
with a long history, and would want to send in fixes
- as patches.
+ as patches. The depth should be at least 1. If it is 0 or
+ below, the cloned repository will not be shallow.
--single-branch::
Clone only the history leading to the tip of a single branch,
--
1.8.1.80.g3e293fb.dirty
^ permalink raw reply related
* Re: [PATCH 1/4] test: Add target test-lint-shell-syntax
From: Junio C Hamano @ 2013-01-07 18:07 UTC (permalink / raw)
To: Torsten Bögershausen; +Cc: Jeff King, git
In-Reply-To: <50EB0928.3090901@web.de>
Torsten Bögershausen <tboegi@web.de> writes:
> Sorry for late answer, but there is a problem (both linux and Mac OS X) :-(
> $ make test-lint does not do shel syntax check, neither
> $ make test-lint-shell-syntax
In which directory?
$ make -C t test-lint-shell-syntax
... passes silently ...
$ ed t/t0000-basic.sh
/test_expect_success/
a
which sh
.
w
q
$ make -C t test-lint-shell-syntax
t0000-basic.sh:28: error: which is not portable (please use type): which sh
make: *** [test-lint-shell-syntax] Error 1
If you edit out '@' (but nothing else) from this line:
> @'$(PERL_PATH_SQ)' check-non-portable-shell.pl $(T)
and run the above again, you would see that it is running this shell
command:
'/usr/bin/perl' check-non-portable-shell.pl t0000-basic.sh t0001-init.sh ...
If you introduce a Perl syntax error to check-non-portable-shell.pl,
like this, you will get:
$ make -C t test-lint-shell-syntax
syntax error at check-non-portable-shell.pl line 11, near "whoa
So... is your shell broken? The above seems to work for dash, bash,
ksh and zsh.
^ permalink raw reply
* [PATCH] Documentation on depth option in git clone.
From: Stefan Beller @ 2013-01-07 18:06 UTC (permalink / raw)
To: schlotter, gitster, Ralf.Wildenhues, git; +Cc: Stefan Beller
In-Reply-To: <1357581996-17505-1-git-send-email-stefanbeller@googlemail.com>
---
Documentation/git-clone.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index 7fefdb0..e76aa50 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -186,7 +186,8 @@ objects from the source repository into a pack in the cloned repository.
it, nor push from nor into it), but is adequate if you
are only interested in the recent history of a large project
with a long history, and would want to send in fixes
- as patches.
+ as patches. The depth should be at least 1. If it is 0 or
+ below, the cloned repository will not be shallow.
--single-branch::
Clone only the history leading to the tip of a single branch,
--
1.8.1.80.g3e293fb.dirty
^ permalink raw reply related
* Re: [PATCH v2] status: always report ignored tracked directories
From: Junio C Hamano @ 2013-01-07 17:50 UTC (permalink / raw)
To: Torsten Bögershausen
Cc: Antoine Pelisse, Nguyen Thai Ngoc Duy, Jeff King, git
In-Reply-To: <50EB0409.1090307@web.de>
Torsten Bögershausen <tboegi@web.de> writes:
> The bad news: the patch does not apply.
Huh, isn't this already queued as 22ccf86 (status: always report
ignored tracked directories, 2013-01-06)?
> The good news: t7061 passes on pu,
> and dir.c seems to be changes as needed:
>
> commit 1f4e17c6c9833f17dc6bbf045f8a8d6378dcb417
> Merge: dee1fa4 cc37e5b
> Author: Junio C Hamano <gitster@pobox.com>
> Date: Sun Jan 6 23:46:29 2013 -0800
>
> Merge branch 'nd/parse-pathspec' into pu
>
> which comes from Duy:
>
> commit cc37e5bf18ca11d9a884bddfebcdff61df3e6279
> Author: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> Date: Sun Jan 6 13:21:08 2013 +0700
>
> Convert more init_pathspec() to parse_pathspec()
Yes, it needs conflict resolution with other topics in flight, but
the thing to test is to see if the result of merging 22ccf86 into
the 'master' branch does what we want; the newer topic is still in
flux and we know it will be rerolled before it gets into testable
shape.
^ permalink raw reply
* Re: [PATCH 1/4] test: Add target test-lint-shell-syntax
From: Torsten Bögershausen @ 2013-01-07 17:43 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jeff King, Torsten Bögershausen, git
In-Reply-To: <7vpq1nyvp1.fsf@alter.siamese.dyndns.org>
On 03.01.13 01:08, Junio C Hamano wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
>> I would actually not add this to TEST_LINT by default, especially
>> when "duplicates" and "executable" that are much simpler and less
>> likely to hit false positives are not on by default.
>>
>> At least, a change to add this to TEST_LINT by default must wait to
>> be merged to any integration branch until all the fix-up topics that
>> this test triggers in the current codebase graduate to the branch.
>>
>>>> +test-lint-shell-syntax:
>>>> + $(PERL_PATH) check-non-portable-shell.pl $(T)
>>>
>>> This is wrong if $(PERL_PATH) contains spaces, no?
>>
>> You are correct; "harness" thing in the same Makefile gets this
>> wrong, too. I think the right invocation is:
>>
>> @'$(PERL_PATH_SQ)' check-non-portable.shell.pl $(T)
>>
>> although I do not offhand know if that symbol is already exported by
>> the top-level Makefile.
>
> I'll tentatively queue this instead. The log message has also been
> cleaned up a bit.
Sorry for late answer, but there is a problem (both linux and Mac OS X) :-(
$ make test-lint does not do shel syntax check, neither
$ make test-lint-shell-syntax
In the Makefile the the line
@'$(PERL_PATH_SQ)' check-non-portable-shell.pl $(T)
doesn't seem to anything (?)
Replacing @'$(PERL_PATH_SQ)' with $(PERL_PATH) gives the following,
expected result: (a very long line starting like this:)
$ make test-lint-shell-syntax
/usr/bin/perl check-non-portable-shell.pl t0000-basic.sh ......
confused...
/Torsten
^ permalink raw reply
* Re: [PATCH v2] status: always report ignored tracked directories
From: Torsten Bögershausen @ 2013-01-07 17:21 UTC (permalink / raw)
To: Antoine Pelisse, Nguyen Thai Ngoc Duy; +Cc: Jeff King, tboegi, git
In-Reply-To: <1357510179-22852-1-git-send-email-apelisse@gmail.com>
On 06.01.13 23:09, Antoine Pelisse wrote:
[snip]
> Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
> ---
> dir.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/dir.c b/dir.c
> index 9b80348..f836590 100644
> --- a/dir.c
> +++ b/dir.c
> @@ -672,7 +672,8 @@ static struct dir_entry *dir_entry_new(const char *pathname, int len)
>
> static struct dir_entry *dir_add_name(struct dir_struct *dir, const char *pathname, int len)
> {
> - if (cache_name_exists(pathname, len, ignore_case))
> + if (!(dir->flags & DIR_SHOW_IGNORED) &&
> + cache_name_exists(pathname, len, ignore_case))
> return NULL;
>
> ALLOC_GROW(dir->entries, dir->nr+1, dir->alloc);
> @@ -877,11 +878,7 @@ static int treat_file(struct dir_struct *dir, struct strbuf *path, int exclude,
> if (exclude)
> exclude_file = !(dir->flags & DIR_SHOW_IGNORED);
> else if (dir->flags & DIR_SHOW_IGNORED) {
> - /*
> - * Optimization:
> - * Don't spend time on indexed files, they won't be
> - * added to the list anyway
> - */
> + /* Always exclude indexed files */
> struct cache_entry *ce = index_name_exists(&the_index,
> path->buf, path->len, ignore_case);
>
> --
> 1.7.12.4.3.g90f5e2d
>
The bad news: the patch does not apply.
The good news: t7061 passes on pu,
and dir.c seems to be changes as needed:
commit 1f4e17c6c9833f17dc6bbf045f8a8d6378dcb417
Merge: dee1fa4 cc37e5b
Author: Junio C Hamano <gitster@pobox.com>
Date: Sun Jan 6 23:46:29 2013 -0800
Merge branch 'nd/parse-pathspec' into pu
which comes from Duy:
commit cc37e5bf18ca11d9a884bddfebcdff61df3e6279
Author: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date: Sun Jan 6 13:21:08 2013 +0700
Convert more init_pathspec() to parse_pathspec()
^ permalink raw reply
* Re: [PATCH 1/8] Use %B for Split Subject/Body
From: Junio C Hamano @ 2013-01-07 16:53 UTC (permalink / raw)
To: 郑文辉(Techlive Zheng); +Cc: David A. Greene, git
In-Reply-To: <CAPYzjrT_8g26y-QrYvbQYoySWskGdn15jCX60rz04wQFQ2ikVw@mail.gmail.com>
"郑文辉(Techlive Zheng)" <techlivezheng@gmail.com> writes:
> Though, this patch defintely should be merged, becuase no one expects
> his commit message be altered durging the splitting process.
Are you saying that after double-checking what was posted? It said
something like this below, which does not look like 'definitely
should be' to me.
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
index 920c664..f2b6d4a 100755
--- a/contrib/subtree/git-subtree.sh
+++ b/contrib/subtree/git-subtree.sh
@@ -296,7 +296,12 @@ copy_commit()
# We're going to set some environment vars here, so
# do it in a subshell to get rid of them safely later
debug copy_commit "{$1}" "{$2}" "{$3}"
+ # Use %B rather than %s%n%n%b to handle the special case of a
+ # commit that only has a subject line. We don't want to
+ # introduce a newline after the subject, causing generation of
+ # a new hash.
git log -1 --pretty=format:'%an%n%ae%n%ad%n%cn%n%ce%n%cd%n%s%n%n%b' "$1" |
+# git log -1 --pretty=format:'%an%n%ae%n%ad%n%cn%n%ce%n%cd%n%B' "$1" |
(
read GIT_AUTHOR_NAME
read GIT_AUTHOR_EMAIL
^ permalink raw reply related
* Re: [PATCH 4/4] t5002: check if unzip supports symlinks
From: René Scharfe @ 2013-01-07 16:50 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: git discussion list, Junio C Hamano
In-Reply-To: <20130107085206.GI27909@elie.Belkin>
Am 07.01.2013 09:52, schrieb Jonathan Nieder:
> René Scharfe wrote:
>
>> Only add a symlink to the repository if both the filesystem and
>> unzip support symlinks. To check the latter, add a ZIP file
>> containing a symlink, created like this with InfoZIP zip 3.0:
>>
>> $ echo sample text >textfile
>> $ ln -s textfile symlink
>> $ zip -y infozip-symlinks.zip textfile symlink
>
> Hm. Do some implementations of "unzip" not support symlinks, or is
> the problem that some systems build Info-ZIP without the SYMLINKS
> option?
The unzip supplied with NetBSD 6.0.1, which is based on libarchive,
doesn't support symlinks. It creates a file with the link target path
as its only content for such entries.
I assume that Info-ZIP is compiled with the SYMLINKS option on all
platforms whose default filesystem supports symbolic links. Except on
Windows perhaps, where it's complicated.
For the test script there is no difference: If we don't have a tool to
verify symlinks in archives, we better skip that part.
René
^ permalink raw reply
* Re: [PATCH 2/4] t0024, t5000: use test_lazy_prereq for UNZIP
From: René Scharfe @ 2013-01-07 16:28 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: git discussion list, Junio C Hamano
In-Reply-To: <20130107084509.GH27909@elie.Belkin>
Am 07.01.2013 09:45, schrieb Jonathan Nieder:
> René Scharfe wrote:
>
>> --- a/t/t0024-crlf-archive.sh
>> +++ b/t/t0024-crlf-archive.sh
>> @@ -5,6 +5,11 @@ test_description='respect crlf in git archive'
>> . ./test-lib.sh
>> GIT_UNZIP=${GIT_UNZIP:-unzip}
>>
>> +test_lazy_prereq UNZIP '
>> + "$GIT_UNZIP" -v >/dev/null 2>&1
>> + test $? -ne 127
>
> Micronit: now that this is part of a test, there is no more need to
> silence its output. The "unzip -v" output could be useful to people
> debugging with "t0024-crlf-archive.sh -v -i".
Oh, yes, good point.
> With or without that change, this is a nice cleanup and obviously
> correct, so
> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Thanks,
René
^ permalink raw reply
* Re: [PATCH 1/4] t0024, t5000: clear variable UNZIP, use GIT_UNZIP instead
From: René Scharfe @ 2013-01-07 16:25 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: git discussion list, Junio C Hamano
In-Reply-To: <20130107051609.GB27909@elie.Belkin>
Am 07.01.2013 06:16, schrieb Jonathan Nieder:
> René Scharfe wrote:
>
>> InfoZIP's unzip takes default parameters from the environment variable
>> UNZIP. Unset it in the test library and use GIT_UNZIP for specifying
>> alternate versions of the unzip command instead.
>>
>> t0024 wasn't even using variable for the actual extraction. t5000
>> was, but when setting it to InfoZIP's unzip it would try to extract
>> from itself (because it treats the contents of $UNZIP as parameters),
>> which failed of course.
>
> That would only happen if the UNZIP variable was already exported,
> right?
We don't want any parameters a user may have been specified influence
the test. I'm not sure if someone actually sets that variable for that
purpose, though.
My main use case is running individual test scripts with an alternative
unzip binary, and with the patch this works as expected:
$ cd t
$ GIT_UNZIP=/usr/pkg/bin/unzip ./t5000-tar-tree.sh
> The patch makes sense and takes care of all uses of ${UNZIP} I can
> find, and it even makes the quoting consistent so a person can put
> their copy of unzip under "/Program Files". For what it's worth,
>
> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Thanks!
René
^ permalink raw reply
* Re: Moving (renaming) submodules, recipe/script
From: Junio C Hamano @ 2013-01-07 16:08 UTC (permalink / raw)
To: Jens Lehmann
Cc: Jonathan Nieder, W. Trevor King, Git, Peter Collingbourne,
mbranchaud, Michael J Gruber
In-Reply-To: <50EA84E9.9030702@web.de>
Jens Lehmann <Jens.Lehmann@web.de> writes:
> Right, and me thinks that would warrant a --force option for deinit
> to do that even if the submodule contains local changes (which would
> make deinit fail otherwise).
Probably.
> Additionally Michael and Marc spoke up
> that they would rather have a --all option to deinit all initialized
> submodules and "git submodule deinit" without any arguments should
> just produce a usage message. As I saw no voices against it that'll
> be part of the next iteration too.
Yeah, I forgot about that possible surprise of deiniting everything
under the sun by default.
I am not sure if "--all" is a good way forward, though.
Can you defeat it with "git submodule deinit ./--all" or something
to limit the target only to one submodule whose unfortunate location
is named as such? If you have such a support, I have this suspicion
that you already get a short and explicit way to say "everything
under the current directory" with "git submodule deinit ." for free.
^ permalink raw reply
* Re: [PATCH] Add getenv.so for catching invalid getenv() use via LD_PRELOAD
From: David Michael @ 2013-01-07 15:45 UTC (permalink / raw)
To: Nguyễn Thái Ngọc Duy; +Cc: git@vger.kernel.org, Junio C Hamano
In-Reply-To: <1357376146-7155-1-git-send-email-pclouds@gmail.com>
Hi,
On Sat, Jan 5, 2013 at 3:55 AM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
> Perhaps this will help the getenv bug hunting (I assume we do the
> hunting on Linux platform only). So far it catches this and is stuck
> at getenv in git_pager().
For the record: I have been testing a macro pointing getenv at an
alternate implementation for the purpose of my port. This alternate
function will return a unique pointer for each variable, as opposed to
using the same static buffer. IBM considers this function a
proprietary z/OS extension (whereas the other is labelled as
conforming to half a dozen standards), but it seems to be more in-line
with the behavior git expects.
So I agree this patch is useful for reaching strict conformance to the
published specs, but I think we can go back to assuming no known
platforms are broken and unusable because of this.
Thanks.
David
^ permalink raw reply
* Re: [BUG/PATCH] setup: Copy an environment variable to avoid overwrites
From: Erik Faye-Lund @ 2013-01-07 15:28 UTC (permalink / raw)
To: David Michael; +Cc: git@vger.kernel.org, Junio C Hamano
In-Reply-To: <CAEvUa7niTJVfp8_kuWs50kvhfZ59F-yAuAmeOXEduHXOq-tRFA@mail.gmail.com>
On Sat, Jan 5, 2013 at 1:35 AM, David Michael <fedora.dm0@gmail.com> wrote:
> It is possible for this pointer of the GIT_DIR environment variable to
> survive unduplicated until further getenv calls are made. The standards
> allow for subsequent calls of getenv to overwrite the string located at
> its returned pointer, and this can result in broken git operations on
> certain platforms.
>
> Signed-off-by: David Michael <fedora.dm0@gmail.com>
> ---
>
> I have encountered an issue with consecutive calls to getenv
> overwriting earlier values. Most notably, it prevents a plain "git
> clone" from working.
>
> Long story short: This value of GIT_DIR gets passed around setup.c
> until it reaches check_repository_format_gently. This function calls
> git_config_early, which eventually runs getenv("HOME"). When it
> returns back to check_repository_format_gently, the gitdir variable
> contains my home directory path. The end result is that I wind up
> with ~/objects/ etc. and a failed repository clone. (Simply adding a
> bare getenv("GIT_DIR") afterwards to reset the pointer also corrects
> the problem.)
>
> Since other platforms are apparently working, yet this getenv behavior
> is supported by the standards, I am left wondering if this could be a
> symptom of something else being broken on my platform (z/OS). Can
> anyone more familiar with this part of git identify any condition that
> obviously should not be occurring?
>
> Thanks.
I have some patches of a similar nature here:
https://github.com/kusma/git/commits/work/getenv-safety
These were written for an earlier version of the UTF-8 patches for Git
for Windows, where we were looking into allowing getenv to use a
static buffer to convert the environment variables from UTF-16 (which
is what Windows maintains) to UTF-8. We ended converting the
environment on start-up instead, so these weren't needed for us. But
perhaps they can be of use to someone else?
^ permalink raw reply
* Re: [PATCH 1/8] Use %B for Split Subject/Body
From: 郑文辉(Techlive Zheng) @ 2013-01-07 15:18 UTC (permalink / raw)
To: Junio C Hamano; +Cc: David A. Greene, git
In-Reply-To: <7vtxr1bg4g.fsf@alter.siamese.dyndns.org>
2013/1/1 Junio C Hamano <gitster@pobox.com>:
> "David A. Greene" <greened@obbligato.org> writes:
>
>> From: Techlive Zheng <techlivezheng@gmail.com>
>>
>> Use %B to format the commit message and body to avoid an extra newline
>> if a commit only has a subject line.
>
> Is this an unconditional improvement, or is it generally an
> improvement but for some users it may be a regression? I am
> guessing it is the former but am just making sure.
This patch will make sure the commits in the result branch by using
`git-subtree split` stays intact as they were in the original branch.
This patch will break the current existing branch that splitted before
this patch, becuase these branches were splitted with the wrongly
altered commit messages.
Maybe a fallback option should be added to make sure these branches
could still be updated.
Though, this patch defintely should be merged, becuase no one expects
his commit message be altered durging the splitting process.
^ permalink raw reply
* RE: [PATCH v4] git-completion.bash: add support for path completion
From: Marc Khouzam @ 2013-01-07 15:26 UTC (permalink / raw)
To: 'Manlio Perillo'
Cc: 'Junio C Hamano', 'git@vger.kernel.org',
'szeder@ira.uka.de', 'felipe.contreras@gmail.com'
In-Reply-To: <50EAD0FA.4050401@gmail.com>
> -----Original Message-----
> From: git-owner@vger.kernel.org
> [mailto:git-owner@vger.kernel.org] On Behalf Of Manlio Perillo
> Sent: Monday, January 07, 2013 8:43 AM
> To: Marc Khouzam
> Cc: Junio C Hamano; git@vger.kernel.org; szeder@ira.uka.de;
> felipe.contreras@gmail.com
> Subject: Re: [PATCH v4] git-completion.bash: add support for
> path completion
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Il 05/01/2013 21:23, Marc Khouzam ha scritto:
> > [...]
> > Below are two suggestions that are in line with this effort
> but that are not regressions.
> >
> > A) It would be nice if
> > git commit -a <TAB>
> > also completed with untracked files
> >
>
> $ git commit -a foo
> fatal: Paths with -a does not make sense.
>
> So
> git commit -a <TAB>
>
> should not suggest untracked files; instead it should suggest nothing.
You are right, I was confused.
git commit --all <TAB>
should also suggest nothing then.
Thanks
Marc
^ permalink raw reply
* Re: [PATCH 1/8] Use %B for Split Subject/Body
From: 郑文辉(Techlive Zheng) @ 2013-01-07 15:00 UTC (permalink / raw)
To: git; +Cc: greened
In-Reply-To: <CAPYzjrTqmzuWoDg+zvLxwB7g6J4J2wbBqpL+UbHKRHcbjA4HrA@mail.gmail.com>
2013/1/1 Junio C Hamano <gitster@pobox.com>:
> "David A. Greene" <greened@obbligato.org> writes:
>
>> From: Techlive Zheng <techlivezheng@gmail.com>
>>
>> Use %B to format the commit message and body to avoid an extra newline
>> if a commit only has a subject line.
>
> Is this an unconditional improvement, or is it generally an
> improvement but for some users it may be a regression? I am
> guessing it is the former but am just making sure.
>
>> Author: Techlive Zheng <techlivezheng@gmail.com>
>>
>> Signed-off-by: David A. Greene <greened@obbligato.org>
>
> Please don't do "Author: " which does not add anything new. That is
> what "From: " is for. Instead it needs to be a sign-off.
>
> Also, is that a real name, I have to wonder?
>
Hmm, sorry about the confusing.
I am a Chinese, I coined that first name a couple years ago when I
decided to have a unique name across the web. My real name is "郑文辉" in
Chinese,translate to English by its pronucation is "Wenhui
Zheng",which means "Zheng" is acturally my real last name. The first
name "Wenhui" does not have any meaning in English, so I coined it by
"Tech" + "Live", which I interprate it as "Technological Living",
thus, "Techlive Zheng" is the name I am currently using online.
Here are some links:
* Let the code talks. https://github.com/techlivezheng
* I cross the great GFW to use twitter. https://twitter.com/techlivezheng
* Also search "Techlive Zheng" in Google, the result should be unique to me.
So, no doubt, I am a real person, just with kind of an uncommon name.
>> Thanks.
^ permalink raw reply
* Re: [BUG] two-way read-tree can write null sha1s into index
From: Jeff King @ 2013-01-07 13:46 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jonathan Nieder, git
In-Reply-To: <7vzk0pvqvu.fsf@alter.siamese.dyndns.org>
On Thu, Jan 03, 2013 at 02:33:09PM -0800, Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes:
>
> > Oh, I agree it's insane to try to carry through unmerged entries. I'm
> > just concerned that not all code paths are careful enough to check.
>
> I would actually be surprised if some code path do assume somebody
> might give them an index with conflicting entries in it and guard
> against it. We have been coding under the "index must exactly match
> the second tree when three-way unpack_trees() begin" requirement
> since day one. An conflicted entry will appear as "index and HEAD
> not matching" and will cause reject_merge() early in threeway_merge()
> anyway, no?
Hmm. There is code in threeway_merge to handle a few cases:
/*
* We start with cases where the index is allowed to match
* something other than the head: #14(ALT) and #2ALT, where it
* is permitted to match the result instead.
*/
/* #14, #14ALT, #2ALT */
if (remote && !df_conflict_head && head_match && !remote_match) {
if (index && !same(index, remote) && !same(index, head))
return o->gently ? -1 : reject_merge(index, o);
return merged_entry(remote, index, o);
}
but I do not think we have to worry, because we know that the index will
never match remote, either (and merged_entry has already been taught to
be wary of the conflicted bit, anyway). I'm not entirely clear on how
that would get triggered if all of the callers avoid operating on a
modified index.
-Peff
^ permalink raw reply
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