* [PATCH] t5403-post-checkout-hook.sh: make test operands posix
From: Gerrit Pape @ 2007-10-09 12:51 UTC (permalink / raw)
To: Junio C Hamano, git
Signed-off-by: Gerrit Pape <pape@smarden.org>
---
t/t5403-post-checkout-hook.sh | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/t/t5403-post-checkout-hook.sh b/t/t5403-post-checkout-hook.sh
index 487abf3..823239a 100755
--- a/t/t5403-post-checkout-hook.sh
+++ b/t/t5403-post-checkout-hook.sh
@@ -39,7 +39,7 @@ test_expect_success 'post-checkout receives the right arguments with HEAD unchan
old=$(awk "{print \$1}" clone1/.git/post-checkout.args) &&
new=$(awk "{print \$2}" clone1/.git/post-checkout.args) &&
flag=$(awk "{print \$3}" clone1/.git/post-checkout.args) &&
- test $old = $new -a $flag == 1
+ test $old = $new -a $flag = 1
'
test_expect_success 'post-checkout runs as expected ' '
@@ -52,7 +52,7 @@ test_expect_success 'post-checkout args are correct with git checkout -b ' '
old=$(awk "{print \$1}" clone1/.git/post-checkout.args) &&
new=$(awk "{print \$2}" clone1/.git/post-checkout.args) &&
flag=$(awk "{print \$3}" clone1/.git/post-checkout.args) &&
- test $old = $new -a $flag == 1
+ test $old = $new -a $flag = 1
'
test_expect_success 'post-checkout receives the right args with HEAD changed ' '
@@ -60,7 +60,7 @@ test_expect_success 'post-checkout receives the right args with HEAD changed ' '
old=$(awk "{print \$1}" clone2/.git/post-checkout.args) &&
new=$(awk "{print \$2}" clone2/.git/post-checkout.args) &&
flag=$(awk "{print \$3}" clone2/.git/post-checkout.args) &&
- test $old != $new -a $flag == 1
+ test $old != $new -a $flag = 1
'
test_expect_success 'post-checkout receives the right args when not switching branches ' '
@@ -68,7 +68,7 @@ test_expect_success 'post-checkout receives the right args when not switching br
old=$(awk "{print \$1}" clone2/.git/post-checkout.args) &&
new=$(awk "{print \$2}" clone2/.git/post-checkout.args) &&
flag=$(awk "{print \$3}" clone2/.git/post-checkout.args) &&
- test $old == $new -a $flag == 0
+ test $old = $new -a $flag = 0
'
test_done
--
1.5.3.4
^ permalink raw reply related
* Re: Problem with git-cvsimport
From: Jan Wielemaker @ 2007-10-09 12:47 UTC (permalink / raw)
To: Thomas Pasch; +Cc: git
In-Reply-To: <470B491F.9020306@jentro.com>
On Tuesday 09 October 2007 11:25, Thomas Pasch wrote:
> Hello,
>
> using git-cvsimport (1.5.3.4), it dies with
>
> Update
> guidance-common/src/java/com/jentro/manager/guidance/common/servlet/IconSer
>vlet.java: 2104 bytes
> Tree ID 01cb84cbee2e70a712459be6601b993603eed5bd
> Parent ID dcd8dc76f4638d1994165070c9813202992d546a
> Committed patch 3775 (bmw +0000 2004-10-14 11:10:43)
> Commit ID 53c68066f71651b057884e1101cda3967070724d
> Fetching
> guidance-common/src/java/com/jentro/manager/guidance/common/serverapi/Guida
>nceException.java v 1.14.4.2
> Update
> guidance-common/src/java/com/jentro/manager/guidance/common/serverapi/Guida
>nceException.java: 3718 bytes
> Tree ID 886268190ac2cb28b5f1e6cdb309054bcb8fa38e
> Parent ID 53c68066f71651b057884e1101cda3967070724d
> Merge parent branch: master
> fatal: Not a valid object name master
> Use of uninitialized value in chomp at /usr/bin/git-cvsimport line 766.
> Use of uninitialized value in pattern match (m//) at
> /usr/bin/git-cvsimport line 527.
> Use of uninitialized value in concatenation (.) or string at
> /usr/bin/git-cvsimport line 767.
> Cannot get commit id ():
>
> What can I do to avoid this problem?
I've had some similar problem. I've converted two big old repositories by
first converting to SVN using:
cvs2svn -s myrepo-svn /path/to/cvsmodule
git-svnimport -i -u -C /path/to-git file://myrepo-svn
Worked like a charm
Cheers --- Jan
^ permalink raw reply
* [PATCH] rebase -i: use diff plumbing instead of porcelain
From: Johannes Schindelin @ 2007-10-09 12:59 UTC (permalink / raw)
To: Johannes Sixt; +Cc: Git Mailing List
In-Reply-To: <470B7581.3030301@viscovery.net>
When diff drivers are installed, calling "git diff <tree1>..<tree2>"
calls those drivers. This borks the patch generation of rebase -i.
So use "git diff-tree -p" instead, which does not call diff drivers.
Noticed by Johannes Sixt.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
On Tue, 9 Oct 2007, Johannes Sixt wrote:
> Johannes Schindelin schrieb:
> > On Tue, 9 Oct 2007, Johannes Sixt wrote:
> >
> > > I wonder for what reason rebase--interactive generates a
> > > patch using 'git diff' in the make_patch function. Is this
> > > an artefact?
> >
> > It was an explicit request by people who use git-rebase
> > regularly, and missed being able to see the patch in
> > --interactive.
>
> Can we generate the patch with plumbing,
> diff-{files,index,tree}? They by-pass any diff drivers.
Here you are.
git-rebase--interactive.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 050140d..df4cedb 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -80,7 +80,7 @@ mark_action_done () {
make_patch () {
parent_sha1=$(git rev-parse --verify "$1"^) ||
die "Cannot get patch for $1^"
- git diff "$parent_sha1".."$1" > "$DOTEST"/patch
+ git diff-tree -p "$parent_sha1".."$1" > "$DOTEST"/patch
test -f "$DOTEST"/message ||
git cat-file commit "$1" | sed "1,/^$/d" > "$DOTEST"/message
test -f "$DOTEST"/author-script ||
@@ -325,7 +325,7 @@ do_next () {
;;
esac && {
test ! -f "$DOTEST"/verbose ||
- git diff --stat $(cat "$DOTEST"/head)..HEAD
+ git diff-tree --stat $(cat "$DOTEST"/head)..HEAD
} &&
rm -rf "$DOTEST" &&
git gc --auto &&
--
1.5.3.4.1169.g5fb8d
^ permalink raw reply related
* Re: [PATCH] mergetool: add support for ECMerge
From: Alan Hadsell @ 2007-10-09 13:03 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Steffen Prohaska, Theodore Tso, git
In-Reply-To: <Pine.LNX.4.64.0710091335580.4174@racer.site>
On 10/9/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> What does TortoiseCVS use?
They don't actually include it in the package, but they recommend
WinMerge http://winmerge.org/, which is free (GPL).
--
Alan Hadsell
^ permalink raw reply
* public repository
From: Pierre Habouzit @ 2007-10-09 13:04 UTC (permalink / raw)
To: Git ML
[-- Attachment #1: Type: text/plain, Size: 903 bytes --]
Under popular demand^W^W^Wbecause Jonas asked for my parse_options
work, I've put my git topic branches on a public repository on
git://git.madism.org/git.git.
master/next are my known positions of master and next at the time I
pushed last. ph/* are topic branches I work on, they should be either
bsaed on master or next (hence are rebased until merged into git.git or
dropped).
Right now, there is ph/strbuf with the 1+2 series that generated this
heated discussion before. There is also ph/parseopt: a 10+ series
featuring krh parse_options, with some rework on my end to support more
features, and I migrate a dozen of builtins to use them (in this topic
branch, `git rm -rf ...` works !)
Cheers,
--
·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: [PATCH] t5403-post-checkout-hook.sh: make test operands posix
From: Lars Hjemli @ 2007-10-09 13:05 UTC (permalink / raw)
To: Gerrit Pape; +Cc: git
In-Reply-To: <20071009125130.1343.qmail@bcafc83cd51c05.315fe32.mid.smarden.org>
On 10/9/07, Gerrit Pape <pape@smarden.org> wrote:
> t/t5403-post-checkout-hook.sh | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
An identical patch has already been posted:
http://article.gmane.org/gmane.comp.version-control.git/59952
--
larsh
^ permalink raw reply
* Adding color to git-add--interactive
From: Jonathan del Strother @ 2007-10-09 13:06 UTC (permalink / raw)
To: Git Mailing List
I find git-add--interactive incredibly awkward to use, mostly due to
the lack of visual differentiation as you type in a sequence of
commands. For example, when stepping through hunks to patch, every
time it shows a new hunk I have to carefully scan up the screen to
find where the hunk starts, before I can actually start reading what's
contained in that hunk.
For me at least, adding color would make the interactive mode far more
readable. I hacked in basic color support (just coloring PROMPT &
HEADER in list_and_choose, and the "Stage this hunk?" prompt) - which
helped a lot - but then reached the limits of my perl knowledge. For
instance, I can't see a sensible way of reusing git-svn's
log_use_color function without importing the entire file, and I can't
figure out how you'd go about diff-coloring the hunks. Is anyone with
more perl knowledge than me interested in taking this on?
Or am I alone in finding interactive mode basically unreadable?
Jon
^ permalink raw reply
* Re: [PATCH] git-config: handle --file option with relative pathname properly
From: Johannes Schindelin @ 2007-10-09 13:14 UTC (permalink / raw)
To: Gerrit Pape; +Cc: Junio C Hamano, git
In-Reply-To: <20071009124932.1184.qmail@395d4a80f3eafd.315fe32.mid.smarden.org>
Hi,
On Tue, 9 Oct 2007, Gerrit Pape wrote:
> @@ -189,7 +189,11 @@ int cmd_config(int argc, const char **argv, const char *prefix)
> else if (!strcmp(argv[1], "--file") || !strcmp(argv[1], "-f")) {
> if (argc < 3)
> usage(git_config_set_usage);
> - setenv(CONFIG_ENVIRONMENT, argv[2], 1);
> + if (argv[2][0] == '/')
Please use is_absolute_path() instead.
Ciao,
Dscho
^ permalink raw reply
* Re: [PATCH] mergetool: add support for ECMerge
From: Steffen Prohaska @ 2007-10-09 13:17 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Git Mailing List, Theodore Tso, Alan Hadsell
In-Reply-To: <2b3a6fcd0710090603l3c3578caq3bfa6a1b8ec583f@mail.gmail.com>
On Oct 9, 2007, at 3:03 PM, Alan Hadsell wrote:
> On 10/9/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
>
>> What does TortoiseCVS use?
>
> They don't actually include it in the package, but they recommend
> WinMerge http://winmerge.org/, which is free (GPL).
WinMerge doesn't support 3-way merges. At least I cannot find any
indication for 3-way in the manual [1] and the comparison at [2] also
tells that WinMerge doesn't support 3-way.
Steffen
[1] http://winmerge.org/2.6/manual/CompareFiles.html
[2] http://en.wikipedia.org/wiki/Comparison_of_file_comparison_tools
^ permalink raw reply
* Re: [PATCH] git-config: respect other options after -l, most notably --file
From: Johannes Schindelin @ 2007-10-09 13:15 UTC (permalink / raw)
To: Gerrit Pape; +Cc: Junio C Hamano, git
In-Reply-To: <20071009125024.1259.qmail@d8e601127fe8d0.315fe32.mid.smarden.org>
Hi,
On Tue, 9 Oct 2007, Gerrit Pape wrote:
> @@ -234,6 +235,8 @@ int cmd_config(int argc, const char **argv, const char *prefix)
> argv++;
> }
>
> + if (show_all)
> + return git_config(show_all_config);
> switch (argc) {
> case 2:
> return get_value(argv[1], NULL);
Shouldn't this somehow check if argc == 1 when show_all is set, and die
otherwise?
Ciao,
Dscho
^ permalink raw reply
* Re: [PATCH] git-config: print error message if the config file cannot be read
From: Johannes Schindelin @ 2007-10-09 13:16 UTC (permalink / raw)
To: Gerrit Pape; +Cc: Junio C Hamano, git
In-Reply-To: <20071009125102.1305.qmail@054bd0fc8effa5.315fe32.mid.smarden.org>
Hi,
On Tue, 9 Oct 2007, Gerrit Pape wrote:
> + if (git_config(show_all_config) == -1)
I'd rather check for < 0, just for future proofing.
Ciao,
Dscho
^ permalink raw reply
* Re: [PATCH] git-config: handle --file option with relative pathname properly
From: Johannes Sixt @ 2007-10-09 13:20 UTC (permalink / raw)
To: Gerrit Pape; +Cc: Junio C Hamano, git
In-Reply-To: <20071009124932.1184.qmail@395d4a80f3eafd.315fe32.mid.smarden.org>
Gerrit Pape schrieb:
> @@ -189,7 +189,11 @@ int cmd_config(int argc, const char **argv, const char *prefix)
> else if (!strcmp(argv[1], "--file") || !strcmp(argv[1], "-f")) {
> if (argc < 3)
> usage(git_config_set_usage);
> - setenv(CONFIG_ENVIRONMENT, argv[2], 1);
> + if (argv[2][0] == '/')
Please use is_absolute_path() here.
> + name = argv[2];
> + else
> + name = name ? prefix_filename(name, strlen(name), argv[2]) : argv[2];
Can't you avoid this ternary here? There's already an 'if' with the same
'else' branch.
> + setenv(CONFIG_ENVIRONMENT, name, 1);
> argc--;
> argv++;
> }
-- Hannes
^ permalink raw reply
* Re: Problem with git-cvsimport
From: Gerald (Jerry) Carter @ 2007-10-09 13:21 UTC (permalink / raw)
To: Thomas Pasch; +Cc: Jan Wielemaker, git
In-Reply-To: <200710091447.50501.wielemak@science.uva.nl>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jan Wielemaker wrote:
> I've had some similar problem. I've converted two big old
> repositories by first converting to SVN using:
>
> cvs2svn -s myrepo-svn /path/to/cvsmodule
> git-svnimport -i -u -C /path/to-git file://myrepo-svn
I would actually plug using cvs2svn to convert directly to git.
See this thread for Michael's original announcement.
http://marc.info/?l=git&m=118592701426175&w=2
I'm in the process of drafting Samba's own git repos from
the CVS and SVN history (http://gitweb.samba.org/).
cheers, jerry
=====================================================================
Samba ------- http://www.samba.org
Centeris ----------- http://www.centeris.com
"What man is a man who does not make the world better?" --Balian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHC4BJIR7qMdg1EfYRAlQ4AKDctlXFv0kcT51sA6P99qjVrPJ+MgCfWkCB
wPSf6l06UIlz0HERasHbryg=
=zSSf
-----END PGP SIGNATURE-----
^ permalink raw reply
* Re: [PATCH] git-config: print error message if the config file cannot be read
From: Johannes Sixt @ 2007-10-09 13:30 UTC (permalink / raw)
To: Gerrit Pape; +Cc: Junio C Hamano, git
In-Reply-To: <20071009125102.1305.qmail@054bd0fc8effa5.315fe32.mid.smarden.org>
Gerrit Pape schrieb:
> @@ -235,8 +235,12 @@ int cmd_config(int argc, const char **argv, const char *prefix)
> argv++;
> }
>
> - if (show_all)
> - return git_config(show_all_config);
> + if (show_all) {
> + if (git_config(show_all_config) == -1)
> + die("unable to read config file %s: %s",
> + getenv(CONFIG_ENVIRONMENT), strerror(errno));
I don't think that this works well: If there are no config files at all,
then we don't want to see an error - just as if the config file were empty.
Also, I don't think that errno is reliable at this point.
You probably want to see an error message *only* if you have supplied a file
name with --file.
-- Hannes
^ permalink raw reply
* Re: Adding color to git-add--interactive
From: Wincent Colaiuta @ 2007-10-09 13:31 UTC (permalink / raw)
To: Jonathan del Strother; +Cc: Git Mailing List
In-Reply-To: <91EBB71E-BB4E-4089-8C33-6B0C4A61223A@steelskies.com>
El 9/10/2007, a las 15:06, Jonathan del Strother escribió:
> Or am I alone in finding interactive mode basically unreadable?
I don't think you're alone. Compared with the nice colorized output
from things like git-status, git-log, git-diff and friends, the
output of "git-add --interactive" is decidedly hard to read.
Cheers,
Wincent
^ permalink raw reply
* Re: Adding color to git-add--interactive
From: Johannes Schindelin @ 2007-10-09 14:04 UTC (permalink / raw)
To: Wincent Colaiuta; +Cc: Jonathan del Strother, Git Mailing List
In-Reply-To: <A59A0321-9E29-4857-AF03-E6226C45E87C@wincent.com>
Hi,
On Tue, 9 Oct 2007, Wincent Colaiuta wrote:
> El 9/10/2007, a las 15:06, Jonathan del Strother escribi?:
>
> > Or am I alone in finding interactive mode basically unreadable?
>
> I don't think you're alone. Compared with the nice colorized output from
> things like git-status, git-log, git-diff and friends, the output of
> "git-add --interactive" is decidedly hard to read.
And since git-add--interactive is still a script, there is no excuse:
providing a patch should take the same time and amount of work as
complaining about the lack of colour.
Ciao,
Dscho
^ permalink raw reply
* [PATCH] Add 'git-p4 commit' as an alias for 'git-p4 submit'
From: Marius Storm-Olsen @ 2007-10-09 14:16 UTC (permalink / raw)
To: git; +Cc: simon, Marius Storm-Olsen
Given that git uses 'commit', git-p4's 'sumbit' was a bit confusing at times;
often making me do 'git submit' and 'git-p4 commit' instead.
Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
---
contrib/fast-import/git-p4 | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 557649a..52cd2a4 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -1651,6 +1651,7 @@ def printUsage(commands):
commands = {
"debug" : P4Debug,
"submit" : P4Submit,
+ "commit" : P4Submit,
"sync" : P4Sync,
"rebase" : P4Rebase,
"clone" : P4Clone,
--
1.5.3.4.1155.gfe96ee-dirty
^ permalink raw reply related
* Re: [PATCH] mergetool: add support for ECMerge
From: Alan Hadsell @ 2007-10-09 14:21 UTC (permalink / raw)
To: Steffen Prohaska; +Cc: Johannes Schindelin, Git Mailing List, Theodore Tso
In-Reply-To: <236E44B5-361E-4CE3-8C3D-BDAD0569642E@zib.de>
Steffen Prohaska writes:
> WinMerge doesn't support 3-way merges. At least I cannot find any
> indication for 3-way in the manual [1] and the comparison at [2] also
> tells that WinMerge doesn't support 3-way.
>From their FAQ:
Does WinMerge support merging three files? Sometimes it is called
3-way merge, where one file is ancestor. This would be useful for
version control!
Unfortunately not. We acknowledge it would be good feature but have no
plans to implement it in near future. This can be somewhat worked
around by using two WinMerge instances. (One developer has begun
preliminary work on this feature, but it is not yet available, even in
experimental releases.)
^ permalink raw reply
* Re: [PATCH] rebase -i: use diff plumbing instead of porcelain
From: Johannes Sixt @ 2007-10-09 14:26 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Git Mailing List
In-Reply-To: <Pine.LNX.4.64.0710091353140.4174@racer.site>
Johannes Schindelin schrieb:
> When diff drivers are installed, calling "git diff <tree1>..<tree2>"
> calls those drivers. This borks the patch generation of rebase -i.
> So use "git diff-tree -p" instead, which does not call diff drivers.
Thanks a lot! That works much better.
-- Hannes
^ permalink raw reply
* [PATCH] Support cvs via git-shell
From: Johannes Schindelin @ 2007-10-09 14:33 UTC (permalink / raw)
To: gitster, hjemli; +Cc: Jan Wielemaker, Git Mailing List
In-Reply-To: <200710051453.47622.wielemak@science.uva.nl>
This adds cvs support to the git-shell; You can now give new users
a restricted git-shell and they still can commit via git's cvs
emulator.
Note that either the gecos information must be accurate, or you must
provide a $HOME/.gitconfig with the appropriate user credentials.
Since the git-shell is too restricted to allow the user to do it
(on purpose!), it is up to the administrator to take care of that.
Based on an idea by Jan Wielemaker.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
Since Jan seems to be too busy to do it (in contrast to everybody
else), I ended up implementing my advices myself. At least that
way, I can take the credit, too, since not many things are left
from the original patch.
shell.c | 27 ++++++++++++++++++++++++++-
1 files changed, 26 insertions(+), 1 deletions(-)
diff --git a/shell.c b/shell.c
index c983fc7..cfe372b 100644
--- a/shell.c
+++ b/shell.c
@@ -1,6 +1,7 @@
#include "cache.h"
#include "quote.h"
#include "exec_cmd.h"
+#include "strbuf.h"
static int do_generic_cmd(const char *me, char *arg)
{
@@ -18,12 +19,34 @@ static int do_generic_cmd(const char *me, char *arg)
return execv_git_cmd(my_argv);
}
+static int do_cvs_cmd(const char *me, char *arg)
+{
+ const char *cvsserver_argv[3] = {
+ "cvsserver", "server", NULL
+ };
+ const char *oldpath = getenv("PATH");
+ struct strbuf newpath = STRBUF_INIT;
+
+ if (!arg || strcmp(arg, "server"))
+ die("git-cvsserver only handles server: %s", arg);
+
+ strbuf_addstr(&newpath, git_exec_path());
+ strbuf_addch(&newpath, ':');
+ strbuf_addstr(&newpath, oldpath);
+
+ setenv("PATH", strbuf_detach(&newpath, NULL), 1);
+
+ return execv_git_cmd(cvsserver_argv);
+}
+
+
static struct commands {
const char *name;
int (*exec)(const char *me, char *arg);
} cmd_list[] = {
{ "git-receive-pack", do_generic_cmd },
{ "git-upload-pack", do_generic_cmd },
+ { "cvs", do_cvs_cmd },
{ NULL },
};
@@ -32,8 +55,10 @@ int main(int argc, char **argv)
char *prog;
struct commands *cmd;
+ if (argc == 2 && !strcmp(argv[1], "cvs server"))
+ argv--;
/* We want to see "-c cmd args", and nothing else */
- if (argc != 3 || strcmp(argv[1], "-c"))
+ else if (argc != 3 || strcmp(argv[1], "-c"))
die("What do you think I am? A shell?");
prog = argv[2];
--
1.5.3.4.1169.g5fb8d
^ permalink raw reply related
* Re: Adding color to git-add--interactive
From: Wincent Colaiuta @ 2007-10-09 14:44 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Jonathan del Strother, Git Mailing List
In-Reply-To: <Pine.LNX.4.64.0710091503460.4174@racer.site>
El 9/10/2007, a las 16:04, Johannes Schindelin escribió:
> On Tue, 9 Oct 2007, Wincent Colaiuta wrote:
>
>> El 9/10/2007, a las 15:06, Jonathan del Strother escribió:
>>
>>> Or am I alone in finding interactive mode basically unreadable?
>>
>> I don't think you're alone. Compared with the nice colorized
>> output from
>> things like git-status, git-log, git-diff and friends, the output of
>> "git-add --interactive" is decidedly hard to read.
>
> And since git-add--interactive is still a script, there is no excuse:
> providing a patch should take the same time and amount of work as
> complaining about the lack of colour.
Why so combative, Johannes? I merely answered one of Jonathan's
questions. Nobody has proffered any "excuses".
And in any case, you're exaggerating. Jonathan said that he's already
invested time in trying to get it working, most certainly more time
than it has taken he, you or I, to write the emails in this thread,
and he's gotten as far as his Perl knowledge permits him.
Cheers,
Wincent
^ permalink raw reply
* [PATCH] Minor usage update in setgitperms.perl
From: Josh England @ 2007-10-09 16:04 UTC (permalink / raw)
To: git; +Cc: Josh England
Signed-off-by: Josh England <jjengla@sandia.gov>
---
contrib/hooks/setgitperms.perl | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/contrib/hooks/setgitperms.perl b/contrib/hooks/setgitperms.perl
index 5e3b89d..bd48e27 100644
--- a/contrib/hooks/setgitperms.perl
+++ b/contrib/hooks/setgitperms.perl
@@ -8,13 +8,14 @@
# To save permissions/ownership data, place this script in your .git/hooks
# directory and enable a `pre-commit` hook with the following lines:
# #!/bin/sh
-# . git-sh-setup
+# SUBDIRECTORY_OK=1 . git-sh-setup
# $GIT_DIR/hooks/setgitperms.perl -r
#
# To restore permissions/ownership data, place this script in your .git/hooks
-# directory and enable a `post-merge` hook with the following lines:
+# directory and enable a `post-merge` and `post-checkout` hook with the
+# following lines:
# #!/bin/sh
-# . git-sh-setup
+# SUBDIRECTORY_OK=1 . git-sh-setup
# $GIT_DIR/hooks/setgitperms.perl -w
#
use strict;
--
1.5.3.2.111.g5166-dirty
^ permalink raw reply related
* Re: Merge problems with git-mingw
From: Steffen Prohaska @ 2007-10-09 16:33 UTC (permalink / raw)
To: Johannes Sixt; +Cc: Peter Karlsson, Git Mailing List, Johannes Schindelin
In-Reply-To: <470B43D2.6090307@viscovery.net>
On Oct 9, 2007, at 11:03 AM, Johannes Sixt wrote:
> Peter Karlsson schrieb:
>> C:\Program Files\Git\bin>git var -l
>> usage: git-var [-l | <variable>]
>> C:\Program Files\Git\bin>git-var -l
>> fatal: Not a git repository
>> C:\Program Files\Git\bin>git --version
>> git version 1.5.3.mingw.1
>
> For the time being, install this beast in a path without blanks.
>
> This needs fixing, appearently. :(
I have the printf 'callstack' below from the v1.5.3.mingw.1 version
(9c792c5)
Apparently spawnve, which is called in compat/mingw.c, corrupts argv.
I have no idea how to continue debugging. Maybe some one else can
take over.
Steffen
$ git var GIT_COMMITTER_IDENT
argv at git.c:429
3
C:\Program Files (x86)\Git\bin\git.exe
var
C:/Program Files (x86)/Git/bin/git-var
GIT_COMMITTER_IDENT
argv at compat/mingw.c:301
C:/Program Files (x86)/Git/bin/git-var
GIT_COMMITTER_IDENT
(null)
argv at var.c:54
4
C:/Program
Files
(x86)/Git/bin/git-var
GIT_COMMITTER_IDENT
usage: git-var [-l | <variable>]
^ permalink raw reply
* [take 2] Clean up "git log" format with DIFF_FORMAT_NO_OUTPUT
From: Linus Torvalds @ 2007-10-09 16:35 UTC (permalink / raw)
To: Git Mailing List; +Cc: Junio C Hamano
In-Reply-To: <alpine.LFD.0.999.0710081353290.4964@woody.linux-foundation.org>
Clean up "git log" format with DIFF_FORMAT_NO_OUTPUT
This fixes an unnecessary empty line that we add to the log message when
we generate diffs, but don't actually end up printing any due to having
DIFF_FORMAT_NO_OUTPUT set.
This can happen with pickaxe or with rename following. The reason is that
we normally add an empty line between the commit and the diff, but we do
that even for the case where we've then suppressed the actual printing of
the diff.
This also updates a couple of tests that assumed the extraneous empty
line would exist at the end of output.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
This is a resend of the original patch, with just the changes to the tests
added to make it pass them all. Both of the tests actually got cleaner, I
think (ie one had the sed script blindly just delete the last line in
order to match it up with the known input, for example).
Linus
log-tree.c | 3 ++-
t/t3900-i18n-commit.sh | 2 +-
t/t4013/diff.log_-SF_master | 1 -
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/log-tree.c b/log-tree.c
index 2319154..62edd34 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -304,7 +304,8 @@ int log_tree_diff_flush(struct rev_info *opt)
* output for readability.
*/
show_log(opt, opt->diffopt.msg_sep);
- if (opt->verbose_header &&
+ if ((opt->diffopt.output_format & ~DIFF_FORMAT_NO_OUTPUT) &&
+ opt->verbose_header &&
opt->commit_format != CMIT_FMT_ONELINE) {
int pch = DIFF_FORMAT_DIFFSTAT | DIFF_FORMAT_PATCH;
if ((pch & opt->diffopt.output_format) == pch)
diff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh
index fcbabe8..94b1c24 100755
--- a/t/t3900-i18n-commit.sh
+++ b/t/t3900-i18n-commit.sh
@@ -8,7 +8,7 @@ test_description='commit and log output encodings'
. ./test-lib.sh
compare_with () {
- git show -s $1 | sed -e '1,/^$/d' -e 's/^ //' -e '$d' >current &&
+ git show -s $1 | sed -e '1,/^$/d' -e 's/^ //' >current &&
git diff current "$2"
}
diff --git a/t/t4013/diff.log_-SF_master b/t/t4013/diff.log_-SF_master
index 6162ed2..c1599f2 100644
--- a/t/t4013/diff.log_-SF_master
+++ b/t/t4013/diff.log_-SF_master
@@ -4,5 +4,4 @@ Author: A U Thor <author@example.com>
Date: Mon Jun 26 00:02:00 2006 +0000
Third
-
$
^ permalink raw reply related
* Re: Merge problems with git-mingw
From: Johannes Sixt @ 2007-10-09 17:03 UTC (permalink / raw)
To: Steffen Prohaska; +Cc: Peter Karlsson, Git Mailing List, Johannes Schindelin
In-Reply-To: <BA71DD45-9226-4661-9C92-60EEEA8638D0@zib.de>
Steffen Prohaska schrieb:
>
> On Oct 9, 2007, at 11:03 AM, Johannes Sixt wrote:
>
>> Peter Karlsson schrieb:
>>> C:\Program Files\Git\bin>git var -l
>>> usage: git-var [-l | <variable>]
>>> C:\Program Files\Git\bin>git-var -l
>>> fatal: Not a git repository
>>> C:\Program Files\Git\bin>git --version
>>> git version 1.5.3.mingw.1
>>
>> For the time being, install this beast in a path without blanks.
>>
>> This needs fixing, appearently. :(
>
> I have the printf 'callstack' below from the v1.5.3.mingw.1 version
> (9c792c5)
> Apparently spawnve, which is called in compat/mingw.c, corrupts argv.
Thank you. Here is a quick-fix.
-- Hannes
diff --git a/compat/mingw.c b/compat/mingw.c
index 8bb0dba..361216f 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -303,7 +303,7 @@ void openlog(const char *ident, int option,
{
}
-static const char *quote_arg(const char *arg)
+const char *quote_arg(const char *arg)
{
/* count chars to quote */
int len = 0, n = 0;
diff --git a/exec_cmd.c b/exec_cmd.c
index bad4843..7ab5a0f 100644
--- a/exec_cmd.c
+++ b/exec_cmd.c
@@ -129,7 +129,8 @@ int execv_git_cmd(const char **argv)
*/
tmp = argv[0];
- argv[0] = git_command;
+ extern const char *quote_arg(const char *arg);
+ argv[0] = quote_arg(git_command);
trace_argv_printf(argv, -1, "trace: exec:");
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox