* [PATCH] Makefile: honor NO_CURL when setting REMOTE_CURL_* variables
From: Johannes Sixt @ 2010-01-19 15:39 UTC (permalink / raw)
To: Ilari Liusvaara; +Cc: Junio C Hamano, git, Johannes Sixt
Previously, these variables were set before there was a chance to set
NO_CURL.
This made a difference only during 'make install', because by installing
$(REMOTE_CURL_ALIASES), the rule tries to access $(REMOTE_CURL_PRIMARY),
which was never installed. On Windows, this fails; on Unix, stale symbolic
links are created.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
Makefile | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/Makefile b/Makefile
index 8ed07cf..43fd686 100644
--- a/Makefile
+++ b/Makefile
@@ -423,18 +423,8 @@ BUILT_INS += git-show$X
BUILT_INS += git-stage$X
BUILT_INS += git-status$X
BUILT_INS += git-whatchanged$X
-ifdef NO_CURL
-REMOTE_CURL_PRIMARY =
-REMOTE_CURL_ALIASES =
-REMOTE_CURL_NAMES =
-else
-REMOTE_CURL_PRIMARY = git-remote-http$X
-REMOTE_CURL_ALIASES = git-remote-https$X git-remote-ftp$X git-remote-ftps$X
-REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES)
-endif
-
# what 'all' will build and 'install' will install in gitexecdir,
# excluding programs for built-in commands
ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS)
@@ -1108,16 +1098,22 @@ ifdef NO_LIBGEN_H
endif
ifdef NO_CURL
BASIC_CFLAGS += -DNO_CURL
+ REMOTE_CURL_PRIMARY =
+ REMOTE_CURL_ALIASES =
+ REMOTE_CURL_NAMES =
else
ifdef CURLDIR
# Try "-Wl,-rpath=$(CURLDIR)/$(lib)" in such a case.
BASIC_CFLAGS += -I$(CURLDIR)/include
CURL_LIBCURL = -L$(CURLDIR)/$(lib) $(CC_LD_DYNPATH)$(CURLDIR)/$(lib) -lcurl
else
CURL_LIBCURL = -lcurl
endif
+ REMOTE_CURL_PRIMARY = git-remote-http$X
+ REMOTE_CURL_ALIASES = git-remote-https$X git-remote-ftp$X git-remote-ftps$X
+ REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES)
PROGRAMS += $(REMOTE_CURL_NAMES) git-http-fetch$X
curl_check := $(shell (echo 070908; curl-config --vernum) | sort -r | sed -ne 2p)
ifeq "$(curl_check)" "070908"
ifndef NO_EXPAT
--
1.6.6.283.g42b20a
^ permalink raw reply related
* [PATCH] bisect: fix singular/plural grammar nit
From: David Ripton @ 2010-01-19 15:13 UTC (permalink / raw)
To: git, gitster
Remove the trailing 's' from "revisions" and "steps" when there is
only one.
Signed-off-by: David Ripton <dripton@ripton.net>
---
bisect.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/bisect.c b/bisect.c
index f1a1f84..af280b4 100644
--- a/bisect.c
+++ b/bisect.c
@@ -956,7 +956,7 @@ int bisect_next_all(const char *prefix)
{
struct rev_info revs;
struct commit_list *tried;
- int reaches = 0, all = 0, nr;
+ int reaches = 0, all = 0, nr, steps;
const unsigned char *bisect_rev;
char bisect_rev_hex[41];
@@ -998,8 +998,10 @@ int bisect_next_all(const char *prefix)
}
nr = all - reaches - 1;
- printf("Bisecting: %d revisions left to test after this "
- "(roughly %d steps)\n", nr, estimate_bisect_steps(all));
+ steps = estimate_bisect_steps(all);
+ printf("Bisecting: %d revision%s left to test after this "
+ "(roughly %d step%s)\n", nr, (nr == 1 ? "" : "s"),
+ steps, (steps == 1 ? "" : "s"));
return bisect_checkout(bisect_rev_hex);
}
--
David Ripton dripton@ripton.net
^ permalink raw reply related
* Re: [PATCH v3] Threaded grep
From: Linus Torvalds @ 2010-01-19 15:41 UTC (permalink / raw)
To: Fredrik Kuivinen; +Cc: git, Junio C Hamano
In-Reply-To: <20100119073454.GA15575@fredrik-laptop>
On Tue, 19 Jan 2010, Fredrik Kuivinen wrote:
> >
> > - git grep --no-ext-grep function
> >
> > real 0m0.241s
> > user 0m1.436s
> > sys 0m0.216s
>
> I haven't seen this overhead during my tests. But I'm _guessing_ that
> the problem is that the mutex grep_lock is held while the result is
> written to stdout. So when we are writing, no significant amount of
> work can be done by any thread. Here is a patch to fix this (applies
> on to of v3).
No, I get basically the same timings with this patch:
real 0m0.239s
user 0m1.372s
sys 0m0.280s
(that _may_ be a slight real improvement, but it's more likely that the
changing in user/sys time is just noise).
But I do think that you're right that there's a difference in my timings,
and I am comparing to the one that uses strstr(). Your patches didn't have
a "disable threads" option that I could see, so I just compared against my
old numbers.
So I guess a better example is to use a "complex" grep pattern like
'function.*a' which also gets a lot of hits, and the threaded case does
look much better in comparison. Pre-threaded:
real 0m0.921s
user 0m0.728s
sys 0m0.184s
so it's less than 2x the CPU time, and a 3.85x real-time improvement. And
that "less than 2x the CPU time" is the factor I'd expect from HT.
It's also worth noting that at least _some_ versions of glibc would
actually use different versions of subroutines for the threaded vs
non-threaded case, ie they'd avoid locking overhead when they know they
aren't running with threads. So things like stdio actually got slower when
you did any pthreads things, because suddenly glibc knew that it needed to
do locking around the functions.
Linus
^ permalink raw reply
* undo delete of remote-tracking branch
From: Leonardo Boiko @ 2010-01-19 15:40 UTC (permalink / raw)
To: git
Hi,
I'm a complete idiot and just typed this:
git branch -d -r origin/master
Is there a way to undo my act of idiocy?
--
Leonardo Boiko
^ permalink raw reply
* Re: [RFC/PATCHv8 00/10] git notes
From: Alex Riesen @ 2010-01-19 15:54 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Nanako Shiraishi, Johan Herland, git, spearce
In-Reply-To: <7vk4xl1nkl.fsf@alter.siamese.dyndns.org>
On Fri, Nov 20, 2009 at 11:46, Junio C Hamano <gitster@pobox.com> wrote:
> @@ -716,7 +719,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
> if (!strcmp(arg, "-"))
> arg = "@{-1}";
>
> - if (get_sha1(arg, rev)) {
> + if (get_sha1_mb(arg, rev)) {
> if (has_dash_dash) /* case (1) */
> die("invalid reference: %s", arg);
> if (!patch_mode &&
This is a bit of a problem on Windows, as the arg (eventually containing
something like "master..."), will be passed to resolve_ref below. Now, Windows,
being the piece of shit it is, will lie and tell that a file
"refs/heads/master..."
exists and be same as "refs/heads/master". This breaks "checkout to merge
base" on Windows and t2012 in particular.
BTW, why should the arg be run through resolve_ref at all if
get_sha1(_mb) has succeeded?
Isn't the commit already resolved by lookup_commit_reference_gently?
^ permalink raw reply
* Re: undo delete of remote-tracking branch
From: Shawn O. Pearce @ 2010-01-19 15:59 UTC (permalink / raw)
To: Leonardo Boiko; +Cc: git
In-Reply-To: <87bpgqnlws.wl%leoboiko@ime.usp.br>
Leonardo Boiko <leoboiko@ime.usp.br> wrote:
> I'm a complete idiot and just typed this:
>
> git branch -d -r origin/master
>
> Is there a way to undo my act of idiocy?
git fetch origin
Which will create it again during the fetch cycle. Unfortunately
the reflog for origin/master is gone, so you won't get results for
origin/master@{4.days.ago}.
--
Shawn.
^ permalink raw reply
* Re: undo delete of remote-tracking branch
From: Leonardo Boiko @ 2010-01-19 16:08 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: git
In-Reply-To: <20100119155911.GC23466@spearce.org>
At Tue, 19 Jan 2010 07:59:11 -0800, Shawn O. Pearce wrote:
> git fetch origin
Thanks much, that solved the problem. Will try to educate myself
better on remote-tracking branches.
^ permalink raw reply
* Re: How to resolve conflict: Moved away vs. created new file with same name
From: Johannes Schneider @ 2010-01-19 16:46 UTC (permalink / raw)
To: Git Mailing List
In-Reply-To: <4B55C7E0.7030604@viscovery.net>
On 01/19/2010 03:55 PM, Johannes Sixt wrote:
> Please keep the discussion on the list. I'm not your personal support dude.
Sorry, unintentional. TB3 has a menu entry called "reply to list" that
obviously does not what I expected from...
>
> Johannes Schneider schrieb:
>> On 01/19/2010 12:55 PM, Johannes Sixt wrote:
>>>> So I am trying to mimic the change in TopicA:
>>>>
>>>> cd client
>>>> mkdir client3
>>>> mv pom.xml client3
>>>> mv src client3
>>>> ...commit...
>>>
>>> Did you do this during the merge? If not, go back to TopicA and redo it;
>>> then you avoid the conflict during the merge.
>>
>> Yes, I have done this in TopicA *before* the merge. I knew that there
>> will be conflicting directories and tried to clean that up before.
>>
>>> During the merge without the fixup suggested above:
>>>
>>> git rm -f client/client3/pom.xml
>>> git checkout TopicA -- client/pom.xml
>>> git mv client/pom.xml client/client3/pom.xml
>>> git checkout TopicB -- client/pom.xml
>>>
>>> but it leaves you with an ugly history, and it would be far better to fix
>>> up TopicA before the merge.
>>
>> Yep. I prefer a clean history ;-). So do you know how to solve that
>> issue with a cleaned up TopicA branch?
>
> I don't see an issue if you have cleaned up TopicA. Where is it? Did you
> really do what you said you did?
>
> -- Hannes
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: Feature idea: Ignore content
From: Jacob Helwig @ 2010-01-19 16:57 UTC (permalink / raw)
To: Ramkumar Ramachandra; +Cc: git
In-Reply-To: <f3271551001190529h389ce321k52dcca6b03e4e8f0@mail.gmail.com>
On Tue, Jan 19, 2010 at 05:29, Ramkumar Ramachandra <artagnon@gmail.com> wrote:
> Hi,
>
> Often, I find that I need to track a file which contains a small
> portion I don't want to track (read: line with a password). Instead of
> moving that out to a separate file and ignoring that file, is it a
> good idea to add a feature to Git to allow ignoring content instead of
> whole files? Since Git by nature tracks content, this shouldn't be too
> hard to implement, right?
>
Generally, the way I've seen this handled is by tracking an example
file, and ignoring the "real" file with the password.
Something like:
config/database.example.yml <-- Tracked file, with a dummy password
& connection info.
config/database.yml <-- Ignored file, actually used by application.
^ permalink raw reply
* Re: [PATCH] Makefile: honor NO_CURL when setting REMOTE_CURL_* variables
From: Ilari Liusvaara @ 2010-01-19 16:58 UTC (permalink / raw)
To: Johannes Sixt; +Cc: Junio C Hamano, git
In-Reply-To: <1263915552-32537-1-git-send-email-j6t@kdbg.org>
On Tue, Jan 19, 2010 at 04:39:12PM +0100, Johannes Sixt wrote:
> Previously, these variables were set before there was a chance to set
> NO_CURL.
>
> This made a difference only during 'make install', because by installing
> $(REMOTE_CURL_ALIASES), the rule tries to access $(REMOTE_CURL_PRIMARY),
> which was never installed. On Windows, this fails; on Unix, stale symbolic
> links are created.
<snip patch>
I didn't even compile-test it, but based on quick look I don't see any
obivous mistakes. There are no references to REMOTE_CURL_* in section
moved over, and the variable values should not differ unless section skipped
sets NO_CURL. So:
Acked-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
-Ilari
^ permalink raw reply
* Re: [PATCH v2 0/4] Documentation style fixes
From: Thomas Rast @ 2010-01-19 17:29 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Jonathan Nieder
In-Reply-To: <7vpr58w6qn.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> I think we have given people enough time to comment, so I am going to
> merge 0b444cd (Documentation: spell 'git cmd' without dash throughout,
> 2010-01-10) which was taken from the tip of your for-next branch and that
> has been in 'pu' for the last week.
Ok, thanks.
Jonathan, do you plan on rerolling your 6-patch series with Pasky's
and my comments? Otherwise I might give it a stab, since I like the
series and it would be a shame to just forget about it.
--
Thomas Rast
trast@{inf,student}.ethz.ch
^ permalink raw reply
* Re: Unmodified submodules shows up as dirty with 1.6.6.443.gd7346
From: Junio C Hamano @ 2010-01-19 17:29 UTC (permalink / raw)
To: Johannes Sixt; +Cc: Jacob Helwig, Gustaf Hendeby, git, Jens.Lehmann
In-Reply-To: <4B555BA1.90605@viscovery.net>
Johannes Sixt <j.sixt@viscovery.net> writes:
> Jacob Helwig schrieb:
>> If there is no output from git status in the submodule, then git
>> status in the superproject shows the submodule as being clean.
>> However, if there is _any_ output from git status (untracked files,
>> modified files, deleted files, new files), then the superproject shows
>> the submodule as being dirty.
>
> But isn't it a bug that a submodule is considered dirty just because an
> untracked file appears?
My take while commenting on this series has been that we have been buggy
not to show submodule dirty when the end user may have files he forgot to
add, just like "git status" reminds them at the end.
^ permalink raw reply
* Re: [PATCH v2 0/4] Documentation style fixes
From: Jonathan Nieder @ 2010-01-19 17:39 UTC (permalink / raw)
To: Thomas Rast; +Cc: Junio C Hamano, git
In-Reply-To: <201001191829.19284.trast@student.ethz.ch>
Thomas Rast wrote:
> Jonathan, do you plan on rerolling your 6-patch series with Pasky's
> and my comments?
Yes, I was planning to get to it today; sorry for the lack of noise.
Jonathan
^ permalink raw reply
* Re: [PATCH v2] rev-parse --namespace
From: Thomas Rast @ 2010-01-19 17:39 UTC (permalink / raw)
To: Ilari Liusvaara; +Cc: git
In-Reply-To: <1263798952-27624-1-git-send-email-ilari.liusvaara@elisanet.fi>
Ilari Liusvaara wrote:
> Add --namespace=<namespace> option to rev-parse and everything that
> accepts its options. This option matches all refs in some subnamespace
> of refs hierarchy.
>
> Example:
>
> 'git log --branches --not --namespace=remotes/origin'
>
> To show what you have that origin doesn't.
Sorry for being so late to this discussion, but... wouldn't it be
nicer to give it some globbing powers and the same semantics as
'fetch' lines? That way spelling "all master branches of my remotes"
and other such things would be easy.
--
Thomas Rast
trast@{inf,student}.ethz.ch
^ permalink raw reply
* Re: [PATCH v2] Performance optimization for detection of modified submodules
From: Junio C Hamano @ 2010-01-19 18:09 UTC (permalink / raw)
To: Jens Lehmann; +Cc: Git Mailing List
In-Reply-To: <4B556ED2.7020904@web.de>
Jens Lehmann <Jens.Lehmann@web.de> writes:
> I am working on a subsequent patch where dirty_submodule is used as a
> bitfield to store more detailed information about the dirtiness. That is
> then used by "git diff --submodule" to tell the user if the submodule
> contains untracked and/or modified files.
>
> But i can revert that part if you want.
"Will be used as bitfield in later patches" is a justification that was
missing; with that I think the patch is Ok as-is.
>> Mental note to myself. prefix[0] is either '-' (removed from the work
>> tree) or '+' (added to the work tree). Added submodule could be
>> immediately dirty.
>
> Should i add a comment there?
Meh, that was just me thinking aloud.
Thanks.
^ permalink raw reply
* Re: [RFC/PATCHv8 00/10] git notes
From: Junio C Hamano @ 2010-01-19 18:10 UTC (permalink / raw)
To: Alex Riesen; +Cc: Nanako Shiraishi, Johan Herland, git, spearce
In-Reply-To: <81b0412b1001190754m37ed01b0nd93b318d77d88a75@mail.gmail.com>
Alex Riesen <raa.lkml@gmail.com> writes:
> On Fri, Nov 20, 2009 at 11:46, Junio C Hamano <gitster@pobox.com> wrote:
>> @@ -716,7 +719,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
>> if (!strcmp(arg, "-"))
>> arg = "@{-1}";
>>
>> - if (get_sha1(arg, rev)) {
>> + if (get_sha1_mb(arg, rev)) {
>> if (has_dash_dash) /* case (1) */
>> die("invalid reference: %s", arg);
>> if (!patch_mode &&
>
> This is a bit of a problem on Windows, as the arg (eventually containing
> something like "master..."), will be passed to resolve_ref below.
I don't see "resolve_ref below"; do you mean this part?
/* we can't end up being in (2) anymore, eat the argument */
argv++;
argc--;
new.name = arg;
if ((new.commit = lookup_commit_reference_gently(rev, 1))) {
setup_branch_path(&new);
if (resolve_ref(new.path, rev, 1, NULL))
new.commit = lookup_commit_reference(rev);
else
new.path = NULL;
parse_commit(new.commit);
source_tree = new.commit->tree;
} else
source_tree = parse_tree_indirect(rev);
It is primarily to tell "git checkout master" and "git checkout master^0"
apart (the latter must detach HEAD). IOW, it is testing if you gave the
"name" of the branch, or something that yields the commit object name that
happens to be at the tip of the branch. So the call to resolve_ref() is
very relevant.
> Now, Windows,
> being the piece of shit it is, will lie and tell that a file
> "refs/heads/master..."
> exists and be same as "refs/heads/master".
Meh; then windows users cannot use "git checkout A..." syntax (they can
still use "git checkout A...HEAD", I presume).
This is not a problem specific to three-dots, but if you give the function
"refs/heads/master.." it would also get "exists" back, no? You could
teach resolve_ref() about windows (namely, the filesystem may lie about
anything that ends with a series of dots).
> This breaks "checkout to merge base" on Windows and t2012 in particular.
> BTW, why should the arg be run through resolve_ref at all if
> get_sha1(_mb) has succeeded?
> Isn't the commit already resolved by lookup_commit_reference_gently?
l-c-r-g makes sure rev (that is raw object name SHA-1) points at a commit
and doesn't have anything to do with the name.
^ permalink raw reply
* Re: [PATCH v2 06/14] mingw: use real pid
From: Johannes Sixt @ 2010-01-19 18:19 UTC (permalink / raw)
To: kusmabite; +Cc: msysgit, git
In-Reply-To: <40aa078e1001181433v3c86f147wf3e6aace4501c1a8@mail.gmail.com>
On Montag, 18. Januar 2010, Erik Faye-Lund wrote:
> On Sat, Jan 16, 2010 at 10:12 AM, Erik Faye-Lund wrote:
> > On Sat, Jan 16, 2010 at 9:03 AM, Johannes Sixt <j6t@kdbg.org> wrote:
> >> On Freitag, 15. Januar 2010, Erik Faye-Lund wrote:
> >>> No. If I do, the pid becomes invalid after the process is finished,
> >>> and waitpid won't work. I couldn't find anywhere were we actually were
> >>> closing the handle, even after it was finished. So I don't think we
> >>> leak any more than we already did (for non-daemon purposes).
> >>
> >> Previously, this handle was closed by _cwait() (it was the "pid"), so we
> >> didn't leak it.
> >
> > Oh, I see. My planned route with this (before I looked for where the
> > handle was closed), was to maintain some sort of list of each started
> > PID and their handle, and lookup in that list instead of using
> > OpenProcess. I guess that would solve the problem here, but it feels a
> > bit nasty. Not as nasty as introducing a leak, though.
>
> What I had in mind was something along these lines:
Given that that the process ID is the user-visible (and system-wide unique)
identifier of a process, this looks like the only reasonable way to go. Your
implementation looks good as well.
> + /* store process handle */
/*
* The process ID is the human-readable identifier of the process
* that we want to present in log and error messages. The handle
* is not useful for this purpose. But we cannot close it, either,
* because it is not possible to turn a process ID into a process
* handle after the process terminated.
* Keep the handle in a list for waitpid.
*/
> + num_pinfo++;
> + pinfo = xrealloc(pinfo, sizeof(struct pid_info) * num_pinfo);
> + pinfo[num_pinfo - 1].pid = pi.dwProcessId;
> + pinfo[num_pinfo - 1].proc = pi.hProcess;
> +
> return (pid_t)pi.dwProcessId;
-- Hannes
^ permalink raw reply
* Re: [PATCH v2] rev-parse --namespace
From: Ilari Liusvaara @ 2010-01-19 18:37 UTC (permalink / raw)
To: Thomas Rast; +Cc: git
In-Reply-To: <201001191839.27090.trast@student.ethz.ch>
On Tue, Jan 19, 2010 at 06:39:25PM +0100, Thomas Rast wrote:
> Ilari Liusvaara wrote:
>
> Sorry for being so late to this discussion, but... wouldn't it be
> nicer to give it some globbing powers and the same semantics as
> 'fetch' lines? That way spelling "all master branches of my remotes"
> and other such things would be easy.
Unfortunately doesn't seem to be easy to do, as push and fetch have
their own refspec logic. In fact, if matching power would be extended,
probably the easiest extension would be full-blown extended regular
expressions.
-Ilari
^ permalink raw reply
* Re: "warning: Updating the currently checked out branch may cause confusion" on bare repositories
From: Adam Megacz @ 2010-01-19 18:55 UTC (permalink / raw)
To: git
In-Reply-To: <20100119062904.GB23212@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> writes:
> That should already be the case. Did you create the bare repository
> by taking a copy of a non-bare's .git directory? Check your bare
> repository's config file and see if core.bare = false, if so set
> it to true to signal it really is bare.
Hrm, is there a reason why this is explicitly configured rather than
detected?
I was under the impression that you could create a bare repository by
simply throwing away the working tree and renaming ".git" to any other
name, but I guess I was wrong.
- a
^ permalink raw reply
* Re: "warning: Updating the currently checked out branch may cause confusion" on bare repositories
From: Shawn O. Pearce @ 2010-01-19 18:59 UTC (permalink / raw)
To: Adam Megacz; +Cc: git
In-Reply-To: <xuu2my093owy.fsf@nowhere.com>
Adam Megacz <adam@megacz.com> wrote:
> "Shawn O. Pearce" <spearce@spearce.org> writes:
> > That should already be the case. Did you create the bare repository
> > by taking a copy of a non-bare's .git directory? Check your bare
> > repository's config file and see if core.bare = false, if so set
> > it to true to signal it really is bare.
>
> Hrm, is there a reason why this is explicitly configured rather than
> detected?
I don't know why we do this. I think its because the guessing
logic can guess wrong sometimes.
> I was under the impression that you could create a bare repository by
> simply throwing away the working tree and renaming ".git" to any other
> name, but I guess I was wrong.
If you delete the setting from the configuration file, Git usually
almost always guesses correctly. :-)
Its rare to see it fail. But I think it can fail if you create
a file called HEAD in the top level of your source code tree.
(For example.)
--
Shawn.
^ permalink raw reply
* git-status segmentation fault in master / OS X
From: Jonathan del Strother @ 2010-01-19 17:59 UTC (permalink / raw)
To: Git Mailing List
Heya,
I've been running into a segmentation fault on running git status in
my repository while there are staged changes. Bisecting suggests it
was introduced in:
commit 73d66323ac78c750ba42fef23b1cb8fd2110e023
Merge: 054d2fa 8740773
Author: Junio C Hamano <gitster@pobox.com>
Date: Wed Jan 13 11:58:34 2010 -0800
Merge branch 'nd/sparse'
The last commit from nd/sparse (8740773) is fine, so I guess it's a
bad merge...?
Here's the crash I get on 73d6632 :
Process: git [93736]
Path: /Users/jon/bin/git
Identifier: git
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: zsh [26194]
Date/Time: 2010-01-19 17:58:01.306 +0000
OS Version: Mac OS X 10.6.2 (10C540)
Report Version: 6
Interval Since Last Report: 349902 sec
Crashes Since Last Report: 15
Per-App Crashes Since Last Report: 11
Anonymous UUID: 2563166D-332E-42BE-9D2D-0E741A6DB38A
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libSystem.B.dylib 0x00007fff81260a56 fnmatch1 + 442
1 libSystem.B.dylib 0x00007fff8126088a fnmatch + 124
2 git 0x0000000100076cde excluded_from_list + 526
3 git 0x0000000100077877 excluded + 519
4 git 0x0000000100077ab5
read_directory_recursive + 453
5 git 0x0000000100077ff9 read_directory + 249
6 git 0x000000010007812b fill_directory + 219
7 git 0x00000001000b91a7 wt_status_collect + 599
8 git 0x0000000100017380 cmd_status + 288
(builtin-commit.c:1032)
9 git 0x0000000100001d1c
handle_internal_command + 188 (git.c:257)
10 git 0x0000000100001f5c main + 236 (git.c:446)
11 git 0x0000000100001814 start + 52
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000003 rbx: 0x0000000000000000 rcx:
0x00007fff5fbfe260 rdx: 0x0000000000000006
rdi: 0x000000000000002a rsi: 0x00007fff5fbfe480 rbp:
0x00007fff5fbfe1d0 rsp: 0x00007fff5fbfe010
r8: 0x00007fff70276980 r9: 0x0000000100528720 r10:
0x0000000100528ae0 r11: 0x00007fff8120b860
r12: 0x00007fff5fbfe480 r13: 0x0000000000000001 r14:
0x00007fff70276980 r15: 0x00007fff5fbfe260
rip: 0x00007fff81260a56 rfl: 0x0000000000010246 cr2: 0x0000000000000000
Binary Images:
0x100000000 - 0x1000f9fef +git ??? (???)
<FFFFCD11-3352-4216-B27D-2700D1A69326> /Users/jon/bin/git
0x100179000 - 0x10018bfe7 +libz.1.dylib ??? (???)
<F450102F-273C-872E-0729-BD338777CA02> /opt/local/lib/libz.1.dylib
0x10018f000 - 0x10028bff7 +libiconv.2.dylib ??? (???)
<A27D1D71-44A7-76A7-41EB-CC4BAC91E740> /opt/local/lib/libiconv.2.dylib
0x100298000 - 0x1003acfe7 +libcrypto.0.9.8.dylib ???
(???) <D4E1B9E7-BE64-5054-F80A-B63296AFEAD4>
/opt/local/lib/libcrypto.0.9.8.dylib
0x100410000 - 0x10044ffff +libssl.0.9.8.dylib ??? (???)
<4E8F5D81-1DFF-5CBD-361A-C37609B799A8>
/opt/local/lib/libssl.0.9.8.dylib
0x7fff5fc00000 - 0x7fff5fc3bdef dyld 132.1 (???)
<B633F790-4DDB-53CD-7ACF-2A3682BCEA9F> /usr/lib/dyld
0x7fff811d2000 - 0x7fff81390ff7 libSystem.B.dylib ??? (???)
<526DD3E5-2A8B-4512-ED97-01B832369959> /usr/lib/libSystem.B.dylib
0x7fff871c3000 - 0x7fff871c7ff7 libmathCommon.A.dylib ???
(???) <95718673-FEEE-B6ED-B127-BCDBDB60D4E5>
/usr/lib/system/libmathCommon.A.dylib
0x7fffffe00000 - 0x7fffffe01fff libSystem.B.dylib ??? (???)
<526DD3E5-2A8B-4512-ED97-01B832369959> /usr/lib/libSystem.B.dylib
Model: MacPro1,1, BootROM MP11.005C.B08, 4 processors, Dual-Core Intel
Xeon, 2 GHz, 3 GB, SMC 1.7f10
Graphics: ATI Radeon X1900 XT, ATY,RadeonX1900, PCIe, 512 MB
Memory Module: global_name
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x87),
Broadcom BCM43xx 1.0 (5.10.91.26)
Bluetooth: Version 2.2.4f3, 2 service, 1 devices, 1 incoming serial ports
Network Service: Ethernet 1, Ethernet, en0
PCI Card: ATY,RadeonX1900, Display, Slot-1
Serial ATA Device: WDC WD2500KS-00MJB0, 232.89 GB
Serial ATA Device: WDC WD2500JS-41SGB0, 232.89 GB
Parallel ATA Device: SONY DVD RW DW-D150A
USB Device: Hub, 0x05ac (Apple Inc.), 0x9130, 0xfd400000
USB Device: Keyboard Hub, 0x05ac (Apple Inc.), 0x1006, 0xfd410000
USB Device: USB-PS/2 Optical Mouse, 0x046d (Logitech Inc.), 0xc01e, 0xfd411000
USB Device: Apple Keyboard, 0x05ac (Apple Inc.), 0x0221, 0xfd412000
USB Device: C-Media USB Headphone Set, 0x0d8c (C-MEDIA ELECTRONICS
INC.), 0x000c, 0xfd430000
USB Device: Apple Cinema Display, 0x05ac (Apple Inc.), 0x9222, 0xfd420000
USB Device: Hub, 0x05ac (Apple Inc.), 0x9131, 0xfd300000
USB Device: Apple Cinema HD Display, 0x05ac (Apple Inc.), 0x9223, 0xfd320000
USB Device: Bluetooth USB Host Controller, 0x05ac (Apple Inc.),
0x8206, 0x5d200000
FireWire Device: built-in_hub, Up to 800 Mb/sec
FireWire Device: unknown_device, Unknown
Want me to do any more digging?
-Jonathan
^ permalink raw reply
* [PATCH 1/3] cvsimport: modernize callouts to git subcommands
From: Ben Walton @ 2010-01-19 19:03 UTC (permalink / raw)
To: gitster, git; +Cc: Ben Walton
In-Reply-To: <7v8wbwzgnw.fsf@alter.siamese.dyndns.org>
This patch updates all calling conventions for external git tools. to
use the modern calling convention (eg: git foo instead of git-foo).
This is almost entierly a s/git-/git / operation, with deviations only
as required to keep tests passing.
Reported-by: Alexander Maier <amaier@opencsw.org>
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
---
git-cvsimport.perl | 64 ++++++++++++++++++++++++++--------------------------
1 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index a7d215c..adffa0c 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -609,16 +609,16 @@ $orig_git_index = $ENV{GIT_INDEX_FILE} if exists $ENV{GIT_INDEX_FILE};
my %index; # holds filenames of one index per branch
unless (-d $git_dir) {
- system("git-init");
+ system("git init");
die "Cannot init the GIT db at $git_tree: $?\n" if $?;
- system("git-read-tree");
+ system("git read-tree");
die "Cannot init an empty tree: $?\n" if $?;
$last_branch = $opt_o;
$orig_branch = "";
} else {
- open(F, "git-symbolic-ref HEAD |") or
- die "Cannot run git-symbolic-ref: $!\n";
+ open(F, "git symbolic-ref HEAD |") or
+ die "Cannot run git symbolic-ref: $!\n";
chomp ($last_branch = <F>);
$last_branch = basename($last_branch);
close(F);
@@ -627,12 +627,12 @@ unless (-d $git_dir) {
$last_branch = "master";
}
$orig_branch = $last_branch;
- $tip_at_start = `git-rev-parse --verify HEAD`;
+ $tip_at_start = `git rev-parse --verify HEAD`;
# Get the last import timestamps
my $fmt = '($ref, $author) = (%(refname), %(author));';
- open(H, "git-for-each-ref --perl --format='$fmt' $remote |") or
- die "Cannot run git-for-each-ref: $!\n";
+ open(H, "git for-each-ref --perl --format='$fmt' $remote |") or
+ die "Cannot run git for-each-ref: $!\n";
while (defined(my $entry = <H>)) {
my ($ref, $author);
eval($entry) || die "cannot eval refs list: $@";
@@ -687,7 +687,7 @@ unless ($opt_P) {
print $cvspsfh $_;
}
close CVSPS;
- $? == 0 or die "git-cvsimport: fatal: cvsps reported error\n";
+ $? == 0 or die "git cvsimport: fatal: cvsps reported error\n";
close $cvspsfh;
} else {
$cvspsfile = munge_user_filename($opt_P);
@@ -716,27 +716,27 @@ my $state = 0;
sub update_index (\@\@) {
my $old = shift;
my $new = shift;
- open(my $fh, '|-', qw(git-update-index -z --index-info))
- or die "unable to open git-update-index: $!";
+ open(my $fh, '|-', qw(git update-index -z --index-info))
+ or die "unable to open git update-index: $!";
print $fh
(map { "0 0000000000000000000000000000000000000000\t$_\0" }
@$old),
(map { '100' . sprintf('%o', $_->[0]) . " $_->[1]\t$_->[2]\0" }
@$new)
- or die "unable to write to git-update-index: $!";
+ or die "unable to write to git update-index: $!";
close $fh
- or die "unable to write to git-update-index: $!";
- $? and die "git-update-index reported error: $?";
+ or die "unable to write to git update-index: $!";
+ $? and die "git update-index reported error: $?";
}
sub write_tree () {
- open(my $fh, '-|', qw(git-write-tree))
- or die "unable to open git-write-tree: $!";
+ open(my $fh, '-|', "git write-tree")
+ or die "unable to open git write-tree: $!";
chomp(my $tree = <$fh>);
is_sha1($tree)
or die "Cannot get tree id ($tree): $!";
close($fh)
- or die "Error running git-write-tree: $?\n";
+ or die "Error running git write-tree: $?\n";
print "Tree ID $tree\n" if $opt_v;
return $tree;
}
@@ -751,7 +751,7 @@ sub commit {
if ($branch eq $opt_o && !$index{branch} &&
!get_headref("$remote/$branch")) {
# looks like an initial commit
- # use the index primed by git-init
+ # use the index primed by git init
$ENV{GIT_INDEX_FILE} = "$git_dir/index";
$index{$branch} = "$git_dir/index";
} else {
@@ -761,9 +761,9 @@ sub commit {
$index{$branch} = tmpnam();
$ENV{GIT_INDEX_FILE} = $index{$branch};
if ($ancestor) {
- system("git-read-tree", "$remote/$ancestor");
+ system("git", "read-tree", "$remote/$ancestor");
} else {
- system("git-read-tree", "$remote/$branch");
+ system("git", "read-tree", "$remote/$branch");
}
die "read-tree failed: $?\n" if $?;
}
@@ -798,7 +798,7 @@ sub commit {
$ENV{GIT_COMMITTER_EMAIL} = $author_email;
$ENV{GIT_COMMITTER_DATE} = $commit_date;
my $pid = open2(my $commit_read, my $commit_write,
- 'git-commit-tree', $tree, @commit_args);
+ 'git', 'commit-tree', $tree, @commit_args);
# compatibility with git2cvs
substr($logmsg,32767) = "" if length($logmsg) > 32767;
@@ -811,7 +811,7 @@ sub commit {
}
print($commit_write "$logmsg\n") && close($commit_write)
- or die "Error writing to git-commit-tree: $!\n";
+ or die "Error writing to git commit-tree: $!\n";
print "Committed patch $patchset ($branch $commit_date)\n" if $opt_v;
chomp(my $cid = <$commit_read>);
@@ -820,9 +820,9 @@ sub commit {
close($commit_read);
waitpid($pid,0);
- die "Error running git-commit-tree: $?\n" if $?;
+ die "Error running git commit-tree: $?\n" if $?;
- system('git-update-ref', "$remote/$branch", $cid) == 0
+ system('git' , 'update-ref', "$remote/$branch", $cid) == 0
or die "Cannot write branch $branch for update: $!\n";
if ($tag) {
@@ -832,7 +832,7 @@ sub commit {
$xtag =~ s/[\/]/$opt_s/g;
$xtag =~ s/\[//g;
- system('git-tag', '-f', $xtag, $cid) == 0
+ system('git' , 'tag', '-f', $xtag, $cid) == 0
or die "Cannot create tag $xtag: $!\n";
print "Created tag '$xtag' on '$branch'\n" if $opt_v;
@@ -969,7 +969,7 @@ while (<CVS>) {
my $pid = open(my $F, '-|');
die $! unless defined $pid;
if (!$pid) {
- exec("git-hash-object", "-w", $tmpname)
+ exec("git", "hash-object", "-w", $tmpname)
or die "Cannot create object: $!\n";
}
my $sha = <$F>;
@@ -1013,7 +1013,7 @@ unless ($opt_P) {
# The heuristic of repacking every 1024 commits can leave a
# lot of unpacked data. If there is more than 1MB worth of
# not-packed objects, repack once more.
-my $line = `git-count-objects`;
+my $line = `git count-objects`;
if ($line =~ /^(\d+) objects, (\d+) kilobytes$/) {
my ($n_objects, $kb) = ($1, $2);
1024 < $kb
@@ -1038,26 +1038,26 @@ if ($orig_branch) {
if ($opt_i) {
exit 0;
}
- my $tip_at_end = `git-rev-parse --verify HEAD`;
+ my $tip_at_end = `git rev-parse --verify HEAD`;
if ($tip_at_start ne $tip_at_end) {
for ($tip_at_start, $tip_at_end) { chomp; }
print "Fetched into the current branch.\n" if $opt_v;
- system(qw(git-read-tree -u -m),
+ system(qw(git read-tree -u -m),
$tip_at_start, $tip_at_end);
die "Fast-forward update failed: $?\n" if $?;
}
else {
- system(qw(git-merge cvsimport HEAD), "$remote/$opt_o");
+ system(qw(git merge cvsimport HEAD), "$remote/$opt_o");
die "Could not merge $opt_o into the current branch.\n" if $?;
}
} else {
$orig_branch = "master";
print "DONE; creating $orig_branch branch\n" if $opt_v;
- system("git-update-ref", "refs/heads/master", "$remote/$opt_o")
+ system("git", "update-ref", "refs/heads/master", "$remote/$opt_o")
unless defined get_headref('refs/heads/master');
- system("git-symbolic-ref", "$remote/HEAD", "$remote/$opt_o")
+ system("git", "symbolic-ref", "$remote/HEAD", "$remote/$opt_o")
if ($opt_r && $opt_o ne 'HEAD');
- system('git-update-ref', 'HEAD', "$orig_branch");
+ system('git', 'update-ref', 'HEAD', "$orig_branch");
unless ($opt_i) {
system('git checkout -f');
die "checkout failed: $?\n" if $?;
--
1.6.5.3
^ permalink raw reply related
* [PATCH 2/3] cvsimport: standarize open() calls to external git tools
From: Ben Walton @ 2010-01-19 19:03 UTC (permalink / raw)
To: gitster, git; +Cc: Ben Walton
In-Reply-To: <1263927790-1872-1-git-send-email-bwalton@artsci.utoronto.ca>
This patch standardizes calls to open() where git modules are used as
part of a pipeline. Instead of open(X, "git foo ... |)", use open(X,
"-|", qw(git foo ...)). This standarization should see all calls made
without the use of an 'sh -c' process to split the arguments.
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
---
git-cvsimport.perl | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index adffa0c..e838c2e 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -617,7 +617,7 @@ unless (-d $git_dir) {
$last_branch = $opt_o;
$orig_branch = "";
} else {
- open(F, "git symbolic-ref HEAD |") or
+ open(F, "-|", qw(git symbolic-ref HEAD)) or
die "Cannot run git symbolic-ref: $!\n";
chomp ($last_branch = <F>);
$last_branch = basename($last_branch);
@@ -631,8 +631,8 @@ unless (-d $git_dir) {
# Get the last import timestamps
my $fmt = '($ref, $author) = (%(refname), %(author));';
- open(H, "git for-each-ref --perl --format='$fmt' $remote |") or
- die "Cannot run git for-each-ref: $!\n";
+ my @cmd = ('git', 'for-each-ref', '--perl', "--format=$fmt", $remote);
+ open(H, "-|", @cmd) or die "Cannot run git for-each-ref: $!\n";
while (defined(my $entry = <H>)) {
my ($ref, $author);
eval($entry) || die "cannot eval refs list: $@";
@@ -730,7 +730,7 @@ sub update_index (\@\@) {
}
sub write_tree () {
- open(my $fh, '-|', "git write-tree")
+ open(my $fh, '-|', qw(git write-tree))
or die "unable to open git write-tree: $!";
chomp(my $tree = <$fh>);
is_sha1($tree)
--
1.6.5.3
^ permalink raw reply related
* [PATCH 3/3] cvsimport: standarize system() calls to external git tools
From: Ben Walton @ 2010-01-19 19:03 UTC (permalink / raw)
To: gitster, git; +Cc: Ben Walton
In-Reply-To: <1263927790-1872-2-git-send-email-bwalton@artsci.utoronto.ca>
This patch standardizes calls to system() where. Instead of
system("git foo ... "), use system(qw(git foo ...)). This
standarization should see all calls made without the use of an 'sh -c'
process to split the arguments.
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
---
git-cvsimport.perl | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index e838c2e..4853bf7 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -609,9 +609,9 @@ $orig_git_index = $ENV{GIT_INDEX_FILE} if exists $ENV{GIT_INDEX_FILE};
my %index; # holds filenames of one index per branch
unless (-d $git_dir) {
- system("git init");
+ system(qw(git init));
die "Cannot init the GIT db at $git_tree: $?\n" if $?;
- system("git read-tree");
+ system(qw(git read-tree));
die "Cannot init an empty tree: $?\n" if $?;
$last_branch = $opt_o;
@@ -993,7 +993,7 @@ while (<CVS>) {
}
commit();
if (($commitcount & 1023) == 0) {
- system("git repack -a -d");
+ system(qw(git repack -a -d));
}
$state = 1;
} elsif ($state == 11 and /^-+$/) {
@@ -1017,7 +1017,7 @@ my $line = `git count-objects`;
if ($line =~ /^(\d+) objects, (\d+) kilobytes$/) {
my ($n_objects, $kb) = ($1, $2);
1024 < $kb
- and system("git repack -a -d");
+ and system(qw(git repack -a -d));
}
foreach my $git_index (values %index) {
@@ -1059,7 +1059,7 @@ if ($orig_branch) {
if ($opt_r && $opt_o ne 'HEAD');
system('git', 'update-ref', 'HEAD', "$orig_branch");
unless ($opt_i) {
- system('git checkout -f');
+ system(qw(git checkout -f));
die "checkout failed: $?\n" if $?;
}
}
--
1.6.5.3
^ permalink raw reply related
* Re: [PATCH v2 06/14] mingw: use real pid
From: Erik Faye-Lund @ 2010-01-19 19:23 UTC (permalink / raw)
To: Johannes Sixt; +Cc: msysgit, git
In-Reply-To: <201001191919.16070.j6t@kdbg.org>
On Tue, Jan 19, 2010 at 7:19 PM, Johannes Sixt <j6t@kdbg.org> wrote:
> On Montag, 18. Januar 2010, Erik Faye-Lund wrote:
>> On Sat, Jan 16, 2010 at 10:12 AM, Erik Faye-Lund wrote:
>> > On Sat, Jan 16, 2010 at 9:03 AM, Johannes Sixt <j6t@kdbg.org> wrote:
>> >> On Freitag, 15. Januar 2010, Erik Faye-Lund wrote:
>> >>> No. If I do, the pid becomes invalid after the process is finished,
>> >>> and waitpid won't work. I couldn't find anywhere were we actually were
>> >>> closing the handle, even after it was finished. So I don't think we
>> >>> leak any more than we already did (for non-daemon purposes).
>> >>
>> >> Previously, this handle was closed by _cwait() (it was the "pid"), so we
>> >> didn't leak it.
>> >
>> > Oh, I see. My planned route with this (before I looked for where the
>> > handle was closed), was to maintain some sort of list of each started
>> > PID and their handle, and lookup in that list instead of using
>> > OpenProcess. I guess that would solve the problem here, but it feels a
>> > bit nasty. Not as nasty as introducing a leak, though.
>>
>> What I had in mind was something along these lines:
>
> Given that that the process ID is the user-visible (and system-wide unique)
> identifier of a process, this looks like the only reasonable way to go. Your
> implementation looks good as well.
>
>> + /* store process handle */
>
> /*
> * The process ID is the human-readable identifier of the process
> * that we want to present in log and error messages. The handle
> * is not useful for this purpose. But we cannot close it, either,
> * because it is not possible to turn a process ID into a process
> * handle after the process terminated.
> * Keep the handle in a list for waitpid.
> */
>
Much better, thanks.
--
Erik "kusma" Faye-Lund
^ 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