* Re: getting started, happy with cmd line on windows [Scanned]
From: Zorba @ 2008-12-27 2:18 UTC (permalink / raw)
To: git
In-Reply-To: <7v4p0qlcnc.fsf@gitster.siamese.dyndns.org>
> Drop "rm *.*". Instead, probably what you want is
>
>> $ <import code>
>> $ git init
>> $ git commit
>
> which is a good way to make an initial import.
>
>> $ git tag versionA <commitID>
>> $ hack hack hack
>> ...
>
> and you futzed with the codebase without any intention of committing;
> it is nice to be able to experiment freely.
>
> After you are done experimenting,
>
> $ git reset --hard versionA
>
> if you did not make any commit, or even if you did commit while you were
> experimenting, if you do not want these experimental commits at all.
>
> No need for "rm *.*" anywhere.
Hi Junio,
Yes, I had not considered the possibility of being able to reset to last
commit (as manual page talked about UNDOing commits). $git reset -hard HEAD
= This is great, and gives me the functionality I want, get back to the last
conscious commit after hacking.
I've noticed since discovering this that the Reset function on the Win GUI
will ONLY let you reset as far as but not beyond the last commit (i.e.
unable to undo any commits) so I can use that too.
The other functionality I was looking for is being able to handle a changing
"portfolio" of files from version to version:
e.g.
version A = ABC.txt, AB.txt, AC.txt
version B = ABC.txt, AB.txt
version C = ABC.txt, AC.txt
version D = no files
I'm sure this is a common scenario, for ppl starting out with git as they
load up versions that till now have been sitting in file systems.
By using git-add and git-rm (or git-commit -a) I was able to have my
add/remove files to the index in "staging" and in the end the versions in
the repo match up to real life example. Then I can --hard reset back to any
of these, and ONLY got the files that were in that version.
Its a shame though that git-commit -a only removes files from the index, and
doesn't add files to the index, otherwise creating new versions is just a
case of importing the files needed for eacch version and cranking..
$ git commit -a
repeatedly.
But thanks to all who helped me on this one, and who knows maybe this post
will help some other pilgrim following after me
:-)
Season's geetings,
CR
^ permalink raw reply
* Re: commit.template
From: jidanni @ 2008-12-27 2:00 UTC (permalink / raw)
To: bss; +Cc: git
In-Reply-To: <200812261948.58032.bss@iguanasuicide.net>
I see, it's not replacing something current. It is adding something
extra. OK, would have never guessed. OK, stopping here.
^ permalink raw reply
* Re: [ANNOUNCE] GIT 1.6.1
From: Nicolas Pitre @ 2008-12-27 1:56 UTC (permalink / raw)
To: Heikki Orsila; +Cc: Junio C Hamano, git, lkml
In-Reply-To: <20081225114443.GD6115@zakalwe.fi>
On Thu, 25 Dec 2008, Heikki Orsila wrote:
> On Wed, Dec 24, 2008 at 10:36:27PM -0800, Junio C Hamano wrote:
> > * The packfile machinery hopefully is more robust when dealing with
> > corrupt packs if redundant objects involved in the corruption are
> > available elsewhere.
>
> Has anyone written a summary of how Git's redundancy operates?
>
> * What would be the probability for a single bit flip to corrupt the
> repository?
This is not something that git itself could answer. The probability
depends on the quality of your hardware. Once that probability has
occurred though, it is clear that your repository is then corrupted as
there is hardly any redundant bits in a git repository.
> * And what is the situation where a single bit flip can not corrupt the
> database?
The database can be resilient against most kind of corruptions if you
have a redundant copy of the affected object. It will still be
corrupted, but git is now able to detect corruptions gracefully and
function correctly with some fallback objects. Those objects must exist
in some other related repository though, and copied over to the affected
repository manually. It's then possible and recommended to "fix" the
corruption simply by repacking the repository at that point.
So there is no magic involved: you need to have some kind of backups,
either using traditional backup solutions, or by simply having your
repository cloned somewhere else. The idea of having a repository fixed
with redundant objects is for those cases where you need to salvage new
work that has no corresponding backup, but although corresponding
objects are not corrupted, they could be delta objects which base is
against old objects which happen to be corrupted.
> * When (which commands/functions) is error detection done?
Error detection is performed all the time. When it's not the more
expensive SHA1 checksum, at least the zlib CRC32 is verified. What the
latest git version does amongst other corruption related things is to
close some small holes where some specific kind of corruptions could
have been undetected and propagated from one pack to another when
repacking.
Nicolas
^ permalink raw reply
* Re: commit.template
From: Boyd Stephen Smith Jr. @ 2008-12-27 1:48 UTC (permalink / raw)
To: jidanni; +Cc: git
In-Reply-To: <874p0qsa2h.fsf@jidanni.org>
[-- Attachment #1: Type: text/plain, Size: 934 bytes --]
On Friday 2008 December 26 19:04:06 jidanni@jidanni.org wrote:
> OK, but there should be a reference to any %escapes available in
> templates, etc.
There are none, at least not right now.
> Or say the template is purely and additional ".signature" style file
> that will be inserted at some certain spot...
There's what it says:
"Use the contents of the given file as the initial version of the
commit message. The editor is invoked and you can make subsequent
changes. [...] This overrides the commit.template
configuration variable."
-- 'git commit --help'
What isn't clear about that? It's not an *extra* file; it is the template
(what you start with) for commit messages.
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss@iguanasuicide.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/ \_/
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply
* Re: commit.template
From: jidanni @ 2008-12-27 1:04 UTC (permalink / raw)
To: bss; +Cc: git
In-Reply-To: <200812261853.55464.bss@iguanasuicide.net>
OK, but there should be a reference to any %escapes available in
templates, etc.
Or say the template is purely and additional ".signature" style file
that will be inserted at some certain spot...
^ permalink raw reply
* Re: commit.template
From: Boyd Stephen Smith Jr. @ 2008-12-27 0:53 UTC (permalink / raw)
To: git; +Cc: jidanni, nanako3
In-Reply-To: <87hc4qscz5.fsf@jidanni.org>
[-- Attachment #1: Type: text/plain, Size: 1100 bytes --]
On Friday 2008 December 26 18:01:18 jidanni@jidanni.org wrote:
> OK, both
>
> >> 1) man git-config mentions
> >> commit.template
>
> and
> BSS> git commit --help tells how this configuration option is used, in the
> BSS> documentation of the "-t" option.
> should
>
> >> mention what file is being used presently
There is no file being used presently. With the "-m" or "-F" option, no
template is ever used. Without those options, either the argument to "-t" or
the value of commit.template is used in that order; the editor is invoked on
that. Finally if neither of those are defined the editor is invoked on a
new, empty file.
> as one needs a template in order to modify a template.
You aren't modifying the template with commit.template or "-t", you are
specifying one. You can create one from scratch in your editor of choice.
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss@iguanasuicide.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/ \_/
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply
* [PATCH 3/3] pretty: support multiline subjects with format:
From: René Scharfe @ 2008-12-27 0:49 UTC (permalink / raw)
To: Git Mailing List; +Cc: Junio C Hamano
In-Reply-To: <1230338375.8363.91.camel@ubuntu.ubuntu-domain>
git log --pretty=format:%s (and tformat:) used to display the first
line of the subject, unlike the other --pretty options, which would
construct a subject line from all lines of the first paragraph of
the commit message.
For consistency and increased code reuse, change format: to do the
same as the other options.
Before:
$ git log --pretty=oneline v1.6.1 | md5sum
7c0896d2a94fc3315a0372b9b3373a8f -
$ git log --pretty=tformat:"%H %s" v1.6.1 | md5sum
298903b1c065002e15daa5329213c51f -
After:
$ git log --pretty=tformat:"%H %s" v1.6.1 | md5sum
7c0896d2a94fc3315a0372b9b3373a8f -
$ git log --pretty=oneline v1.6.1 | md5sum
7c0896d2a94fc3315a0372b9b3373a8f -
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
---
pretty.c | 53 ++++++++++++++++++++++++++++++++++-------------------
1 files changed, 34 insertions(+), 19 deletions(-)
diff --git a/pretty.c b/pretty.c
index 632abc5..343dca5 100644
--- a/pretty.c
+++ b/pretty.c
@@ -424,13 +424,15 @@ struct chunk {
struct format_commit_context {
const struct commit *commit;
enum date_mode dmode;
+ unsigned commit_header_parsed:1;
+ unsigned commit_message_parsed:1;
/* These offsets are relative to the start of the commit message. */
- int commit_header_parsed;
- struct chunk subject;
struct chunk author;
struct chunk committer;
struct chunk encoding;
+ size_t message_off;
+ size_t subject_off;
size_t body_off;
/* The following ones are relative to the result struct strbuf. */
@@ -460,23 +462,14 @@ static void parse_commit_header(struct format_commit_context *context)
{
const char *msg = context->commit->buffer;
int i;
- enum { HEADER, SUBJECT, BODY } state;
- for (i = 0, state = HEADER; msg[i] && state < BODY; i++) {
+ for (i = 0; msg[i]; i++) {
int eol;
for (eol = i; msg[eol] && msg[eol] != '\n'; eol++)
; /* do nothing */
- if (state == SUBJECT) {
- context->subject.off = i;
- context->subject.len = eol - i;
- i = eol;
- }
if (i == eol) {
- state++;
- /* strip empty lines */
- while (msg[eol] == '\n' && msg[eol + 1] == '\n')
- eol++;
+ break;
} else if (!prefixcmp(msg + i, "author ")) {
context->author.off = i + 7;
context->author.len = eol - i - 7;
@@ -488,10 +481,8 @@ static void parse_commit_header(struct format_commit_context *context)
context->encoding.len = eol - i - 9;
}
i = eol;
- if (!msg[i])
- break;
}
- context->body_off = i;
+ context->message_off = i;
context->commit_header_parsed = 1;
}
@@ -508,6 +499,8 @@ static const char *format_subject(struct strbuf *sb, const char *msg,
if (!linelen || is_empty_line(line, &linelen))
break;
+ if (!sb)
+ continue;
strbuf_grow(sb, linelen + 2);
if (!first)
strbuf_addstr(sb, line_separator);
@@ -517,6 +510,21 @@ static const char *format_subject(struct strbuf *sb, const char *msg,
return msg;
}
+static void parse_commit_message(struct format_commit_context *c)
+{
+ const char *msg = c->commit->buffer + c->message_off;
+ const char *start = c->commit->buffer;
+
+ msg = skip_empty_lines(msg);
+ c->subject_off = msg - start;
+
+ msg = format_subject(NULL, msg, NULL);
+ msg = skip_empty_lines(msg);
+ c->body_off = msg - start;
+
+ c->commit_message_parsed = 1;
+}
+
static void format_decoration(struct strbuf *sb, const struct commit *commit)
{
struct name_decoration *d;
@@ -636,9 +644,6 @@ static size_t format_commit_item(struct strbuf *sb, const char *placeholder,
parse_commit_header(c);
switch (placeholder[0]) {
- case 's': /* subject */
- strbuf_add(sb, msg + c->subject.off, c->subject.len);
- return 1;
case 'a': /* author ... */
return format_person_part(sb, placeholder[1],
msg + c->author.off, c->author.len,
@@ -650,6 +655,16 @@ static size_t format_commit_item(struct strbuf *sb, const char *placeholder,
case 'e': /* encoding */
strbuf_add(sb, msg + c->encoding.off, c->encoding.len);
return 1;
+ }
+
+ /* Now we need to parse the commit message. */
+ if (!c->commit_message_parsed)
+ parse_commit_message(c);
+
+ switch (placeholder[0]) {
+ case 's': /* subject */
+ format_subject(sb, msg + c->subject_off, " ");
+ return 1;
case 'b': /* body */
strbuf_addstr(sb, msg + c->body_off);
return 1;
--
1.6.1
^ permalink raw reply related
* Re: [PATCH] describe: Avoid unnecessary warning when using --all
From: Junio C Hamano @ 2008-12-27 0:40 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: demerphq, rene.scharfe, git
In-Reply-To: <20081227002627.GA21386@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> writes:
> I use spearce@spearce.org for my Git work so the S-o-b line above
> is wrong. I just fixed it in my development repository on the work
> system I used to make this patch.
>
> Having two personalities is hard... ;-)
>
> Can you please amend to use my normal spearce@spearce.org address?
Thanks, done.
^ permalink raw reply
* Re: [PATCH] describe: Avoid unnecessary warning when using --all
From: Miklos Vajna @ 2008-12-27 0:40 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: Junio C Hamano, demerphq, rene.scharfe, git
In-Reply-To: <20081227003859.GU21154@genesis.frugalware.org>
[-- Attachment #1: Type: text/plain, Size: 419 bytes --]
On Sat, Dec 27, 2008 at 01:38:59AM +0100, Miklos Vajna <vmiklos@frugalware.org> wrote:
> On Fri, Dec 26, 2008 at 04:26:27PM -0800, "Shawn O. Pearce" <spearce@spearce.org> wrote:
> > Having two personalities is hard... ;-)
> >
> > Can you please amend to use my normal spearce@spearce.org address?
>
> BTW, what Pasky/Nice did was to keep the author field the same, but
Err, I meant to mention Nico, sorry.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply
* [PATCH 2/3] pretty: factor out format_subject()
From: René Scharfe @ 2008-12-27 0:39 UTC (permalink / raw)
To: Git Mailing List; +Cc: Junio C Hamano
In-Reply-To: <1230337969.8363.84.camel@ubuntu.ubuntu-domain>
The next patch will use it.
In the version that was factored out, we can't rely on the len of the
struct strbuf to find out if a line separator needs to be added, as
it might already contain something. Add a guard variable ("first")
instead.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
---
pretty.c | 42 ++++++++++++++++++++++++------------------
1 files changed, 24 insertions(+), 18 deletions(-)
diff --git a/pretty.c b/pretty.c
index c43497b..632abc5 100644
--- a/pretty.c
+++ b/pretty.c
@@ -495,6 +495,28 @@ static void parse_commit_header(struct format_commit_context *context)
context->commit_header_parsed = 1;
}
+static const char *format_subject(struct strbuf *sb, const char *msg,
+ const char *line_separator)
+{
+ int first = 1;
+
+ for (;;) {
+ const char *line = msg;
+ int linelen = get_one_line(line);
+
+ msg += linelen;
+ if (!linelen || is_empty_line(line, &linelen))
+ break;
+
+ strbuf_grow(sb, linelen + 2);
+ if (!first)
+ strbuf_addstr(sb, line_separator);
+ strbuf_add(sb, line, linelen);
+ first = 0;
+ }
+ return msg;
+}
+
static void format_decoration(struct strbuf *sb, const struct commit *commit)
{
struct name_decoration *d;
@@ -718,27 +740,11 @@ void pp_title_line(enum cmit_fmt fmt,
const char *encoding,
int need_8bit_cte)
{
+ const char *line_separator = (fmt == CMIT_FMT_EMAIL) ? "\n " : " ";
struct strbuf title;
strbuf_init(&title, 80);
-
- for (;;) {
- const char *line = *msg_p;
- int linelen = get_one_line(line);
-
- *msg_p += linelen;
- if (!linelen || is_empty_line(line, &linelen))
- break;
-
- strbuf_grow(&title, linelen + 2);
- if (title.len) {
- if (fmt == CMIT_FMT_EMAIL) {
- strbuf_addch(&title, '\n');
- }
- strbuf_addch(&title, ' ');
- }
- strbuf_add(&title, line, linelen);
- }
+ *msg_p = format_subject(&title, *msg_p, line_separator);
strbuf_grow(sb, title.len + 1024);
if (subject) {
--
1.6.1
^ permalink raw reply related
* Re: [PATCH] describe: Avoid unnecessary warning when using --all
From: Miklos Vajna @ 2008-12-27 0:38 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: Junio C Hamano, demerphq, rene.scharfe, git
In-Reply-To: <20081227002627.GA21386@spearce.org>
[-- Attachment #1: Type: text/plain, Size: 550 bytes --]
On Fri, Dec 26, 2008 at 04:26:27PM -0800, "Shawn O. Pearce" <spearce@spearce.org> wrote:
> Having two personalities is hard... ;-)
>
> Can you please amend to use my normal spearce@spearce.org address?
BTW, what Pasky/Nice did was to keep the author field the same, but
change the S-o-b line based on if they did it in their free time or in
work hours.
Like this one:
http://article.gmane.org/gmane.comp.version-control.git/97419
And the related thread:
http://thread.gmane.org/gmane.comp.version-control.git/96690/focus=96768
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply
* Re: [PATCH] Add a commit.signoff configuration variable to always use --signoff.
From: Junio C Hamano @ 2008-12-27 0:36 UTC (permalink / raw)
To: Adeodato Simó; +Cc: git, Johannes Schindelin
In-Reply-To: <20081226221033.GA841@chistera.yi.org>
Adeodato Simó <dato@net.com.org.es> writes:
> ... I'd
> still like to hear if my patch would be suitable for inclusion, because
> it's much more straightforward to use (and to discover).
But "straightforward to discover" is not an advantage in this case.
As long as it comes with documentation that clearly explains why this
feature should not be used blindly in order to avoid diluting the value of
S-o-b, I think the feature itself is not a harmful thing to have. Dscho's
argument in the quoted thread that says it should be a conscious act to
add S-o-b (except for the part he misunderstands what S-o-b attests), is a
good one and still is valid.
By the way, please do not deflect away responses meant to you by using a
Mail-Followup-To header that points at the git mailing list. It is rude.
^ permalink raw reply
* [PATCH 1/3] pretty: factor out skip_empty_lines()
From: René Scharfe @ 2008-12-27 0:32 UTC (permalink / raw)
To: Git Mailing List; +Cc: Junio C Hamano
The patch after the next one will use it.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
---
pretty.c | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/pretty.c b/pretty.c
index f6ff312..c43497b 100644
--- a/pretty.c
+++ b/pretty.c
@@ -181,6 +181,20 @@ static int is_empty_line(const char *line, int *len_p)
return !len;
}
+static const char *skip_empty_lines(const char *msg)
+{
+ for (;;) {
+ int linelen = get_one_line(msg);
+ int ll = linelen;
+ if (!linelen)
+ break;
+ if (!is_empty_line(msg, &ll))
+ break;
+ msg += linelen;
+ }
+ return msg;
+}
+
static void add_merge_info(enum cmit_fmt fmt, struct strbuf *sb,
const struct commit *commit, int abbrev)
{
@@ -850,15 +864,7 @@ void pretty_print_commit(enum cmit_fmt fmt, const struct commit *commit,
}
/* Skip excess blank lines at the beginning of body, if any... */
- for (;;) {
- int linelen = get_one_line(msg);
- int ll = linelen;
- if (!linelen)
- break;
- if (!is_empty_line(msg, &ll))
- break;
- msg += linelen;
- }
+ msg = skip_empty_lines(msg);
/* These formats treat the title line specially. */
if (fmt == CMIT_FMT_ONELINE || fmt == CMIT_FMT_EMAIL)
--
1.6.1
^ permalink raw reply related
* Re: [PATCH] describe: Avoid unnecessary warning when using --all
From: Shawn O. Pearce @ 2008-12-27 0:26 UTC (permalink / raw)
To: Junio C Hamano; +Cc: demerphq, rene.scharfe, git
In-Reply-To: <7vmyeijws2.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> wrote:
> "Shawn O. Pearce" <spearce@spearce.org> writes:
> > Patch-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>
> > Signed-off-by: Shawn O. Pearce <sop@google.com>
>
> Yeah, do you prefer to be known as "sop" over "spearce" these days, by the
> way? It does not make a difference to me but I just noticed that Author
> and S-o-b won't be matching, so I am just being curious.
Whoops.
I use spearce@spearce.org for my Git work so the S-o-b line above
is wrong. I just fixed it in my development repository on the work
system I used to make this patch.
Having two personalities is hard... ;-)
Can you please amend to use my normal spearce@spearce.org address?
--
Shawn.
^ permalink raw reply
* Re: [PATCH] describe: Avoid unnecessary warning when using --all
From: Junio C Hamano @ 2008-12-27 0:18 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: demerphq, rene.scharfe, git
In-Reply-To: <20081226220201.GA20516@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> writes:
> In 212945d4 ("Teach git-describe to verify annotated tag names
> before output") git-describe learned how to output a warning if
> an annotated tag object was matched but its internal name doesn't
> match the local ref name.
>
> However, "git describe --all" causes the local ref name to be
> prefixed with "tags/", so we need to skip over this prefix before
> comparing the local ref name with the name recorded inside of the
> tag object.
>
> Patch-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>
> Signed-off-by: Shawn O. Pearce <sop@google.com>
> ---
> IMHO, suitable for maint...
Yeah, do you prefer to be known as "sop" over "spearce" these days, by the
way? It does not make a difference to me but I just noticed that Author
and S-o-b won't be matching, so I am just being curious.
^ permalink raw reply
* Re: commit.template
From: Junio C Hamano @ 2008-12-27 0:16 UTC (permalink / raw)
To: Nanako Shiraishi; +Cc: jidanni, git
In-Reply-To: <7vwsdmjwzr.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> made in $gmane/103591, you do not sound so harsh and play a bad girl.
Sorry, I meant "do not have to"...
^ permalink raw reply
* Re: commit.template
From: Junio C Hamano @ 2008-12-27 0:13 UTC (permalink / raw)
To: Nanako Shiraishi; +Cc: jidanni, git
In-Reply-To: <20081227090727.6117@nanako3.lavabit.com>
Nanako Shiraishi <nanako3@lavabit.com> writes:
> Quoting jidanni@jidanni.org:
>
>> NS> Didn't you mean "Signed-off-by: 積丹尼 <jidanni@jidanni.org>"?
>>
>> No. I want in fact just to use "Signed-off-by: jidanni@jidanni.org",
>
> I think everybody on the list now understands that you desperately want to be different. I think it would be beneficial for you to try making a difference in areas that matter, instead of just trying to be different in how your name is spelled.
>
> Just my two yen ;-)
Even though I soft-of-kind-of understand that you are frustrated for
getting that response after offering an advice to satisfy his earlier
wish:
"Thanks but I want to be http://zh.wikipedia.org/wiki/積丹尼"
made in $gmane/103591, you do not sound so harsh and play a bad girl.
Be civil and friendly around here, please...
^ permalink raw reply
* Re: commit.template
From: Nanako Shiraishi @ 2008-12-27 0:07 UTC (permalink / raw)
To: jidanni; +Cc: git
In-Reply-To: <87tz8qsgn2.fsf_-_@jidanni.org>
Quoting jidanni@jidanni.org:
> NS> Didn't you mean "Signed-off-by: 積丹尼 <jidanni@jidanni.org>"?
>
> No. I want in fact just to use "Signed-off-by: jidanni@jidanni.org",
I think everybody on the list now understands that you desperately want to be different. I think it would be beneficial for you to try making a difference in areas that matter, instead of just trying to be different in how your name is spelled.
Just my two yen ;-)
--
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/
^ permalink raw reply
* Re: commit.template
From: jidanni @ 2008-12-27 0:01 UTC (permalink / raw)
To: bss; +Cc: git, nanako3
In-Reply-To: <200812261750.12204.bss@iguanasuicide.net>
OK, both
>> 1) man git-config mentions
>> commit.template
and
BSS> git commit --help tells how this configuration option is used, in the
BSS> documentation of the "-t" option.
should
>> mention what file is being used presently
as one needs a template in order to modify a template... in case
someone one day wants to. Not me. I'm happy already.
^ permalink raw reply
* Re: getting started, happy with cmd line on windows [Scanned]
From: Junio C Hamano @ 2008-12-26 23:50 UTC (permalink / raw)
To: Zorba; +Cc: git
In-Reply-To: <gj3of4$pr3$3@ger.gmane.org>
"Zorba" <cr@altmore.co.uk> writes:
> Now, I went back and read the manual pages for git-checkout and think I see
> how to do it....
>
> $ <import code>
> $ git init
> $ git commit
> $ git tag versionA <commitID>
> $ hack hack hack
> ...
> now ready to start coding, want "last known good"
> $ rm *.*
> $ git checkout versionA .
>
> This worked fine when versionA had only files and no dirs - but will it work
> ok still if versionA is a proper tree ?
> (more of a unix question I suppose - will "." suffice as the path ?)
Drop "rm *.*". Instead, probably what you want is
> $ <import code>
> $ git init
> $ git commit
which is a good way to make an initial import.
> $ git tag versionA <commitID>
> $ hack hack hack
> ...
and you futzed with the codebase without any intention of committing;
it is nice to be able to experiment freely.
After you are done experimenting,
$ git reset --hard versionA
if you did not make any commit, or even if you did commit while you were
experimenting, if you do not want these experimental commits at all.
No need for "rm *.*" anywhere.
^ permalink raw reply
* Re: commit.template
From: Boyd Stephen Smith Jr. @ 2008-12-26 23:50 UTC (permalink / raw)
To: git; +Cc: jidanni, nanako3
In-Reply-To: <87tz8qsgn2.fsf_-_@jidanni.org>
[-- Attachment #1: Type: text/plain, Size: 930 bytes --]
On Friday 2008 December 26 16:42:09 jidanni@jidanni.org wrote:
> NS> Didn't you mean "Signed-off-by: 積丹尼 <jidanni@jidanni.org>"?
>
> No. I want in fact just to use "Signed-off-by: jidanni@jidanni.org",
> but apparently
> 1) man git-config mentions
> commit.template
> Specify a file to use as the template for new commit messages.
>
> but doesn't mention what file is being used presently, so one can know
> what to adjust.
git commit --help tells how this configuration option is used, in the
documentation of the "-t" option.
> 3) Making a line without a name would probably break other things.
Well, then use your legal name -- unicode is allowed.
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss@iguanasuicide.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/ \_/
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply
* Re: commit.template
From: Junio C Hamano @ 2008-12-26 23:44 UTC (permalink / raw)
To: jidanni; +Cc: nanako3, git
In-Reply-To: <87tz8qsgn2.fsf_-_@jidanni.org>
jidanni@jidanni.org writes:
> NS> Didn't you mean "Signed-off-by: 積丹尼 <jidanni@jidanni.org>"?
>
> No. I want in fact just to use "Signed-off-by: jidanni@jidanni.org",
That won't fly well, provided if you want your patches in git.git tree.
^ permalink raw reply
* Re: getting started, happy with cmd line on windows [Scanned]
From: Zorba @ 2008-12-26 23:13 UTC (permalink / raw)
To: git
In-Reply-To: <495508B9.7070103@lsrfire.ath.cx>
> I then deleted all files from the working directory, so I can pull out
> ONLY the ones in version A.
> I tried both fetch and checkout - but nothing was copied into working
> dir How do I do this ?
git treats deleted files just like edited files: as having been changed
in preparation for the next commit. You can get back all of the tracked
files using this command:
$ git reset --hard
It undoes _all_ changes: tracked edited files will be reverted to their
in-repository state, deleted files created again. You can also check
out individual files like this:
$ git checkout ABC.txt
If you just want to get rid of untracked files, you'd use the command
"git clean".
In general, if you switch your work tree from one revision to another
(git checkout), git tries to minimize the I/O needed. Files that are
the same in both aren't touched.
>>>>>>>>>>>>>>>>>>>
Hi Rene,
Thanks for taking the time.
My workflow is such that I inherit projects that are hard to debug and I
need to hack around a lot changing a lot of files to output tracking msgs
just to learn the code's functionality (e,g, PHP on a webserver), but these
changes I never intend to keep. After learning the code, I want to go back
to a "last known good". I.e. a previous stable version and start making
proper changes.
In other SCMs, there was a way to "discard" all local changes, after the
hacking phase, without EVER having had to commit.
For a while it seemed like you were telling me I had to COMMIT my hacked
code (against all my instincts :-), and THEN rollback ($ git reset --hard).
Now, I went back and read the manual pages for git-checkout and think I see
how to do it....
$ <import code>
$ git init
$ git commit
$ git tag versionA <commitID>
$ hack hack hack
...
now ready to start coding, want "last known good"
$ rm *.*
$ git checkout versionA .
This worked fine when versionA had only files and no dirs - but will it work
ok still if versionA is a proper tree ?
(more of a unix question I suppose - will "." suffice as the path ?)
^ permalink raw reply
* Re: [PATCH] gitrepository-layout: No longer first two letters. Also add "down".
From: jidanni @ 2008-12-26 23:08 UTC (permalink / raw)
To: gitster; +Cc: git
In-Reply-To: <7vmyeilj3z.fsf@gitster.siamese.dyndns.org>
OK, the two letters are related by an algorithm.
^ permalink raw reply
* commit.template
From: jidanni @ 2008-12-26 22:42 UTC (permalink / raw)
To: nanako3; +Cc: git
In-Reply-To: <20081227070232.6117@nanako3.lavabit.com>
NS> Didn't you mean "Signed-off-by: 積丹尼 <jidanni@jidanni.org>"?
No. I want in fact just to use "Signed-off-by: jidanni@jidanni.org",
but apparently
1) man git-config mentions
commit.template
Specify a file to use as the template for new commit messages.
but doesn't mention what file is being used presently, so one can know
what to adjust.
2) .git/hooks/commit-msg etc. don't seem to control that line.
3) Making a line without a name would probably break other things.
^ permalink raw reply
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