Git development
 help / color / mirror / Atom feed
* [PATCH 2/3] Implement --dirty for git-rebase--interactive.
From: Simon Sasburg @ 2007-11-01 21:30 UTC (permalink / raw)
  To: gitster; +Cc: git, Simon Sasburg
In-Reply-To: <1193952624-608-2-git-send-email-Simon.Sasburg@gmail.com>

Signed-off-by: Simon Sasburg <Simon.Sasburg@gmail.com>
---
 git-rebase--interactive.sh |   42 ++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 76dc679..326076b 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -25,6 +25,7 @@ REWRITTEN="$DOTEST"/rewritten
 PRESERVE_MERGES=
 STRATEGY=
 VERBOSE=
+FIX_DIRTY=
 test -d "$REWRITTEN" && PRESERVE_MERGES=t
 test -f "$DOTEST"/strategy && STRATEGY="$(cat "$DOTEST"/strategy)"
 test -f "$DOTEST"/verbose && VERBOSE=t
@@ -56,6 +57,35 @@ require_clean_work_tree () {
 	die "Working tree is dirty"
 }
 
+store_dirty_state () {
+	echo "Storing dirty index/working tree"
+	diff=$(git diff --cached)
+	case "$diff" in
+	?*)	git commit -m "REBASE--dirty: store HEAD..index diff"
+		;;
+	esac
+	diff=$(git diff)
+	case "$diff" in
+	?*)	git commit -a -m "REBASE--dirty: store index..workingtree diff"
+		;;
+	esac
+}
+
+restore_dirty_state () {
+	lastmsg=$(git-rev-list HEAD^..HEAD --pretty=oneline | sed "s:[^ ]* ::")
+	if test "$lastmsg" = "REBASE--dirty: store index..workingtree diff"
+	then
+		echo "Restoring dirty index state"
+		git reset --mixed HEAD^
+	fi
+	lastmsg=$(git-rev-list HEAD^..HEAD --pretty=oneline | sed "s:[^ ]* ::")
+	if test "$lastmsg" = "REBASE--dirty: store HEAD..index diff"
+	then
+		echo "Restoring dirty working dir state"
+		git reset --soft HEAD^
+	fi
+}
+
 ORIG_REFLOG_ACTION="$GIT_REFLOG_ACTION"
 
 comment_for_reflog () {
@@ -329,6 +359,7 @@ do_next () {
 		test ! -f "$DOTEST"/verbose ||
 			git diff-tree --stat $(cat "$DOTEST"/head)..HEAD
 	} &&
+	restore_dirty_state &&
 	rm -rf "$DOTEST" &&
 	git gc --auto &&
 	warn "Successfully rebased and updated $HEADNAME."
@@ -378,6 +409,7 @@ do
 			;;
 		esac &&
 		output git reset --hard $HEAD &&
+		restore_dirty_state &&
 		rm -rf "$DOTEST"
 		exit
 		;;
@@ -417,6 +449,9 @@ do
 	''|-h)
 		usage
 		;;
+	--dirty)
+		FIX_DIRTY=t
+		;;
 	*)
 		test -d "$DOTEST" &&
 			die "Interactive rebase already started"
@@ -435,7 +470,7 @@ do
 			;;
 		esac
 
-		require_clean_work_tree
+		test "$FIX_DIRTY" = "t" || require_clean_work_tree
 
 		if test ! -z "$2"
 		then
@@ -445,9 +480,12 @@ do
 				die "Could not checkout $2"
 		fi
 
-		HEAD=$(git rev-parse --verify HEAD) || die "No HEAD?"
 		UPSTREAM=$(git rev-parse --verify "$1") || die "Invalid base"
 
+		test "$FIX_DIRTY" = "t" && store_dirty_state
+
+		HEAD=$(git rev-parse --verify HEAD) || die "No HEAD?"
+
 		mkdir "$DOTEST" || die "Could not create temporary $DOTEST"
 
 		test -z "$ONTO" && ONTO=$UPSTREAM
-- 
1.5.3.4.502.g37c97

^ permalink raw reply related

* [PATCH 3/3] Make git-svn rebase --dirty pass along --dirty to git-rebase.
From: Simon Sasburg @ 2007-11-01 21:30 UTC (permalink / raw)
  To: gitster; +Cc: git, Simon Sasburg
In-Reply-To: <1193952624-608-3-git-send-email-Simon.Sasburg@gmail.com>

Signed-off-by: Simon Sasburg <Simon.Sasburg@gmail.com>
---
 git-svn.perl |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 22bb47b..5898a26 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -63,7 +63,7 @@ my ($_stdin, $_help, $_edit,
 	$_message, $_file,
 	$_template, $_shared,
 	$_version, $_fetch_all, $_no_rebase,
-	$_merge, $_strategy, $_dry_run, $_local,
+	$_merge, $_strategy, $_dry_run, $_local, $_dirty,
 	$_prefix, $_no_checkout, $_verbose);
 $Git::SVN::_follow_parent = 1;
 my %remote_opts = ( 'username=s' => \$Git::SVN::Prompt::_username,
@@ -169,6 +169,7 @@ my %cmd = (
 			  'verbose|v' => \$_verbose,
 			  'strategy|s=s' => \$_strategy,
 			  'local|l' => \$_local,
+			  'dirty|d' => \$_dirty,
 			  'fetch-all|all' => \$_fetch_all,
 			  %fc_opts } ],
 	'commit-diff' => [ \&cmd_commit_diff,
@@ -482,16 +483,20 @@ sub cmd_find_rev {
 }
 
 sub cmd_rebase {
-	command_noisy(qw/update-index --refresh/);
+	unless ($_dirty) {
+		command_noisy(qw/update-index --refresh/);
+	}
 	my ($url, $rev, $uuid, $gs) = working_head_info('HEAD');
 	unless ($gs) {
 		die "Unable to determine upstream SVN information from ",
 		    "working tree history\n";
 	}
 	if (command(qw/diff-index HEAD --/)) {
-		print STDERR "Cannot rebase with uncommited changes:\n";
-		command_noisy('status');
-		exit 1;
+		unless ($_dirty) {
+			print STDERR "Cannot rebase with uncommited changes:\n";
+			command_noisy('status');
+			exit 1;
+		}
 	}
 	unless ($_local) {
 		$_fetch_all ? $gs->fetch_all : $gs->fetch;
@@ -697,6 +702,7 @@ sub rebase_cmd {
 	push @cmd, '-v' if $_verbose;
 	push @cmd, qw/--merge/ if $_merge;
 	push @cmd, "--strategy=$_strategy" if $_strategy;
+	push @cmd, "--dirty" if $_dirty;
 	@cmd;
 }
 
-- 
1.5.3.4.502.g37c97

^ permalink raw reply related

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

On Thursday 01 November 2007, 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.
> 
> > So, I propose *not* converting git clean to a C builtin,
> > but instead adding --untracked and --ignored options to
> > git-rm.
> 
> I think what you are trying to do is to deprecate or remove "git
> clean".
> 
> I do not know where "git clean" came from.  I am suspecting that
> it was to give counterparts to some other SCMs, but do not know
> which ones.  Some people wanted to have it --- so you need to
> convince them that it is a bad idea first.  Adding an equivalent
> options to "git rm" alone does not solve that issue.

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?


Have fun! :)

...Johan


-- 
Johan Herland, <johan@herland.net>
www.herland.net

^ permalink raw reply

* Re: [PATCH] Make git-mailinfo strip whitespace from the start of the mail file.
From: Junio C Hamano @ 2007-11-01 21:33 UTC (permalink / raw)
  To: Simon Sasburg; +Cc: git, gitster
In-Reply-To: <1193951139-2312-1-git-send-email-Simon.Sasburg@gmail.com>

Just to help me understand why this change is needed...

Are you using mailinfo directly without splitting with mailsplit
first?

^ permalink raw reply

* Gitweb is preprocessing content when it shouldn't
From: Francesco Pretto @ 2007-11-01 21:36 UTC (permalink / raw)
  To: git

I was trying to follow the gitweb/README [1] to obtain http URLs that
were valid both as cloneable GIT URL and as browseable gitweb
interfaces. Unfortunately, gitweb is preprocessing all the content
inside http://domain/repo.dir/ , so the command:

    git clone http://git.vpsaruba.homeunix.org/bproofs.git

fails while trying to read XHTML generated pages.

I'm not yet sure if this is behaviour recently changed in gitweb but I
suppose this "hack" once worked (otherwise it wouldn't have been
documented).

My apache/vhost configuration follows:

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

<Directory "/var/www/cgi-bin">
    Options Indexes FollowSymlinks ExecCGI
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

<VirtualHost 62.149.168.100:80>
    ServerName git.vpsaruba.homeunix.org:80
    DocumentRoot /var/git
    RewriteEngine on
    RewriteRule ^/(.*\.git/(?!/?(info|objects|refs)).*)?$
/cgi-bin/gitweb.cgi%{REQUEST_URI}  [L,PT]
</VirtualHost>

Any consideration is appreciated.

Thanks,
Francesco

[1] http://git.kernel.org/?p=git/git.git;a=blob_plain;f=gitweb/README;hb=HEAD

^ permalink raw reply

* Re: [PATCH] Make git-mailinfo strip whitespace from the start of the mail file.
From: Simon Sasburg @ 2007-11-01 21:41 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vd4utabx0.fsf@gitster.siamese.dyndns.org>

> 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.

^ permalink raw reply

* Re: What's cooking in git.git (topics)
From: Brian Downing @ 2007-11-01 21:41 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vmytycykt.fsf@gitster.siamese.dyndns.org>

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).

Just to throw in my two cents, I would be strongly opposed to this
going in without some form of configuration to make it work for
spaces-only-indent projects.  I appreciate having whitespace checking,
and I think trailing whitespace and tabs-following-spaces are obviously
bad enough that they should always be flagged.  But flagging leading
spaces makes a legitimate and common coding style yield incredibly
obnoxious-looking diffs.

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.

-bcd

^ permalink raw reply

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

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

On Thu, Nov 01, 2007 at 08:27:55PM +0000, 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.
> 
> > So, I propose *not* converting git clean to a C builtin,
> > but instead adding --untracked and --ignored options to
> > git-rm.
> 
> I think what you are trying to do is to deprecate or remove "git
> clean".
> 
> I do not know where "git clean" came from.  I am suspecting that
> it was to give counterparts to some other SCMs, but do not know
> which ones.  Some people wanted to have it --- so you need to
> convince them that it is a bad idea first.  Adding an equivalent
> options to "git rm" alone does not solve that issue.

  FWIW I do use git clean a _lot_. I don't mind if it's doable from
another kind of command, but I do use git clean and even git clean -x a
lot, because it achives cleansing my repository faster (and sometimes
faster) than a `make distclean` would do.

-- 
·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

* 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: 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: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: 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: [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: [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: 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 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: [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: 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] 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: [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 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: 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

* 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

* [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


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