git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Regression: git-commit no longer works from within subdirectories
@ 2006-08-03 18:06 Robert Shearman
  2006-08-03 19:05 ` Junio C Hamano
  2006-08-03 20:29 ` Jeff King
  0 siblings, 2 replies; 4+ messages in thread
From: Robert Shearman @ 2006-08-03 18:06 UTC (permalink / raw)
  To: Git Mailing List

Hi,

In the latest master branch git-commit no longer works from within 
subdirectories. Instead, you have to go to the top-level directory of 
the git tree to do the commit.

It fails with a confusing message when you are in a subdirectory:
rob@saturn:~/wine-git/dlls/msi$ git commit action.c
usage: git-read-tree (<sha> | [[-m [--aggressive] | --reset | 
--prefix=<prefix>] [-u | -i]] <sha1> [<sha2> [<sha3>]])

I'm not sure whether the previous behaviour was intentional, but I got 
used to it. Either way, I don't think users upgrading from 1.4.1 would 
appreciate a user-facing change like this in a 0.0.1 incremental release.

Can this be changed back to the previous behaviour?

Thanks,

-- 
Rob Shearman

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Regression: git-commit no longer works from within subdirectories
  2006-08-03 18:06 Regression: git-commit no longer works from within subdirectories Robert Shearman
@ 2006-08-03 19:05 ` Junio C Hamano
  2006-08-03 20:29 ` Jeff King
  1 sibling, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2006-08-03 19:05 UTC (permalink / raw)
  To: Robert Shearman; +Cc: git

Robert Shearman <rob@codeweavers.com> writes:

> In the latest master branch git-commit no longer works from within
> subdirectories. Instead, you have to go to the top-level directory of
> the git tree to do the commit.

This is broken and sorry I did not notice it earlier because I
usually run the tip of "next".  Will take a look.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Regression: git-commit no longer works from within subdirectories
  2006-08-03 18:06 Regression: git-commit no longer works from within subdirectories Robert Shearman
  2006-08-03 19:05 ` Junio C Hamano
@ 2006-08-03 20:29 ` Jeff King
  2006-08-04  4:26   ` Junio C Hamano
  1 sibling, 1 reply; 4+ messages in thread
From: Jeff King @ 2006-08-03 20:29 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Robert Shearman, Git Mailing List

On Thu, Aug 03, 2006 at 07:06:20PM +0100, Robert Shearman wrote:

> It fails with a confusing message when you are in a subdirectory:
> rob@saturn:~/wine-git/dlls/msi$ git commit action.c
> usage: git-read-tree (<sha> | [[-m [--aggressive] | --reset | 
> --prefix=<prefix>] [-u | -i]] <sha1> [<sha2> [<sha3>]])

The culprit is the recent changes to the builtins. cmd_read_tree now
takes an extra parameter 'prefix' which shadows the global declaration
in builtin-read-tree.c (and has a completely different meaning).

The one-liner below fixes it (though style-wise, you may prefer to rename the
shadowed variable).

-Peff

---
diff --git a/builtin-read-tree.c b/builtin-read-tree.c
index 49c10bf..8e3b04e 100644
--- a/builtin-read-tree.c
+++ b/builtin-read-tree.c
@@ -870,7 +870,7 @@ static const char read_tree_usage[] = "g
 
 static struct lock_file lock_file;
 
-int cmd_read_tree(int argc, const char **argv, const char *prefix)
+int cmd_read_tree(int argc, const char **argv, const char *git_prefix)
 {
        int i, newfd, stage = 0;
        unsigned char sha1[20];

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: Regression: git-commit no longer works from within subdirectories
  2006-08-03 20:29 ` Jeff King
@ 2006-08-04  4:26   ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2006-08-04  4:26 UTC (permalink / raw)
  To: Jeff King; +Cc: git

Jeff King <peff@peff.net> writes:

> The culprit is the recent changes to the builtins. cmd_read_tree now
> takes an extra parameter 'prefix' which shadows the global declaration
> in builtin-read-tree.c (and has a completely different meaning).

Thanks -- well spotted.  And of course "next" does not suffer
because the prefix global is gone and is replaced with a member
of a structure that is given as a parameter.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-08-04  4:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-03 18:06 Regression: git-commit no longer works from within subdirectories Robert Shearman
2006-08-03 19:05 ` Junio C Hamano
2006-08-03 20:29 ` Jeff King
2006-08-04  4:26   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).