Git development
 help / color / mirror / Atom feed
* Re: log/show: relative pathnames do not work in rev:path
From: Alex Riesen @ 2007-12-18 20:46 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git, Junio C Hamano, Johannes Schindelin, Linus Torvalds
In-Reply-To: <m3d4t3q4e5.fsf@roke.D-201>

Jakub Narebski, Tue, Dec 18, 2007 18:50:20 +0100:
> Alex Riesen <raa.lkml@gmail.com> writes:
> 
> > Noticed by a collegue of mine. Consider:
> > 
> >     $ cd $GIT/t
> >     $ git show 570f32266:t/test-lib.sh    # works
> >     $ git show 570f32266:test-lib.sh      # does not work
> >     $ git show 570f32266:./test-lib.sh    # does not work
> >     $ git show 570f32266:/t/test-lib.sh   # does not work
> > 
> > Considering that the relative path names work as filters (and many
> > agreed on that being useful), it would be nice to allow relative
> > pathnames in blob specifications for git-show and git-cat-file.
> > 
> > (besides the colon is a good delimiter, even tab-completion works with it)
> 
> If you think about it a bit, relative path names nor absolute
> path names does and should not work.  570f32266:t/test-lib.sh
> means path t/test-lib.sh staring from 570f32266^{tree}.  Where
> you are in the filesystem is not important and matters not for
> this syntax.  Besides if you access other branch file might be
> not in filesystem (deleted file, or disjoint branch with separate
> contents like 'todo' or 'html' branch in git.git repository).

Not convinced. It is *not* the plumbing problem I was trying to
describe. They discussion, metaphorically, should not have left the
command-line parser.

I think that we have parsing of the blob locators at the wrong level:
so that git-show, git-log and git-diff can handle its pathnames as
they handle path filters (relative to cwd), and git-cat-file,
git-diff-tree, git-rev-list, etc can handle theirs always relative to
the project root.

I actually do not see any problem for git-show (being porcelain-level
program) to treat *each and every* path anywhere relatively to the
current directory. It is just more comfortable.

Please consider the following patches.

^ permalink raw reply

* RE: git with custom diff for commits
From: Gerald Gutierrez @ 2007-12-18 20:48 UTC (permalink / raw)
  To: 'Junio C Hamano'
  Cc: 'Matthieu Moy', 'Johannes Schindelin', git
In-Reply-To: <7vzlw7ybx7.fsf@gitster.siamese.dyndns.org>


Yes, but wouldn't it be slick to actually teach git's internal diff to do
things like GNU diff can, like the ignore option -I, case insensitivity,
etc. I thought that's what the external diff capability is for, but it is
not so.

Gerald.

> -----Original Message-----
> From: Junio C Hamano [mailto:gitster@pobox.com] 
> Sent: Tuesday, December 18, 2007 12:40 PM
> To: Gerald Gutierrez
> Cc: 'Junio C Hamano'; 'Matthieu Moy'; 'Johannes Schindelin'; 
> git@vger.kernel.org
> Subject: Re: git with custom diff for commits
> 
> "Gerald Gutierrez" <ggmlfs@gmail.com> writes:
> 
> > I ended up doing the following, which sounds similar to the above. 
> > Instead of doing mysqldump into data.sql, it goes into data.sql.2 
> > which I compare with the checked in data.sql using "diff -I 
> <timestamp 
> > RE>". If there are no differences, I delete data.sql.2. If 
> there are 
> > differences, I move
> > data.sql.2 into data.sql and check in. Perhaps not as elegant but 
> > certainly works.
> 
> Heh, that's essentially how automated html/man branches are 
> managed ;-)

^ permalink raw reply

* [PATCH] Simple support for tree entry specification with relative pathnames
From: Alex Riesen @ 2007-12-18 20:47 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git, Junio C Hamano, Johannes Schindelin, Linus Torvalds
In-Reply-To: <20071218204623.GC2875@steel.home>

This allows git show to understand something like this:

    $ test -f DIR/file && cd DIR &&  git show rev:file

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---

This is a bit too simplistic and can be fooled easily:

    .../t$ git show HEAD:../t/test-lib.sh

wont work. It is short, though.

 cache.h     |    1 +
 revision.c  |    4 ++--
 sha1_name.c |   27 ++++++++++++++++++++++++---
 3 files changed, 27 insertions(+), 5 deletions(-)

diff --git a/cache.h b/cache.h
index 39331c2..054f106 100644
--- a/cache.h
+++ b/cache.h
@@ -416,6 +416,7 @@ static inline unsigned int hexval(unsigned char c)
 
 extern int get_sha1(const char *str, unsigned char *sha1);
 extern int get_sha1_with_mode(const char *str, unsigned char *sha1, unsigned *mode);
+extern int get_sha1_with_prefix(const char *prefix, const char *name, unsigned char *sha1, unsigned *mode);
 extern int get_sha1_hex(const char *hex, unsigned char *sha1);
 extern char *sha1_to_hex(const unsigned char *sha1);	/* static buffer result! */
 extern int read_ref(const char *filename, unsigned char *sha1);
diff --git a/revision.c b/revision.c
index 7e2f4f1..cac283c 100644
--- a/revision.c
+++ b/revision.c
@@ -855,7 +855,7 @@ int handle_revision_arg(const char *arg, struct rev_info *revs,
 		local_flags = UNINTERESTING;
 		arg++;
 	}
-	if (get_sha1_with_mode(arg, sha1, &mode))
+	if (get_sha1_with_prefix(revs->prefix, arg, sha1, &mode))
 		return -1;
 	if (!cant_be_filename)
 		verify_non_filename(revs->prefix, arg);
@@ -1280,7 +1280,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
 		unsigned char sha1[20];
 		struct object *object;
 		unsigned mode;
-		if (get_sha1_with_mode(def, sha1, &mode))
+		if (get_sha1_with_prefix(revs->prefix, def, sha1, &mode))
 			die("bad default revision '%s'", def);
 		object = get_reference(revs, def, sha1, 0);
 		add_pending_object_with_mode(revs, object, def, mode);
diff --git a/sha1_name.c b/sha1_name.c
index 13e1164..358aab7 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -656,6 +656,12 @@ int get_sha1(const char *name, unsigned char *sha1)
 
 int get_sha1_with_mode(const char *name, unsigned char *sha1, unsigned *mode)
 {
+	return get_sha1_with_prefix(NULL, name, sha1, mode);
+}
+
+int get_sha1_with_prefix(const char *prefix, const char *name, unsigned char *sha1, unsigned *mode)
+{
+	char *prefixpath;
 	int ret, bracket_depth;
 	int namelen = strlen(name);
 	const char *cp;
@@ -664,6 +670,9 @@ int get_sha1_with_mode(const char *name, unsigned char *sha1, unsigned *mode)
 	ret = get_sha1_1(name, namelen, sha1);
 	if (!ret)
 		return ret;
+
+	prefixpath = prefix ? xmalloc(strlen(prefix) + namelen + 1): NULL;
+
 	/* sha1:path --> object name of path in ent sha1
 	 * :path -> object name of path in index
 	 * :[0-3]:path -> object name of path in index at stage
@@ -685,6 +694,10 @@ int get_sha1_with_mode(const char *name, unsigned char *sha1, unsigned *mode)
 		namelen = namelen - (cp - name);
 		if (!active_cache)
 			read_cache();
+		if (prefix) {
+			namelen = sprintf(prefixpath, "%s%s", prefix, cp);
+			cp = prefixpath;
+		}
 		pos = cache_name_pos(cp, namelen);
 		if (pos < 0)
 			pos = -pos - 1;
@@ -696,10 +709,12 @@ int get_sha1_with_mode(const char *name, unsigned char *sha1, unsigned *mode)
 			if (ce_stage(ce) == stage) {
 				hashcpy(sha1, ce->sha1);
 				*mode = ntohl(ce->ce_mode);
+				free(prefixpath);
 				return 0;
 			}
 			pos++;
 		}
+		free(prefixpath);
 		return -1;
 	}
 	for (cp = name, bracket_depth = 0; *cp; cp++) {
@@ -712,9 +727,15 @@ int get_sha1_with_mode(const char *name, unsigned char *sha1, unsigned *mode)
 	}
 	if (*cp == ':') {
 		unsigned char tree_sha1[20];
-		if (!get_sha1_1(name, cp-name, tree_sha1))
-			return get_tree_entry(tree_sha1, cp+1, sha1,
-					      mode);
+		if (!get_sha1_1(name, cp-name, tree_sha1)) {
+			if (!prefix)
+				ret = get_tree_entry(tree_sha1, cp + 1, sha1, mode);
+			else {
+				sprintf(prefixpath, "%s%s", prefix, cp + 1);
+				ret = get_tree_entry(tree_sha1, prefixpath, sha1, mode);
+				free(prefixpath);
+			}
+		}
 	}
 	return ret;
 }
-- 
1.5.4.rc0.86.g30f5

^ permalink raw reply related

* [PATCH] Introduce pathexpand: syntax-level chdir into the given cwd
From: Alex Riesen @ 2007-12-18 20:49 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git, Junio C Hamano, Johannes Schindelin, Linus Torvalds
In-Reply-To: <20071218204752.GD2875@steel.home>

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---

This will be used by the following patch. I actually already have sent
this one in, as suggestion for some problem back then. It is a bit
generic, so it gets its own patch.

 cache.h |    2 ++
 path.c  |   59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+), 0 deletions(-)

diff --git a/cache.h b/cache.h
index 054f106..25ce5da 100644
--- a/cache.h
+++ b/cache.h
@@ -383,6 +383,8 @@ static inline int is_absolute_path(const char *path)
 	return path[0] == '/';
 }
 const char *make_absolute_path(const char *path);
+/* Returns the analog of "cd path" from a directory "cwd" */
+extern char *pathexpand(const char *cwd, const char *path);
 
 /* Read and unpack a sha1 file into memory, write memory to a sha1 file */
 extern int sha1_object_info(const unsigned char *, unsigned long *);
diff --git a/path.c b/path.c
index 4260952..8231cd8 100644
--- a/path.c
+++ b/path.c
@@ -353,3 +353,62 @@ const char *make_absolute_path(const char *path)
 
 	return buf;
 }
+
+/*
+ * Returns the analog of "cd path" from a directory "cwd".
+ * The root is defined as empty path (instead of "/")
+ * An attempt to go past the root (with "..") leaves the path at root.
+ * The cwd is not expanded.
+ */
+char *pathexpand(const char *cwd, const char *path)
+{
+	static const char SEP[] = "/";
+	if (!*path) /* empty path -> "." (don't move) */
+		path = ".";
+	if (!cwd || !*cwd || *SEP == *path) /* no cwd, or path begins with "/" */
+		cwd = "";
+
+	while (*cwd && *SEP == *cwd)
+		++cwd;
+
+	size_t len = strlen(cwd);
+	char *out = malloc(len + 1 + strlen(path) + 1);
+	char *p = strcpy(out, cwd) + len;
+
+	for (; *path; ++path)
+	{
+		char *pl;
+		if (p > out && p[-1] != *SEP)
+			*p++ = *SEP;
+		pl = p;
+		while (*path && *SEP != *path)
+			*p++ = *path++;
+		*p = '\0';
+		/* ..."//"... */
+		if (p == pl)
+			; /* just ignore */
+		/* ..."/./"...  */
+		else if ( p - pl == 1 && '.' == *pl )
+			--p; /* just ignore */
+		/* ..."/../"...  */
+		else if ( p - pl == 2 && '.' == pl[0] && '.' == pl[1] )
+		{
+			/* drop the last element of the resulting path */
+			if (pl > out && --pl > out)
+				for (--pl; pl > out && *SEP != *pl; --pl)
+					;
+			p = pl > out ? ++pl: out;
+		}
+		/* ..."/path/"...  */
+		else if (*path)
+			*p++ = *path; /* just add the separator */
+
+		if (!*path)
+			break;
+	}
+	if (p > out+1 && *SEP == p[-1])
+		--p;
+	*p = '\0';
+	return out;
+}
+
-- 
1.5.4.rc0.86.g30f5

^ permalink raw reply related

* [PATCH] Use pathexpand to preparse the relative pathnames in blob references
From: Alex Riesen @ 2007-12-18 20:52 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git, Junio C Hamano, Johannes Schindelin, Linus Torvalds
In-Reply-To: <20071218204947.GE2875@steel.home>

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---

This, OTOH, is a bit intrusive and changes the current behaviour a bit
too far. git-show cannot use the absolute pathnames in blob locators
at all now, which I consider bad. An obvious way to use rev:/path is
blocked by Johannes' get_sha1_oneline. It would have worked, though.

 sha1_name.c |   21 +++++++--------------
 1 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/sha1_name.c b/sha1_name.c
index 358aab7..369e7d0 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -661,7 +661,7 @@ int get_sha1_with_mode(const char *name, unsigned char *sha1, unsigned *mode)
 
 int get_sha1_with_prefix(const char *prefix, const char *name, unsigned char *sha1, unsigned *mode)
 {
-	char *prefixpath;
+	char *prefixpath = NULL;
 	int ret, bracket_depth;
 	int namelen = strlen(name);
 	const char *cp;
@@ -671,8 +671,6 @@ int get_sha1_with_prefix(const char *prefix, const char *name, unsigned char *sh
 	if (!ret)
 		return ret;
 
-	prefixpath = prefix ? xmalloc(strlen(prefix) + namelen + 1): NULL;
-
 	/* sha1:path --> object name of path in ent sha1
 	 * :path -> object name of path in index
 	 * :[0-3]:path -> object name of path in index at stage
@@ -694,10 +692,9 @@ int get_sha1_with_prefix(const char *prefix, const char *name, unsigned char *sh
 		namelen = namelen - (cp - name);
 		if (!active_cache)
 			read_cache();
-		if (prefix) {
-			namelen = sprintf(prefixpath, "%s%s", prefix, cp);
-			cp = prefixpath;
-		}
+		prefixpath = pathexpand(prefix, cp);
+		namelen = strlen(prefixpath);
+		cp = prefixpath;
 		pos = cache_name_pos(cp, namelen);
 		if (pos < 0)
 			pos = -pos - 1;
@@ -728,13 +725,9 @@ int get_sha1_with_prefix(const char *prefix, const char *name, unsigned char *sh
 	if (*cp == ':') {
 		unsigned char tree_sha1[20];
 		if (!get_sha1_1(name, cp-name, tree_sha1)) {
-			if (!prefix)
-				ret = get_tree_entry(tree_sha1, cp + 1, sha1, mode);
-			else {
-				sprintf(prefixpath, "%s%s", prefix, cp + 1);
-				ret = get_tree_entry(tree_sha1, prefixpath, sha1, mode);
-				free(prefixpath);
-			}
+			prefixpath = pathexpand(prefix, cp + 1);
+			ret = get_tree_entry(tree_sha1, prefixpath, sha1, mode);
+			free(prefixpath);
 		}
 	}
 	return ret;
-- 
1.5.4.rc0.86.g30f5

^ permalink raw reply related

* Re: [PATCH] Simple support for tree entry specification with relative pathnames
From: Dana How @ 2007-12-18 21:03 UTC (permalink / raw)
  To: Alex Riesen
  Cc: Jakub Narebski, git, Junio C Hamano, Johannes Schindelin,
	Linus Torvalds, danahow
In-Reply-To: <20071218204752.GD2875@steel.home>

ACK from me...

I submitted a similar patch last May 4 which also
changed sha1_name.c to do this.  The patch
added a config variable to control this
(probably not desirable).  The patch also handled
leading/embedded . and .. .

In p4 you can say
  p4 <operation> file#rev
and file is interpreted relatively.

I wanted to be able to say
  git <operation> tree:file
and have file interpreted relatively.
This should only happen when you are inside the work tree.

Good luck!

Dana

On Dec 18, 2007 12:47 PM, Alex Riesen <raa.lkml@gmail.com> wrote:
> This allows git show to understand something like this:
>
>     $ test -f DIR/file && cd DIR &&  git show rev:file
>
> Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
> ---
>
> This is a bit too simplistic and can be fooled easily:
>
>     .../t$ git show HEAD:../t/test-lib.sh
>
> wont work. It is short, though.

-- 
Dana L. How  danahow@gmail.com  +1 650 804 5991 cell

^ permalink raw reply

* Re: [PATCH] Use pathexpand to preparse the relative pathnames in blob references
From: Dana How @ 2007-12-18 21:06 UTC (permalink / raw)
  To: Alex Riesen
  Cc: Jakub Narebski, git, Junio C Hamano, Johannes Schindelin,
	Linus Torvalds, danahow
In-Reply-To: <20071218205253.GF2875@steel.home>

On Dec 18, 2007 12:52 PM, Alex Riesen <raa.lkml@gmail.com> wrote:
> This, OTOH, is a bit intrusive and changes the current behaviour a bit
> too far. git-show cannot use the absolute pathnames in blob locators
> at all now, which I consider bad. An obvious way to use rev:/path is
> blocked by Johannes' get_sha1_oneline. It would have worked, though.

Last May Junio proposed the current :/ should be changed to :?
since it actually searches backwards.  Then :/ would be an absolute path,
and : could default to relative (like Unix command line).

Because of this incompatibility I think he wanted to delay it
until 1.5.6 or 1.6 (see old thread).
-- 
Dana L. How  danahow@gmail.com  +1 650 804 5991 cell

^ permalink raw reply

* Re: [PATCH] Authentication support for pserver
From: Ævar Arnfjörð Bjarmason @ 2007-12-18 21:10 UTC (permalink / raw)
  To: Martin Langhoff; +Cc: Ævar Arnfjörð Bjarmason, git
In-Reply-To: <46a038f90712181238p7529a02bmde21c89956a3f641@mail.gmail.com>

On Dec 18, 2007 8:38 PM, Martin Langhoff <martin.langhoff@gmail.com> wrote:
> On Dec 18, 2007 10:41 PM, Martin Langhoff <martin.langhoff@gmail.com> wrote:
> >  - git/config is very likely to be readable if the site is served via
> > other means, like dumb http protocol, or git+ssh. So even if the
> > password scrambling is mickey-mouse. it might make sense to force the
> > password data to live elsewhere.
>
> On this aspect, I see no reason why we wouldn't have the passwords
> crypt()ed or SHA1'd. Perl includes crypt() in the default
> distribution, so it wouldn't add any dependency.

It also includes Digest::SHA in the default distribution as of today:)

I could add another option for allowing users to choose their password
storage, e.g.:

[gitcvs]
    password_storage = plaintext # or sha1, crypt, ...

^ permalink raw reply

* Re: [PATCH] Simple support for tree entry specification with relative pathnames
From: Alex Riesen @ 2007-12-18 21:17 UTC (permalink / raw)
  To: Dana How
  Cc: Jakub Narebski, git, Junio C Hamano, Johannes Schindelin,
	Linus Torvalds
In-Reply-To: <56b7f5510712181303h1e7ae35dpa0adfd6804a7cecd@mail.gmail.com>

Dana How, Tue, Dec 18, 2007 22:03:04 +0100:
> ACK from me...

But NAK from me. Definitely not in this form. Please consider the
patches *only* as an RFC.

> I submitted a similar patch last May 4 which also changed
> sha1_name.c to do this.  The patch added a config variable to
> control this (probably not desirable).  The patch also handled
> leading/embedded . and .. .

This one (the last in series) too.

> In p4 you can say
>   p4 <operation> file#rev
> and file is interpreted relatively.
> 
> I wanted to be able to say
>   git <operation> tree:file
> and have file interpreted relatively.
> This should only happen when you are inside the work tree.

It is pure coincedence the syntaxes look similar. They are very deeply
different in Git and Perforce.

^ permalink raw reply

* Re: log/show: relative pathnames do not work in rev:path
From: Jakub Narebski @ 2007-12-18 21:24 UTC (permalink / raw)
  To: Alex Riesen
  Cc: git, Junio C Hamano, Johannes Schindelin, Linus Torvalds,
	Dana How
In-Reply-To: <20071218204623.GC2875@steel.home>

On Tue, 18 Dec 2007, Alex Riesen wrote:
> Jakub Narebski, Tue, Dec 18, 2007 18:50:20 +0100:
>> Alex Riesen <raa.lkml@gmail.com> writes:
>> 
>>> Noticed by a collegue of mine. Consider:
>>> 
>>>     $ cd $GIT/t
>>>     $ git show 570f32266:t/test-lib.sh    # works
>>>     $ git show 570f32266:test-lib.sh      # does not work
>>>     $ git show 570f32266:./test-lib.sh    # does not work
>>>     $ git show 570f32266:/t/test-lib.sh   # does not work
>>> 
>>> Considering that the relative path names work as filters (and many
>>> agreed on that being useful), it would be nice to allow relative
>>> pathnames in blob specifications for git-show and git-cat-file.
>>> 
>>> (besides the colon is a good delimiter, even tab-completion
>>> works with it) 
>> 
>> If you think about it a bit, relative path names nor absolute
>> path names does and should not work.  570f32266:t/test-lib.sh
>> means path t/test-lib.sh staring from 570f32266^{tree}.  Where
>> you are in the filesystem is not important and matters not for
>> this syntax.  Besides if you access other branch file might be
>> not in filesystem (deleted file, or disjoint branch with separate
>> contents like 'todo' or 'html' branch in git.git repository).
> 
> Not convinced. It is *not* the plumbing problem I was trying to
> describe. They discussion, metaphorically, should not have left the
> command-line parser.
> 
> I think that we have parsing of the blob locators at the wrong level:
> so that git-show, git-log and git-diff can handle its pathnames as
> they handle path filters (relative to cwd),

What cwd? <path> in <tree-ish>:<path> syntax is "relative" to <tree-ish>.
IMHO "<tree-ish>:<path>" should be considered (and is considered) as
one object: current working directory doesn't matter at all there,
contrary to "<tree-ish> -- <pathspec>" where it is natural that <pathspec>
is relative to current working directory.

What should git do in your proposal when we are on master branch in
Documentation subdirectory, and want to check TODO file in todo branch?
"git show todo:TODO" is most natural IMHO.

Note that for true <tree> as <tree-ish> you just don't know where
in the working area directory hierarchy <tree> can be. This means you
do't know relation of <tree> and <path> in <tree>:<path> to cwd.

> and git-cat-file, 
> git-diff-tree, git-rev-list, etc can handle theirs always relative to
> the project root.

Not "relative to project root". Relative to tree-ish used on right hand
side in <tree-ish>:<path> extended SHA-1 syntax. It is usually project
root, because when you specify <commit> or <tag> as <tree-ish> it refers
to top/root directory of a project.

> I actually do not see any problem for git-show (being porcelain-level
> program) to treat *each and every* path anywhere relatively to the
> current directory. It is just more comfortable.

This breaks backward compatibility, hard. And IMHO breaks layers.

But if (big if) it was to be implemented, default behavior should be
unchanged, and relative to the cwd (layers!) should use new syntax,
for example

     $ cd $GIT/t
     $ git show 570f32266:t/test-lib.sh    # works
     $ git show 570f32266:test-lib.sh      # should not work
     $ git show 570f32266:./test-lib.sh    # should work
     $ git show 570f32266:/t/test-lib.sh   # should perhaps work
 
Currently ":/<text>" (but not "<ref>:/<text>") is taken; see
git-rev-parse(1), "Specifying revisions".

-- 
Jakub Narebski
Poland

^ permalink raw reply

* RE: git with custom diff for commits
From: Johannes Schindelin @ 2007-12-18 21:27 UTC (permalink / raw)
  To: Gerald Gutierrez; +Cc: 'Junio C Hamano', 'Matthieu Moy', git
In-Reply-To: <000101c841b7$5f1d1060$762a14ac@na.acco.com>

Hi,

On Tue, 18 Dec 2007, Gerald Gutierrez wrote:

> Yes, but wouldn't it be slick to actually teach git's internal diff to 
> do things like GNU diff can, like the ignore option -I, case 
> insensitivity, etc. I thought that's what the external diff capability 
> is for, but it is not so.

I disagree.  Your statement is misleading when you say you want the 
internal diff to do things like GNU diff can.

What you want to do _in fact_ is not only modify the diff _output_, but 
the commit _input_.

And I am not so keen on such filters.  If I do not want to commit,  I do 
not change it to begin with.  Yes, your mysqldump is a special case here.  
But it is special anyway, as it is not source code.

Ciao,
Dscho

^ permalink raw reply

* Re: [PATCH] git show <tag>: show the tagger
From: Jakub Narebski @ 2007-12-18 21:33 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Johannes Schindelin, git
In-Reply-To: <7vfxxzzrv8.fsf@gitster.siamese.dyndns.org>

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

> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > For commit objects, the Author is shown, so do the equivalent for
> > tag objects, too.
> >
> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> > ---
> >
> > 	I know, it's feature freeze period.  But this is arguably a 
> > 	usability bug.
> 
> I'll wait for people to argue this fixes a usability bug, then.

IMHO the fact that currently "git show <tag>" _doesn't_ show
author and date of tag is a (usability) bug.

Fortunately "git cat-file -p <tag>" (or "git cat <tag>" with my
current alias) works, and dos show date in human-readable form.

-- 
Jakub Narebski
Poland
ShadeHawk on #git

^ permalink raw reply

* Re: [PATCH] Authentication support for pserver
From: Junio C Hamano @ 2007-12-18 21:37 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason
  Cc: Martin Langhoff, Ævar Arnfjörð Bjarmason, git
In-Reply-To: <51dd1af80712181310q38255593t989be64799be2e0e@mail.gmail.com>

"Ævar Arnfjörð Bjarmason"  <avarab@gmail.com> writes:

>> On this aspect, I see no reason why we wouldn't have the passwords
>> crypt()ed or SHA1'd. Perl includes crypt() in the default
>> distribution, so it wouldn't add any dependency.
>
> It also includes Digest::SHA in the default distribution as of today:)
>
> I could add another option for allowing users to choose their password
> storage, e.g.:
>
> [gitcvs]
>     password_storage = plaintext # or sha1, crypt, ...

I personally feel that selectable password storage format is going
overboard.  Pick a reasonable one and use it everywhere.

Using some form of crypt is a good idea but then we would need a
separate mode of operation to gitcvs to generate user password.

	$ gitcvs adduser junio
        Password: ******
        Retype password: ******
	Added user 'junio' to .git/config
	$ exit

I personally do not care about deluser or change-password subcommands,
as you can always go directly to .git/config to remove the user and
recreate anew, but adding them might be nice finishing touches.

	$ gitcvs password junio
        New password: ******
        Retype password: ******
	Changed password for user 'junio' in .git/config        
	$ gitcvs deluser junio
        Are you sure you want to remove user 'junio' [y/N]? Y
	Removed user 'junio' from .git/config
	$ exit

^ permalink raw reply

* Re: git with custom diff for commits
From: Junio C Hamano @ 2007-12-18 21:38 UTC (permalink / raw)
  To: Gerald Gutierrez
  Cc: 'Junio C Hamano', 'Matthieu Moy',
	'Johannes Schindelin', git
In-Reply-To: <000101c841b7$5f1d1060$762a14ac@na.acco.com>

"Gerald Gutierrez" <ggmlfs@gmail.com> writes:

> I thought that's what the external diff capability is for,...

It certainly is.  Your external diff gets all the information it needs
to generate whatever custom diff computation it may want to do.

^ permalink raw reply

* RE: git with custom diff for commits
From: Gerald Gutierrez @ 2007-12-18 21:51 UTC (permalink / raw)
  To: 'Johannes Schindelin'
  Cc: 'Junio C Hamano', 'Matthieu Moy', git
In-Reply-To: <Pine.LNX.4.64.0712182124410.23902@racer.site>

 
> -----Original Message-----
> From: Johannes Schindelin [mailto:Johannes.Schindelin@gmx.de] 
> Sent: Tuesday, December 18, 2007 1:27 PM
> To: Gerald Gutierrez
> Cc: 'Junio C Hamano'; 'Matthieu Moy'; git@vger.kernel.org
> Subject: RE: git with custom diff for commits
> 
> Hi,
> 
> On Tue, 18 Dec 2007, Gerald Gutierrez wrote:
> 
> > Yes, but wouldn't it be slick to actually teach git's 
> internal diff to 
> > do things like GNU diff can, like the ignore option -I, case 
> > insensitivity, etc. I thought that's what the external diff 
> capability 
> > is for, but it is not so.
> 
> I disagree.  Your statement is misleading when you say you 
> want the internal diff to do things like GNU diff can.
> 
> What you want to do _in fact_ is not only modify the diff 
> _output_, but the commit _input_.
> 
> And I am not so keen on such filters.  If I do not want to 
> commit,  I do not change it to begin with.  Yes, your 
> mysqldump is a special case here.  
> But it is special anyway, as it is not source code.

I don't understand how it is a benefit to have "git commit" and "git diff"
do different diff functions. It confuses me. A scenario: I keep doing git
diff's and it says there is no difference, but then git commit keeps telling
me there is.

While I understand it was built for the kernel and everybody likes the plain
text format, it is not a stretch of the imagination to have files that are
semantically identical but have byte-wise differences. OpenDocument files,
image files, XML, etc. Cases can be made either way that "the same" means
semantically or byte-wise. It's perfectly fine that the default is
byte-wise. But, if the user takes the time to build a custom diff, then
wouldn't it be reasonable to assume that user means for git to do semantic
comparisons for diff, commit and other git functions, even if there are
inconsequential byte-wise differences in the file itself?

Gerald.

^ permalink raw reply

* Re: log/show: relative pathnames do not work in rev:path
From: Linus Torvalds @ 2007-12-18 21:53 UTC (permalink / raw)
  To: Jakub Narebski
  Cc: Alex Riesen, git, Junio C Hamano, Johannes Schindelin, Dana How
In-Reply-To: <200712182224.28152.jnareb@gmail.com>



On Tue, 18 Dec 2007, Jakub Narebski wrote:
> 
> What cwd? <path> in <tree-ish>:<path> syntax is "relative" to <tree-ish>.
> IMHO "<tree-ish>:<path>" should be considered (and is considered) as
> one object: current working directory doesn't matter at all there,
> contrary to "<tree-ish> -- <pathspec>" where it is natural that <pathspec>
> is relative to current working directory.

Indeed.

The <treeish>:<path> syntax *is* relative, but it's relative to the exact 
*treeish* that is given. It has nothing what-so-ever to do with the 
current working directory, since the user has explicitly given an exact 
tree object, and trying to fake that out would be actively wrong.

That said, I can kind of understand the wish for something like this, and 
I suspect that we could make the "commit->tree" translation take the 
current path into account. In other words, maybe we should have something 
like this:

	/*
	 * This sequence currently works
	 */
	[torvalds@woody git]$ git rev-parse HEAD
	f9c5a80cdf2265f2df7712fad9f1fb7ef68b4768

	[torvalds@woody git]$ git rev-parse HEAD^{tree}
	051fb0c0dff4371f97f8ad9407f9f1fd335b1682

	[torvalds@woody git]$ git rev-parse HEAD^{tree}:t
	49d8bcd7a2df5c17193b1d002c4a8489d4fa990c

	/*
	 * .. but this would be new
	 */
	[torvalds@woody git]$ cd t
	[torvalds@woody t]$ git rev-parse HEAD^{tree}
	49d8bcd7a2df5c17193b1d002c4a8489d4fa990c

where the magic is *not* done by any "SHA1 path lookup" at all, but is 
simply done by the commit->tree lookup. At least at that point it would 
make logical sense (although it would probably be quite painful to 
implement).

			Linus

^ permalink raw reply

* Re: git with custom diff for commits
From: Matthieu Moy @ 2007-12-18 21:51 UTC (permalink / raw)
  To: Gerald Gutierrez
  Cc: 'Junio C Hamano', 'Johannes Schindelin', git
In-Reply-To: <000101c841b7$5f1d1060$762a14ac@na.acco.com>

"Gerald Gutierrez" <ggmlfs@gmail.com> writes:

> Yes, but wouldn't it be slick to actually teach git's internal diff to do
> things like GNU diff can, like the ignore option -I, case insensitivity,
> etc. I thought that's what the external diff capability is for, but it is
> not so.

Don't confuse diff and commit.

Git is really snapshot oriented. When you commit, you don't say
"record the changes I made since HEAD", you say "record the current
state of the working tree, and also record the fact that this state is
based on HEAD".

See what a commit object looks like:

$ git cat-file -p 183f84365d 
tree 3f9d576b4adc78188a411104bc21159d459fa3f4
parent b9c506f7d9f05a630fa7e31b77a9cf5081d7dbba
author Shun Kei Leung <kevinlsk@gmail.com> 1195614079 +0800
committer Junio C Hamano <gitster@pobox.com> 1195630064 -0800

git-p4: Fix typo in --detect-labels

Signed-off-by: Kevin Leung <kevinlsk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
$ _

The "tree" tells you the state of the project as recorded by commit,
and the "parent" tells you where the HEAD was pointing to at commit
time. That's really the raw information recorded by git.

Now, "diff" comes into the picture for two things: 1) storage
efficiency (you prefer a 1Mb pack file to a 1Gb uncompressed
repository), but that doesn't change the concept, and 2) user
interface.

When you say "git show HEAD", for example, git will recompute a diff,
and show it to you because this is what you expect. But this
information is computed at "git show" time, not at "git commit" time.


What you seem to expect is to tell git "commit the changes except this
portion", what you have to tell git is actually "commit the new state,
but not if this portion is the only change". That sounds identical,
but it's actually a bit different.

-- 
Matthieu

^ permalink raw reply

* RE: git with custom diff for commits
From: Johannes Schindelin @ 2007-12-18 22:00 UTC (permalink / raw)
  To: Gerald Gutierrez; +Cc: 'Junio C Hamano', 'Matthieu Moy', git
In-Reply-To: <000201c841c0$2e5e08e0$762a14ac@na.acco.com>

Hi,

On Tue, 18 Dec 2007, Gerald Gutierrez wrote:

> I don't understand how it is a benefit to have "git commit" and "git 
> diff" do different diff functions. It confuses me.

Matthieu said it better than I ever could.

Ciao,
Dscho

^ permalink raw reply

* Re: Question about git-svn import
From: Jörg Sommer @ 2007-12-18 15:31 UTC (permalink / raw)
  To: git list
In-Reply-To: <4767724A.9040207@obry.net>

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

Hello Pascal,

Pascal Obry schrieb am Tue 18. Dec, 08:10 (+0100):
> Steven Walter a écrit :
> > Not sure if this is the best way, but I would recommend cloning into two
> > repositories, then combining them.  
> 
> I feared that :)

It's not as complicated as you might think.

> > So you already have the newer
> > changes with the standard layout.  You would now:
> > 
> >     $ git svn init <repo>
> > 
> > And only fetch the revisions before the layout change.  You could then
> > combine the two repositories using .git/info/grafts and
> > git-rewrite-branch.
> 
> Hum, looks like something not easy to do (at least for a Git beginner
> like me) ! Any documentation on this ? Would you mind showing this on
> the example script I sent ?

I had the same problem. We changed the structure of our SVN repository
from /trunk/pkg to /pkg/trunk and git-svn couldn't deal with this.

I used the script posted in
http://lists.alioth.debian.org/pipermail/pkg-jed-devel/2007-December/001719.html
to do the switch.

Some suggestions:
1. Import both parts into one git repo into their own branches. (use
   --prefix)

2. Use gitk to insprect the history to find bad commits, e.g. empty
   commits or things git-svn imported wrong.

3. Use git-filter-branch with the --parent-filter to join the branches.

HTH, Jörg.
-- 
Die am Lautesten reden, haben stets am wenigsten zu sagen.

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

^ permalink raw reply

* Re: git-stash: RFC: Adopt the default behavior to other commands
From: Jörg Sommer @ 2007-12-18 15:42 UTC (permalink / raw)
  To: git
In-Reply-To: <7vfxy04ze7.fsf@gitster.siamese.dyndns.org>

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

Hi,

Junio C Hamano schrieb am Mon 17. Dec, 16:31 (-0800):
> Benoit Sigoure <tsuna@lrde.epita.fr> writes:
> 
> >> Benoit Sigoure <tsuna@lrde.epita.fr> writes:
> >>
> >>> ...  The current behavior of git stash is very
> >>> dangerous ...
> > ...
> >> This is a plain FUD, isn't it?  The first Oops should not happen these
> >> days.
> 
> But the original point by Sebastian hasn't been answered.  He wanted to
> make the command list the stash without arguments.
> 
> This was discussed already in the early days of stash and there indeed
> was a suggestion to do so (I think I sided with that), but the users did
> not want it.  IIRC, the argument went like: "when I say 'stash', that is
> because I want a quick and immediate way to stash, and I do not want a
> list.  If I do not have to have a quick way, I would create a temporary
> commit on the current branch, or switch to a temporary branch and commit
> there."

When it should go quick why don't use an alias. git stash can print the
list and everyone who wants a quick stash can create an alias for this.

I vote for stash print the list, because I dropped in the pitfall.

Bye, Jörg.
-- 
Die beste Tarnung ist die Wahrheit. Die glaubt einem keiner!
                      (Max Frisch: ‚Biedermann und die Brandstifter‘)

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

^ permalink raw reply

* Re: log/show: relative pathnames do not work in rev:path
From: Dana How @ 2007-12-18 22:08 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Jakub Narebski, Alex Riesen, git, Junio C Hamano,
	Johannes Schindelin, danahow
In-Reply-To: <alpine.LFD.0.9999.0712181347140.21557@woody.linux-foundation.org>

On Dec 18, 2007 1:53 PM, Linus Torvalds <torvalds@linux-foundation.org> wrote:
> On Tue, 18 Dec 2007, Jakub Narebski wrote:
> >
> > What cwd? <path> in <tree-ish>:<path> syntax is "relative" to <tree-ish>.
> > IMHO "<tree-ish>:<path>" should be considered (and is considered) as
> > one object: current working directory doesn't matter at all there,
> > contrary to "<tree-ish> -- <pathspec>" where it is natural that <pathspec>
> > is relative to current working directory.
>
> Indeed.
>
> The <treeish>:<path> syntax *is* relative, but it's relative to the exact
> *treeish* that is given. It has nothing what-so-ever to do with the
> current working directory, since the user has explicitly given an exact
> tree object, and trying to fake that out would be actively wrong.

I think the solution is to use the cwd only when the tree-ish refers
to a commit.
If it refers explicitly to a tree (or to a tree through a tag w/o
going through a commit)
then you don't make any modification.

When it *does* refer to a commit,  then for commit:relpath you prefix
relpath with the suffix of the cwd which is an extension beyond the root
of the working tree.

At the time I thought this through submodules didn't exist.
Clearly that case needs to be thought through as well.

> That said, I can kind of understand the wish for something like this, and
> I suspect that we could make the "commit->tree" translation take the
> current path into account. In other words, maybe we should have something
> like this:
>
>         /*
>          * This sequence currently works
>          */
>         [torvalds@woody git]$ git rev-parse HEAD
>         f9c5a80cdf2265f2df7712fad9f1fb7ef68b4768
>
>         [torvalds@woody git]$ git rev-parse HEAD^{tree}
>         051fb0c0dff4371f97f8ad9407f9f1fd335b1682
>
>         [torvalds@woody git]$ git rev-parse HEAD^{tree}:t
>         49d8bcd7a2df5c17193b1d002c4a8489d4fa990c
>
>         /*
>          * .. but this would be new
>          */
>         [torvalds@woody git]$ cd t
>         [torvalds@woody t]$ git rev-parse HEAD^{tree}
>         49d8bcd7a2df5c17193b1d002c4a8489d4fa990c
>
> where the magic is *not* done by any "SHA1 path lookup" at all, but is
> simply done by the commit->tree lookup. At least at that point it would
> make logical sense (although it would probably be quite painful to
> implement).

I must be missing something.  The old patch I submitted did this.
Its defect was that it did NOT make the cwd insertion conditional
on whether the tree-ish involved a commit or not (a test which also
_seems_ doable,  but I don't think I finished it & sent it in).

Thanks,
-- 
Dana L. How  danahow@gmail.com  +1 650 804 5991 cell

^ permalink raw reply

* Re: git-stash: RFC: Adopt the default behavior to other commands
From: Johannes Schindelin @ 2007-12-18 22:13 UTC (permalink / raw)
  To: Jörg Sommer; +Cc: git
In-Reply-To: <20071218154211.GB12549@alea.gnuu.de>

Hi,

[please do not cull me from the Cc list, should you reply to this]

On Tue, 18 Dec 2007, J?rg Sommer wrote:

> Junio C Hamano schrieb am Mon 17. Dec, 16:31 (-0800):
> > Benoit Sigoure <tsuna@lrde.epita.fr> writes:
> > 
> > >> Benoit Sigoure <tsuna@lrde.epita.fr> writes:
> > >>
> > >>> ...  The current behavior of git stash is very
> > >>> dangerous ...
> > > ...
> > >> This is a plain FUD, isn't it?  The first Oops should not happen 
> > >> these days.
> > 
> > But the original point by Sebastian hasn't been answered.  He wanted 
> > to make the command list the stash without arguments.
> > 
> > This was discussed already in the early days of stash and there indeed 
> > was a suggestion to do so (I think I sided with that), but the users 
> > did not want it.  IIRC, the argument went like: "when I say 'stash', 
> > that is because I want a quick and immediate way to stash, and I do 
> > not want a list.  If I do not have to have a quick way, I would create 
> > a temporary commit on the current branch, or switch to a temporary 
> > branch and commit there."
> 
> When it should go quick why don't use an alias. git stash can print the 
> list and everyone who wants a quick stash can create an alias for this.
> 
> I vote for stash print the list, because I dropped in the pitfall.

And in a fresh clone, this list is empty, showing nothing at all.  Leading 
the other half of the users to believe that the stash succeeded.

If stashing as the default operation of stash is ill-advised, showing the 
list is even more so.

Ciao,
Dscho

^ permalink raw reply

* Re: log/show: relative pathnames do not work in rev:path
From: Alex Riesen @ 2007-12-18 22:20 UTC (permalink / raw)
  To: Jakub Narebski
  Cc: git, Junio C Hamano, Johannes Schindelin, Linus Torvalds,
	Dana How
In-Reply-To: <200712182224.28152.jnareb@gmail.com>

Jakub Narebski, Tue, Dec 18, 2007 22:24:26 +0100:
> On Tue, 18 Dec 2007, Alex Riesen wrote:
> > I think that we have parsing of the blob locators at the wrong level:
> > so that git-show, git-log and git-diff can handle its pathnames as
> > they handle path filters (relative to cwd),
> 
> What cwd? <path> in <tree-ish>:<path> syntax is "relative" to <tree-ish>.

But the act of running "git-show <tree-ish>:<path>" does have a
working directory relative to the project root. And usually the
relative directory makes a lot of sense in git-show commands.

> What should git do in your proposal when we are on master branch in
> Documentation subdirectory, and want to check TODO file in todo branch?
> "git show todo:TODO" is most natural IMHO.

Yes, and that's why I NAKed the patches in the mail to Dana. I just
hope the problem gets some attention. Maybe I even get something out
of it, maybe not. It is not that hard to keep the patches in my tree.

> Note that for true <tree> as <tree-ish> you just don't know where
> in the working area directory hierarchy <tree> can be. This means you
> do't know relation of <tree> and <path> in <tree>:<path> to cwd.

I understand. But... How often do you think people use git show with a
tree which was not pointed by a commit?

> > and git-cat-file, 
> > git-diff-tree, git-rev-list, etc can handle theirs always relative to
> > the project root.
> 
> Not "relative to project root". Relative to tree-ish used on right hand
> side in <tree-ish>:<path> extended SHA-1 syntax. It is usually project
> root, because when you specify <commit> or <tag> as <tree-ish> it refers
> to top/root directory of a project.

I know. My problem: it is also awkward. git-show :test-l<Tab>ib.sh just
does not do what I expect. Nor does git cat-file HEAD:test-l<Tab>ib.sh.
And git cat-file HEAD:t/test-l<Tab> does not work at all. And this is
very simple example. Normally the pathnames are about 100 characters
long.

You know, it maybe as much correct as you wish, but is not very
usable (and no, I can't use the contributed completion. For lots of
reasons).

> > I actually do not see any problem for git-show (being porcelain-level
> > program) to treat *each and every* path anywhere relatively to the
> > current directory. It is just more comfortable.
> 
> This breaks backward compatibility, hard. And IMHO breaks layers.

Maybe they should be broken in porcelain...

> But if (big if) it was to be implemented, default behavior should be
> unchanged, and relative to the cwd (layers!) should use new syntax,
> for example
> 
>      $ cd $GIT/t
>      $ git show 570f32266:t/test-lib.sh    # works
>      $ git show 570f32266:test-lib.sh      # should not work

Well... Frankly, I suggest changing this for porcelain-level
commands (show and diff) and leave it as it is for plumbing.

>      $ git show 570f32266:./test-lib.sh    # should work

Definitely. I even implemented a patch to allow just this, but scraped
it: it looked a bit small and the syntax is not obvious to the user.
Maybe that is what I end up with, though.

>      $ git show 570f32266:/t/test-lib.sh   # should perhaps work
> Currently ":/<text>" (but not "<ref>:/<text>") is taken; see

Yes, and it becomes more and more an obstacle. With just one user
standing, AFAICS (/me considers Dscho's assassination for moment...
Nah... Maybe poison?)

^ permalink raw reply

* Re: log/show: relative pathnames do not work in rev:path
From: Junio C Hamano @ 2007-12-18 22:20 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Jakub Narebski, Alex Riesen, git, Johannes Schindelin, Dana How
In-Reply-To: <alpine.LFD.0.9999.0712181347140.21557@woody.linux-foundation.org>

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

> On Tue, 18 Dec 2007, Jakub Narebski wrote:
>> 
>> What cwd? <path> in <tree-ish>:<path> syntax is "relative" to <tree-ish>.
>> IMHO "<tree-ish>:<path>" should be considered (and is considered) as
>> one object: current working directory doesn't matter at all there,
>> contrary to "<tree-ish> -- <pathspec>" where it is natural that <pathspec>
>> is relative to current working directory.
>
> Indeed.
>
> The <treeish>:<path> syntax *is* relative, but it's relative to the exact 
> *treeish* that is given. It has nothing what-so-ever to do with the 
> current working directory, since the user has explicitly given an exact 
> tree object, and trying to fake that out would be actively wrong.
>
> That said, I can kind of understand the wish for something like this, and 
> I suspect that we could make the "commit->tree" translation take the 
> current path into account. In other words, maybe we should have something 
> like this:
>
> 	/*
> 	 * This sequence currently works
> 	 */
> 	[torvalds@woody git]$ git rev-parse HEAD
> 	f9c5a80cdf2265f2df7712fad9f1fb7ef68b4768
>
> 	[torvalds@woody git]$ git rev-parse HEAD^{tree}
> 	051fb0c0dff4371f97f8ad9407f9f1fd335b1682
>
> 	[torvalds@woody git]$ git rev-parse HEAD^{tree}:t
> 	49d8bcd7a2df5c17193b1d002c4a8489d4fa990c
>
> 	/*
> 	 * .. but this would be new
> 	 */
> 	[torvalds@woody git]$ cd t
> 	[torvalds@woody t]$ git rev-parse HEAD^{tree}
> 	49d8bcd7a2df5c17193b1d002c4a8489d4fa990c
>
> where the magic is *not* done by any "SHA1 path lookup" at all, but is 
> simply done by the commit->tree lookup. At least at that point it would 
> make logical sense (although it would probably be quite painful to 
> implement).

It is not just painful to implement.

Although I can buy that purely from the user (read: people who do not
know how the world works) experience point of view, you have to be extra
careful if you do this.  There are existing codepaths that take a string
that names a treeish from the end user, appends "^{tree}" to that
string, and passes the result to get_sha1() to obtain a tree object name
they want to operate on (the alternative is parse_tree_indirect() but it
forces them to go through the object layer).  You will need to update
these callers to keep them working from subdirectories.

^ permalink raw reply

* Re: git-stash: RFC: Adopt the default behavior to other commands
From: Junio C Hamano @ 2007-12-18 22:22 UTC (permalink / raw)
  To: Jörg Sommer; +Cc: git
In-Reply-To: <20071218154211.GB12549@alea.gnuu.de>

Jörg Sommer <joerg@alea.gnuu.de> writes:

> When it should go quick why don't use an alias. git stash can print the
> list and everyone who wants a quick stash can create an alias for this.

You are taking this completely backwards.  The stash mechanism is all
about creating a quickie temporary pair of commits.  Anybody who wants
otherwise can use alias or choose not to use stash at all.

^ 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