From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Thomas Harning <harningt@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH] add status.relativePaths config variable
Date: Sat, 8 Dec 2007 02:55:38 -0500 [thread overview]
Message-ID: <20071208075538.GA4812@coredump.intra.peff.net> (raw)
In-Reply-To: <7vejdxy70p.fsf@gitster.siamese.dyndns.org>
On Fri, Dec 07, 2007 at 11:34:14PM -0800, Junio C Hamano wrote:
> I like the general idea (and suspect we might want to make it default to
> false to retain the original behaviour, but I'd refrain from suggesting
> it, to keep the user experience stable during the upcoming -rc period).
>
> We'd need an update to git-status documentation to mention the variable.
Patch is below; please squash it into the original.
It seems kind of silly to manually write the "Configuration" section for
git-status, though. It would be nice if our config.txt could be
annotated to mention which commands use which config variables, and
git-*.txt could automagically include the right sections.
> > - wt_status_prepare(&s);
> > - s.prefix = prefix;
> > + wt_status_prepare(&s, prefix);
>
> I have been wondering ever since receiving this patch if this is a good
> interface change. Was there a problem if instead:
>
> - The implementation of wt_status_prepare(&s) stays as before;
>
> - run_status(), after calling wt_status_prepare(&s), notices the
> configuration variable, and sets s.prefix conditionally;
That would work fine. My reasoning was: the point of wt_status_prepare
is to initialize the wt_status object. I thought the "whether to use
relative paths based on config" logic should be something that _every_
preparer uses. OTOH, when I wrote it, I never expected that anyone _but_
run_status would call it (I must confess to not really investigating why
git-revert needed it; looks like it is to find a dirty index or working
tree, which is a little silly, since as a side effect we will do a find
on all untracked files).
I am fine with either; your call. Documentation patch is below.
---
diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt
index b0cb6bc..645dc85 100644
--- a/Documentation/git-status.txt
+++ b/Documentation/git-status.txt
@@ -42,7 +42,8 @@ template comments, and all the output lines are prefixed with '#'.
The paths mentioned in the output, unlike many other git commands, are
made relative to the current directory, if you are working in a
-subdirectory (this is on purpose, to help cutting and pasting).
+subdirectory (this is on purpose, to help cutting and pasting). See
+the status.relativePaths config option below.
CONFIGURATION
@@ -53,6 +54,10 @@ mean the same thing and the latter is kept for backward
compatibility) and `color.status.<slot>` configuration variables
to colorize its output.
+If the config variable `status.relativePaths` is set to false, then all
+paths shown are relative to the repository root, not to the current
+directory.
+
See Also
--------
gitlink:gitignore[5]
next prev parent reply other threads:[~2007-12-08 7:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-07 16:57 [PATCH] quote_path: convert empty path to "./" Jeff King
2007-12-07 18:54 ` Johannes Schindelin
2007-12-07 19:05 ` Thomas Harning
2007-12-07 20:49 ` Jeff King
2007-12-07 21:26 ` [PATCH] add status.relativePaths config variable Jeff King
2007-12-08 7:34 ` Junio C Hamano
2007-12-08 7:47 ` Junio C Hamano
2007-12-08 8:02 ` Jeff King
2007-12-08 8:05 ` Junio C Hamano
2007-12-08 8:45 ` Jeff King
2007-12-08 7:55 ` Jeff King [this message]
2007-12-08 8:14 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071208075538.GA4812@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=harningt@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).