Git development
 help / color / mirror / Atom feed
* Re: Debugging corrupt object generation
From: Julian Phillips @ 2007-11-02  0:26 UTC (permalink / raw)
  To: Nicolas Pitre; +Cc: git
In-Reply-To: <alpine.LFD.0.9999.0711011947220.21255@xanadu.home>

On Thu, 1 Nov 2007, Nicolas Pitre wrote:

> On Thu, 1 Nov 2007, Julian Phillips wrote:
>
>> After a certain commit, and attempt to use that commit generates a "fatal:
>> unable to apply delta".  This appears to be coming from unpack_delta_entry
>> in sha1_file.c.
>
> I suppose you mean "fatal: failed to apply delta", because "unable to
> apply delta" doesn't appear anywhere in the current source tree.

I did indeed.  Read 'n' type never seems to be as reliable as copy 'n' 
paste ...

>> Can anyone give me any hints as to how I find out what is causing the
>> problem?  I'm not even sure what it is that isn't working ... and all
>> attempts to replicate the problem with my test repository have failed.
>
> Well, something is screwed for sure.  Some object you're requesting is
> made of a delta, and that delta is bad, therefore patch_delta() returns
> NULL (you could instrument it to determine exactly why).

Ah, ok - that sounds like it might be useful.  I guess that looking at the 
opposite side where fast-import is creating the data might also prove 
fruitful.

> Maybe fast-import hasn't flushed the needed data to the pack yet?

Well, fast-import completes quite happily and outputs the normal summary 
status.  I can look at logs and trees etc provided that I don't try and 
look at one particular part of the tree on one particular commit.  I 
think the problem is that I've managed to do something inside fast-import 
that corrupts one particular tree object (though I've no idea what that 
might be).

I shall have to start instrumenting and try again.

Thanks.

-- 
Julian

  ---
Many changes of mind and mood; do not hesitate too long.

^ permalink raw reply

* Re: [PATCH 0/3] gitweb: Simplify some gitweb URLs generation
From: Jakub Narebski @ 2007-11-02  0:18 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7v1wb98twi.fsf@gitster.siamese.dyndns.org>

Junio C Hamano wrote:
> Jakub Narebski <jnareb@gmail.com> writes:
> 
>> This series of patches simplifies some gitweb URLs generation by
>> providing -replay option to href() subroutine, and then using this
>> feature in gitweb code.
>>
>> Shortlog:
>>  gitweb: Easier adding/changing parameters to current URL
>>  gitweb: Use href(-replay=>1, page=>...) to generate pagination links
>>  gitweb: Use href(-replay=>1, action=>...) to generate alternate views
>>
>> Diffstat:
>>  gitweb/gitweb.perl |   82 ++++++++++++++++++++++-----------------------------
>>  1 files changed, 35 insertions(+), 47 deletions(-)
> 
> If this "-replay" is used carelessly, it could add parameters
> that were passed to the page that the original code stripped
> away from passing on purpose.  Have you checked if the
> conversion done with 2/3 and 3/3 are correct (I haven't)?

First, I guess that I should have marked this series of patches as
an RFC, but not for the reason you mentioned. This series changes
somewhat gitweb behaviour (patches 2/3 and 3/3 to be more exact) in
a way that before gitweb passed 'expanded' hashes to page / alternate
view links. For example before this series link to second page for
shortlog view starting from 'HEAD' passed literal sha1 for 'h' parameter,
ans second page started where first page ended. After this patch, if
refs have changed between viewing first page and clicking on the link
to second page, the resulting view would be second page of _new_ 'HEAD',
not of old (shown) 'HEAD'.

Second, you do not need to worry about adding parameters, because in 2/3
and 3/3 -replay is used to change view to the one which differs from
current by one parameter. Please take into account that some parameters
are just not important.

-- 
Jakub Narebski
Poland

^ permalink raw reply

* Re: What's cooking in git.git (topics)
From: Jakub Narebski @ 2007-11-02  0:04 UTC (permalink / raw)
  To: git
In-Reply-To: <alpine.LFD.0.999.0711011129460.3342@woody.linux-foundation.org>

Linus Torvalds wrote:

> On Wed, 31 Oct 2007, Junio C Hamano wrote:
>> 
>> * ph/parseopt (Tue Oct 30 14:15:21 2007 -0500) 23 commits
>>  + ...
>> 
>> It appears 1.5.4 will be, to a certain extent, a "Let's clean up
>> the internal implementation" release.  This series should become
>> part of it.  Hopefully will merge to 'master' soon, but I
>> haven't looked this series very closely yet.
> 
> I certainly think this should go in, but it does make one deficiency 
> painfully clear: the remaining shell scripts end up having all the old 
> flags behaviour.

Is 'getopts' bash-ism, or is it in POSIX?

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

^ permalink raw reply

* Re: What's cooking in git.git (topics)
From: Jonas Fonseca @ 2007-11-02  0:00 UTC (permalink / raw)
  To: Geert Bosch; +Cc: Junio C Hamano, Linus Torvalds, git
In-Reply-To: <DB2DC59C-8580-4AFE-860F-6E7C4A47499E@adacore.com>

On Nov 1, 2007 10:17 PM, Geert Bosch <bosch@adacore.com> wrote:
> On Nov 1, 2007, at 16:27, Junio C Hamano wrote:
> > I think what you are trying to do is to deprecate or remove "git
> > clean".
>
> Yes, and in the meantime I'd like to discourage people
> from spending time and effort to upgrade it to first
> class built-in status.

If you search the archive you will find that a builtin-clean.c has already
been offered.

-- 
Jonas Fonseca

^ permalink raw reply

* Re: Debugging corrupt object generation
From: Nicolas Pitre @ 2007-11-01 23:57 UTC (permalink / raw)
  To: Julian Phillips; +Cc: git
In-Reply-To: <Pine.LNX.4.64.0711012256080.17812@beast.quantumfyre.co.uk>

On Thu, 1 Nov 2007, Julian Phillips wrote:

> I have been trying to import a repository using fast-import, and as part of
> this I have extended fast-import to support copying a path from any arbitrary
> commit.  This works fine on my small test repository.
> 
> However, when I run against my (vastly more complicated) real work repository
> things don't go so well.  I get a few thousand commits in, and then it breaks.
> It appears that I have somehow managed to create a corrupt object or
> something.
> 
> After a certain commit, and attempt to use that commit generates a "fatal:
> unable to apply delta".  This appears to be coming from unpack_delta_entry
> in sha1_file.c.

I suppose you mean "fatal: failed to apply delta", because "unable to 
apply delta" doesn't appear anywhere in the current source tree.

> Can anyone give me any hints as to how I find out what is causing the
> problem?  I'm not even sure what it is that isn't working ... and all
> attempts to replicate the problem with my test repository have failed.

Well, something is screwed for sure.  Some object you're requesting is 
made of a delta, and that delta is bad, therefore patch_delta() returns 
NULL (you could instrument it to determine exactly why).

Maybe fast-import hasn't flushed the needed data to the pack yet?


Nicolas

^ permalink raw reply

* Re: [PATCH] Implement git commit as a builtin command.
From: Junio C Hamano @ 2007-11-01 23:51 UTC (permalink / raw)
  To: Kristian Høgsberg; +Cc: git
In-Reply-To: <1193944163-22892-1-git-send-email-krh@redhat.com>

Kristian Høgsberg <krh@redhat.com> writes:

> @@ -364,7 +365,6 @@ BUILTIN_OBJS = \
>  	builtin-rev-parse.o \
>  	builtin-revert.o \
>  	builtin-rm.o \
> -	builtin-runstatus.o \
>  	builtin-shortlog.o \
>  	builtin-show-branch.o \
>  	builtin-stripspace.o \

I did not read in the commit log that runstatus is gone...

> diff --git a/builtin-commit.c b/builtin-commit.c
> new file mode 100644
> index 0000000..56c7427
> --- /dev/null
> +++ b/builtin-commit.c
> @@ -0,0 +1,608 @@
> +/*
> + * Builtin "git commit"
> + *
> + * Copyright (c) 2007 Kristian Høgsberg <krh@redhat.com>
> + * Based on git-commit.sh by Junio C Hamano and Linus Torvalds
> + */
> +
> +#include <sys/types.h>
> +#include <sys/stat.h>
> +#include <unistd.h>
> +
> +#include "cache.h"


The system header files on some systems have a nasty habit of
changing the behaviour depending on the order they are included.
Since 85023577a8f4b540aa64aa37f6f44578c0c305a3 (simplify
inclusion of system header files) in late 2006, we have a few
rules for system-header inclusion to avoid the portability
issues:

 (1) sources under compat/, platform sha-1 implementations, and
     xdelta code are exempt from the following rules;

 (2) the first #include must be "git-compat-util.h" or one of
     our own header file that includes it first (e.g. config.h,
     builtin.h, pkt-line.h);

 (3) system headers that are included in "git-compat-util.h"
     need not be included in individual C source files.

 (4) "git-compat-util.h" does not have to include subsystem
     specific header files (e.g. expat.h).

> +static void determine_author_info(struct strbuf *sb)
> +{
> +	char *p, *eol;
> +	char *name = NULL, *email = NULL;
> +
> +	if (use_message) {
> +		p = strstr(use_message_buffer, "\nauthor");
> +		if (!p)
> +			die("invalid commit: %s\n", use_message);
> +		p++;
> +		eol = strchr(p, '\n');
> +		if (!eol)
> +			die("invalid commit: %s\n", use_message);
> +
> +		strbuf_add(sb, p, eol + 1 - p);
> +	} else if (force_author) {
> +		const char *eoname = strstr(force_author, " <");
> +		const char *eomail = strchr(force_author, '>');

Doesn't this break:

    $ git commit --amend --author='A U Thor <author@example.com>'

to fix a misattribution?

> +static int parse_and_validate_options(int argc, const char *argv[])
> +{
> ...
> +	if (use_message) {
> +		unsigned char sha1[20];
> +		static char utf8[] = "UTF-8";
> +		const char *out_enc;
> +		char *enc, *end;
> +		struct commit *commit;
> +
> +		if (get_sha1(use_message, sha1))
> +			die("could not lookup commit %s", use_message);
> +		commit = lookup_commit(sha1);
> +		if (!commit || parse_commit(commit))
> +			die("could not parse commit %s", use_message);
> +
> +		enc = strstr(commit->buffer, "\nencoding");
> +		if (enc) {
> +			end = strchr(enc + 10, '\n');
> +			enc = xstrndup(enc + 10, end - (enc + 10));
> +		} else {
> +			enc = utf8;
> +		}
> +		out_enc = git_commit_encoding ? git_commit_encoding : utf8;
> +
> +		use_message_buffer =
> +			reencode_string(commit->buffer, out_enc, enc);
> +		if (enc != utf8)
> +			free(enc);

A few issues.

 * When use_message is set because of --amend that wanted to
   amend a commit message that was recorded in a corrupt
   encoding, and iconv() in reencode_string() fails, saying "I
   cannot convert that completely", most of the message can
   still be salvageable.  This part should allow looser
   reencoding if the message will be eyeballed and edited by the
   user.

 * We would want to avoid reencoding when !strcmp(out_enc, enc).
   Both builtin-mailinfo.c and commit.c skip the call to the
   function at the calling site, but it might make sense to
   teach reencode_string() about such an optimization.

^ permalink raw reply

* Re: [PATCH 1/2] gitweb: Always set 'from_file' and 'to_file' in parse_difftree_raw_line
From: Jakub Narebski @ 2007-11-01 23:46 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7v7il18twn.fsf@gitster.siamese.dyndns.org>

Junio C Hamano wrote:
> Jakub Narebski <jnareb@gmail.com> writes:
> 
>> Always set 'from_file' and 'to_file' keys when parsing raw diff output
>> format line, even if filename didn't change (file was not renamed).
>> This allows for simpler code (and no problems with file named '0').
>>
>> Use
>>   $diffinfo->{'from_file'}
>> instead of
>>   $diffinfo->{'from_file'} || $diffinfo->{'file'}
>> from now on.
> 
> Isn't this description the other way around?

Description is in good direction, although I agree that it is
a bit awkward. Perhaps it should read:

Instead of
  $diffinfo->{'from_file'} || $diffinfo->{'file'}
it is now enough to use
  $diffinfo->{'from_file'}

(because $diffinfo->{'from_file'} is now _always_ set, not only for
renames and copies, when from_name and to_name differ).

-- 
Jakub Narebski
Poland

^ permalink raw reply

* Re: [PATCH] gitweb: Remove CGI::Carp::set_programname() call from t9500 gitweb test
From: Jakub Narebski @ 2007-11-01 23:36 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vve8l8va0.fsf@gitster.siamese.dyndns.org>

Junio C Hamano wrote:
> Jakub Narebski <jnareb@gmail.com> writes:
> 
>> It does appear to do nothing; gitweb is run as standalone program
>> and not as CGI script in this test.  This call caused problems later.
> 
> Care to describe "later problems" a bit more?

Sorry about that. The problems were while creating yet-to-be send
patch
  "gitweb: Add tests for overriding gitweb config with repo config"
Perhaps not in the current version. I forgot details.

Perhaps last sentence "This call caused problems later." should be
simply removed from commit message.

-- 
Jakub Narebski
Poland

^ permalink raw reply

* [PATCH] Make git-mailsplit strip whitespace from the start of the mailbox file.
From: Simon Sasburg @ 2007-11-01 22:57 UTC (permalink / raw)
  To: gitster; +Cc: git, Simon Sasburg
In-Reply-To: <7vr6j98uw5.fsf@gitster.siamese.dyndns.org>

Signed-off-by: Simon Sasburg <Simon.Sasburg@gmail.com>
---

Ah, i see.

Well, this patch also fixes the problem in my case.

 builtin-mailsplit.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/builtin-mailsplit.c b/builtin-mailsplit.c
index 43fc373..3fdeb23 100644
--- a/builtin-mailsplit.c
+++ b/builtin-mailsplit.c
@@ -164,6 +164,7 @@ static int split_mbox(const char *file, const char *dir, int allow_bare,
 {
 	char name[PATH_MAX];
 	int ret = -1;
+	int peek;
 
 	FILE *f = !strcmp(file, "-") ? stdin : fopen(file, "r");
 	int file_done = 0;
@@ -173,6 +174,11 @@ static int split_mbox(const char *file, const char *dir, int allow_bare,
 		goto out;
 	}
 
+	do {
+		peek = fgetc(f);
+	} while (peek == ' ' || peek == '\r' || peek == '\n');
+	ungetc(peek, f);
+
 	if (fgets(buf, sizeof(buf), f) == NULL) {
 		/* empty stdin is OK */
 		if (f != stdin) {
-- 
1.5.3.4.504.gdf75-dirty

^ permalink raw reply related

* Debugging corrupt object generation
From: Julian Phillips @ 2007-11-01 22:57 UTC (permalink / raw)
  To: git

I have been trying to import a repository using fast-import, and as part 
of this I have extended fast-import to support copying a path from any 
arbitrary commit.  This works fine on my small test repository.

However, when I run against my (vastly more complicated) real work 
repository things don't go so well.  I get a few thousand commits in, and 
then it breaks.  It appears that I have somehow managed to create a 
corrupt object or something.

After a certain commit, and attempt to use that commit generates a "fatal:
unable to apply delta".  This appears to be coming from unpack_delta_entry
in sha1_file.c.

Can anyone give me any hints as to how I find out what is causing the
problem?  I'm not even sure what it is that isn't working ... and all
attempts to replicate the problem with my test repository have failed.

-- 
Julian

  ---
...the prevailing Catholic odor - incense, wax, centuries of mild bleating
from the lips of the flock.
-- Thomas Pynchon, _Gravity's Rainbow_

^ permalink raw reply

* Re: What's cooking in git.git (topics)
From: Junio C Hamano @ 2007-11-01 22:50 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Johan Herland, git, Geert Bosch
In-Reply-To: <alpine.LFD.0.999.0711011459490.3342@woody.linux-foundation.org>

Linus Torvalds <torvalds@linux-foundation.org> writes:

> But yeah, I guess we could make the "clean.Imagirlyman" option (or however 
> the "please-don't-hurt-me-by-default" option is spelled) the default. That 
> way I'd just feel *extra* manly for immediately disabling it, and laughing 
> at you wimps.

That makes me a girly man, I would guess, as I just suggested
making clean.requireForce default to true in the next (or one
after) version of git ;-).

^ permalink raw reply

* Re: [PATCH 0/3] gitweb: Simplify some gitweb URLs generation
From: Junio C Hamano @ 2007-11-01 22:47 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git
In-Reply-To: <1193918789-16421-1-git-send-email-jnareb@gmail.com>

Jakub Narebski <jnareb@gmail.com> writes:

> This series of patches simplifies some gitweb URLs generation by
> providing -replay option to href() subroutine, and then using this
> feature in gitweb code.
>
> Shortlog:
>  gitweb: Easier adding/changing parameters to current URL
>  gitweb: Use href(-replay=>1, page=>...) to generate pagination links
>  gitweb: Use href(-replay=>1, action=>...) to generate alternate views
>
> Diffstat:
>  gitweb/gitweb.perl |   82 ++++++++++++++++++++++-----------------------------
>  1 files changed, 35 insertions(+), 47 deletions(-)

If this "-replay" is used carelessly, it could add parameters
that were passed to the page that the original code stripped
away from passing on purpose.  Have you checked if the
conversion done with 2/3 and 3/3 are correct (I haven't)?

^ permalink raw reply

* Re: [PATCH 1/2] gitweb: Always set 'from_file' and 'to_file' in parse_difftree_raw_line
From: Junio C Hamano @ 2007-11-01 22:47 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git
In-Reply-To: <1193917089-15920-2-git-send-email-jnareb@gmail.com>

Jakub Narebski <jnareb@gmail.com> writes:

> Always set 'from_file' and 'to_file' keys when parsing raw diff output
> format line, even if filename didn't change (file was not renamed).
> This allows for simpler code (and no problems with file named '0').
>
> Use
>   $diffinfo->{'from_file'}
> instead of
>   $diffinfo->{'from_file'} || $diffinfo->{'file'}
> from now on.

Isn't this description the other way around?

^ permalink raw reply

* Re: [PATCH] Do no colorify test output if stdout is not a terminal
From: Junio C Hamano @ 2007-11-01 22:47 UTC (permalink / raw)
  To: Alex Riesen; +Cc: git
In-Reply-To: <20071101140158.GA14475@steel.home>

Good catch.  Thanks.

^ permalink raw reply

* Re: Importing svn branch
From: LCID Fire @ 2007-11-01 22:39 UTC (permalink / raw)
  To: Sean; +Cc: git
In-Reply-To: <BAYC1-PASMTP1474D8094F6C5F2CCF2B6CAE8C0@CEZ.ICE>

Sean wrote:
> git-svnimport should probably be officially deprecated; you're not the
> first person to struggle with it.  Fortunately there's another option
> provided with Git which will likely give you what you're looking for:
> 
>    git svn clone http://svn.gnome.org/svn/banshee/branches/banshee/stable
Okay, I tried git-svn after I was stuck with svnimport. Although I still
couldn't figure out how to clone a single branch (due to some confusing
complaints) I just cloned the whole repro, which was working fine.
Thanks.

^ permalink raw reply

* Re: [PATCH 1/3] Introduce --dirty option to git-rebase, allowing you to start from a dirty state.
From: Junio C Hamano @ 2007-11-01 22:36 UTC (permalink / raw)
  To: Simon Sasburg; +Cc: gitster, git
In-Reply-To: <7vmytx8upi.fsf@gitster.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> writes:

> Doesn't this have the exact same problem with the one in 'next'
> that uses "git-stash create", which Shawn said he was upset
> about, and I said I will revert?

Sorry, --dirty is not the default, which changes everything.
Forget what I said, sorry for the noise.

^ permalink raw reply

* Re: [PATCH 1/3] Introduce --dirty option to git-rebase, allowing you to start from a dirty state.
From: Junio C Hamano @ 2007-11-01 22:30 UTC (permalink / raw)
  To: Simon Sasburg; +Cc: gitster, git
In-Reply-To: <1193952624-608-2-git-send-email-Simon.Sasburg@gmail.com>

Doesn't this have the exact same problem with the one in 'next'
that uses "git-stash create", which Shawn said he was upset
about, and I said I will revert?

FYI, this is what I wrote in the log for the revert.

commit 0f49327c9755b6575b447f79b540749d231cb26d
Author: Junio C Hamano <gitster@pobox.com>
Date:   Thu Nov 1 13:46:20 2007 -0700

    Revert "rebase: allow starting from a dirty tree."
    
    This reverts commit 6c9ad166dbbf9e5a0c09450b892151dbec49b8dc.
    Allowing rebase to start in a dirty tree might have been a worthy
    goal, but it is not necessarily always wanted (some people prefer
    to be reminded that the state is dirty, and think about the next
    action that may not be to stash and proceed).  Furthermore, depending
    on the nature of local changes, unstashing the dirty state on top of
    the rebased result is not always desirable.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>

^ permalink raw reply

* Re: What's cooking in git.git (topics)
From: Bill Lear @ 2007-11-01 22:26 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Junio C Hamano, Johan Herland, git, Geert Bosch
In-Reply-To: <alpine.LFD.0.999.0711011459490.3342@woody.linux-foundation.org>

On Thursday, November 1, 2007 at 15:05:44 (-0700) Linus Torvalds writes:
>...
>But yeah, I guess we could make the "clean.Imagirlyman" option (or however 
>the "please-don't-hurt-me-by-default" option is spelled) the default. That 
>way I'd just feel *extra* manly for immediately disabling it, and laughing 
>at you wimps.

Precisely my sentiments.


Bill

^ permalink raw reply

* Re: [PATCH] Make git-mailinfo strip whitespace from the start of the mail file.
From: Junio C Hamano @ 2007-11-01 22:26 UTC (permalink / raw)
  To: Simon Sasburg; +Cc: Junio C Hamano, git
In-Reply-To: <981e6de60711011441n5bef772cuda381c539c0a2603@mail.gmail.com>

"Simon Sasburg" <simon.sasburg@gmail.com> writes:

>> Just to help me understand why this change is needed...
>>
>> Are you using mailinfo directly without splitting with mailsplit
>> first?
>
> Well, when using gmail's web interface, when reading a mail, there is
> this option to show the raw mail text (headers+body) with the 'show
> original' option.
>
> If you do 'save as..' in your browser to save what you get with that,
> and try to do git-am on that file, it fails because it starts with
> some whitespace.
>
> With this patch git-am works on these files.
>
> So, i'm not using mailsplit or any other mail tools at all, just my
> browser and git.

Ah, I meant "git-mailsplit", which is the command internally run
by "git-am" to preprocess the file and to split it into
individual mail pieces to be fed to "git-mailinfo".

That may suggest the change is better done in git-mailsplit not
git-mailinfo.

Or perhaps both.

^ permalink raw reply

* Re: [PATCH] gitweb: Remove CGI::Carp::set_programname() call from t9500 gitweb test
From: Junio C Hamano @ 2007-11-01 22:18 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git
In-Reply-To: <1193923396-17341-1-git-send-email-jnareb@gmail.com>

Jakub Narebski <jnareb@gmail.com> writes:

> It does appear to do nothing; gitweb is run as standalone program
> and not as CGI script in this test.  This call caused problems later.

Care to describe "later problems" a bit more?

>
> Signed-off-by: Jakub Narebski <jnareb@gmail.com>
> ---
>  t/t9500-gitweb-standalone-no-errors.sh |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh
> index f7bad5b..1bf0988 100755
> --- a/t/t9500-gitweb-standalone-no-errors.sh
> +++ b/t/t9500-gitweb-standalone-no-errors.sh
> @@ -31,7 +31,6 @@ our \$projects_list = "";
>  our \$export_ok = "";
>  our \$strict_export = "";
>  
> -CGI::Carp::set_programname("gitweb/gitweb.cgi");
>  EOF
>  
>  	cat >.git/description <<EOF
> -- 
> 1.5.3.5

^ permalink raw reply

* Re: What's cooking in git.git (topics)
From: Linus Torvalds @ 2007-11-01 22:05 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Johan Herland, git, Geert Bosch
In-Reply-To: <7v8x5hab3d.fsf@gitster.siamese.dyndns.org>



On Thu, 1 Nov 2007, Junio C Hamano wrote:
> 
> "git clean" is about things that git usually do not care about
> (i.e. things not in .gitignore, or even in .gitignore when -x is
> given).  Everything else including "git stash" is all about what
> git cares about (i.e. tracked paths).

Right. I *love* "git clean". Real men have everything they care about 
tracked by git, and thus by definition "git clean" is the safest operation 
possible. I don't understand how anybody can call it "unsafe".

I just wish it was quiet by default - right now it takes a _loong_ time to 
clean out your crud just because it scrolls forever talking about all 
those girly files you don't want to keep - and that it had -x and -d on by 
default, so that us *real* men wouldn't have to type so much.

But making it accept combined options, so that you can do "git clean -xdq" 
would certainly already be a huge improvement.

But yeah, I guess we could make the "clean.Imagirlyman" option (or however 
the "please-don't-hurt-me-by-default" option is spelled) the default. That 
way I'd just feel *extra* manly for immediately disabling it, and laughing 
at you wimps.

			Linus

^ permalink raw reply

* Re: What's cooking in git.git (topics)
From: Pierre Habouzit @ 2007-11-01 21:57 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Junio C Hamano, git
In-Reply-To: <alpine.LFD.0.999.0711011129460.3342@woody.linux-foundation.org>

[-- Attachment #1: Type: text/plain, Size: 1364 bytes --]

On Thu, Nov 01, 2007 at 06:33:13PM +0000, Linus Torvalds wrote:
> 
> 
> On Wed, 31 Oct 2007, Junio C Hamano wrote:
> > 
> > * ph/parseopt (Tue Oct 30 14:15:21 2007 -0500) 23 commits
> >  + ...
> > 
> > It appears 1.5.4 will be, to a certain extent, a "Let's clean up
> > the internal implementation" release.  This series should become
> > part of it.  Hopefully will merge to 'master' soon, but I
> > haven't looked this series very closely yet.
> 
> I certainly think this should go in, but it does make one deficiency 
> painfully clear: the remaining shell scripts end up having all the old 
> flags behaviour.

  Those are not the only commands with issues: not all builtins are
migrated on the new option parser, and those with recursive options (I
mean the ones that use diff options e.g.) are not migrated yet either,
because the option parser does not supports a mechanism to deal with
them.

  The issue is not to let parse_option recurse into anoter option
structure, it's that if you do so, you want to express the address of
the "options" to patch in a relative and not absolute way, and I've not
decided myself mind about a way to do that yet.

-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Re: What's cooking in git.git (topics)
From: Junio C Hamano @ 2007-11-01 21:51 UTC (permalink / raw)
  To: Johan Herland; +Cc: git, Geert Bosch, Linus Torvalds
In-Reply-To: <200711012232.57286.johan@herland.net>

Johan Herland <johan@herland.net> writes:

> What about making "git clean" _stash_ your changes instead of deleting them 
> (so that you can undo the clean)? Preferably they should be stashed 
> somewhere _other_ than where "git stash" does its thing. "git clean" could 
> even delete the stash immediately, but keep the reflog around so that 
> the "clean" at least could be undone within 30 days (or whatever is the 
> current default).
>
> Thoughts?

Unthoughts.  That does not mesh with the way how world works.

"git clean" is about things that git usually do not care about
(i.e. things not in .gitignore, or even in .gitignore when -x is
given).  Everything else including "git stash" is all about what
git cares about (i.e. tracked paths).

^ permalink raw reply

* Re: What's cooking in git.git (topics)
From: Pierre Habouzit @ 2007-11-01 21:46 UTC (permalink / raw)
  To: Brian Downing; +Cc: Junio C Hamano, git
In-Reply-To: <20071101214131.GF4099@lavos.net>

[-- Attachment #1: Type: text/plain, Size: 1304 bytes --]

On Thu, Nov 01, 2007 at 09:41:31PM +0000, Brian Downing wrote:
> On Wed, Oct 31, 2007 at 10:41:06PM -0700, Junio C Hamano wrote:
> > * jc/spht (Tue Oct 2 18:00:27 2007 -0700) 1 commit
> >  - git-diff: complain about >=8 consecutive spaces in initial indent
> > 
> > This is a counterpart of an earlier patch from J. Bruce Fields
> > to change "git-apply --whitespace" to make SP{8,} at the
> > beginning of line a whitespace error.
> > 
> > Personally, I am in favor of the stricter check, but I had to
> > reject the "git-apply" patch because there was no way to disable
> > the additional check without disabling the existing check for
> > trailing whitespaces.  We probably would want to revisit that
> > one (perhaps with a new option and/or config to selectively
> > enable different kinds of whitespace check).

> I don't want to get into another stupid holy war about the superiority
> of indent styles (the last one was quite enough, thank you), but there
> are real projects out there that have a spaces-only-indent policy and
> use Git, and this change as is isn't good for them.

  Seconded.

-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Re: What's cooking in git.git (topics)
From: Pierre Habouzit @ 2007-11-01 21:44 UTC (permalink / raw)
  To: Mike Hommey; +Cc: Junio C Hamano, Geert Bosch, Linus Torvalds, git
In-Reply-To: <20071101204755.GA15842@glandium.org>

[-- Attachment #1: Type: text/plain, Size: 994 bytes --]

On Thu, Nov 01, 2007 at 08:47:55PM +0000, Mike Hommey wrote:
> On Thu, Nov 01, 2007 at 01:27:55PM -0700, Junio C Hamano wrote:
> > Geert Bosch <bosch@adacore.com> writes:
> > 
> > > I often type "make clean" as well many "git xyz" commands
> > > during development, and so it happens that at times, I type
> > > "git clean" by accident.
> > 
> > Happened to me once.  I hate that command.
> 
> Speaking of hateful commands, git stash clear is one of them.
> I tend to type git stash clean, which creates a "clean" stash...

  I agree, the most itching issue is that usually, this action in git is
called `prune'. So it's inconsistant. I would have much prefered that
git stash would take its actions as options so that if you mistakenly
type a wrong command, the options parsers sees that and fails.
-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox