Skip to content

Commit e99c2fb

Browse files
author
Junio C Hamano
committed
GIT 1.0.10
2 parents 0de62e5 + a0dfb48 commit e99c2fb

File tree

8 files changed

+49
-14
lines changed

8 files changed

+49
-14
lines changed

Documentation/git-commit.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ information.
2525
OPTIONS
2626
-------
2727
-a|--all::
28-
Update all paths in the index file.
28+
Update all paths in the index file. This flag notices
29+
files that have been modified and deleted, but new files
30+
you have not told about git are not affected.
2931

3032
-c or -C <commit>::
3133
Take existing commit object, and reuse the log message

Documentation/git-reset.txt

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,32 @@ brings your index file and the working tree back to that state,
145145
and resets the tip of the branch to that commit.
146146
------------
147147

148+
Interrupted workflow::
149+
+
150+
You can get interrupted by an ungent fix request while you are
151+
still in the middle of a large change. The files in your
152+
working tree are not in any shape to be committed yet, but you
153+
need to get to the other branch for a quick bugfix.
154+
+
155+
------------
156+
$ git checkout feature ;# you were working in "feature" branch and
157+
$ work work work ;# got interrupted
158+
$ git commit -a -m 'snapshot WIP' <1>
159+
$ git checkout master
160+
$ fix fix fix
161+
$ git commit ;# commit with real log
162+
$ git checkout feature
163+
$ git reset --soft HEAD^ ;# go back to WIP state <2>
164+
$ git reset <3>
165+
166+
<1> This commit will get blown away so a throw-away log message is OK.
167+
<2> This removes the 'WIP' commit from the commit history, and makes
168+
your working tree in the state just before you made that snapshot.
169+
<3> After <2>, the index file still has all the WIP changes you
170+
committed in <1>. This sets it to the last commit you were
171+
basing the WIP changes on.
172+
------------
173+
148174
Author
149175
------
150176
Written by Junio C Hamano <junkio@cox.net> and Linus Torvalds <torvalds@osdl.org>
@@ -156,4 +182,3 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
156182
GIT
157183
---
158184
Part of the gitlink:git[7] suite
159-

Documentation/pull-fetch-param.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ is often useful.
134134
+
135135
Some short-cut notations are also supported.
136136
+
137-
* For backward compatibility, `tag` is almost ignored;
138-
it just makes the following parameter <tag> to mean a
139-
refspec `refs/tags/<tag>:refs/tags/<tag>`.
137+
* `tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`;
138+
used with pull or fetch, it requests fetching everything up to
139+
the given tag.
140140
* A parameter <ref> without a colon is equivalent to
141141
<ref>: when pulling/fetching, and <ref>`:`<ref> when
142142
pushing. That is, do not store it locally if

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ all:
5555
# Define USE_STDEV below if you want git to care about the underlying device
5656
# change being considered an inode change from the update-cache perspective.
5757

58-
GIT_VERSION = 1.0.8
58+
GIT_VERSION = 1.0.10
5959

6060
# CFLAGS and LDFLAGS are for the users to override from the command line.
6161

name-rev.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,11 @@ static int name_ref(const char *path, const unsigned char *sha1)
9393
}
9494
if (o && o->type == commit_type) {
9595
struct commit *commit = (struct commit *)o;
96-
const char *p;
9796

98-
while ((p = strchr(path, '/')))
99-
path = p+1;
97+
if (!strncmp(path, "refs/heads/", 11))
98+
path = path + 11;
99+
else if (!strncmp(path, "refs/", 5))
100+
path = path + 5;
100101

101102
name_rev(commit, strdup(path), 0, 0, deref);
102103
}

show-branch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ static void append_one_rev(const char *av)
492492
append_ref(av, revkey);
493493
return;
494494
}
495-
if (strchr(av, '*') || strchr(av, '?')) {
495+
if (strchr(av, '*') || strchr(av, '?') || strchr(av, '[')) {
496496
/* glob style match */
497497
int saved_matches = ref_name_cnt;
498498
match_ref_pattern = av;

t/t6010-merge-base.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ H=$(doit 8 H $A $F)
4646

4747
test_expect_success 'compute merge-base (single)' \
4848
'MB=$(git-merge-base G H) &&
49-
expr "$(git-name-rev "$MB")" : "[0-9a-f]* B"'
49+
expr "$(git-name-rev "$MB")" : "[0-9a-f]* tags/B"'
5050

5151
test_expect_success 'compute merge-base (all)' \
5252
'MB=$(git-merge-base --all G H) &&
53-
expr "$(git-name-rev "$MB")" : "[0-9a-f]* B"'
53+
expr "$(git-name-rev "$MB")" : "[0-9a-f]* tags/B"'
5454

5555
test_expect_success 'compute merge-base with show-branch' \
5656
'MB=$(git-show-branch --merge-base G H) &&
57-
expr "$(git-name-rev "$MB")" : "[0-9a-f]* B"'
57+
expr "$(git-name-rev "$MB")" : "[0-9a-f]* tags/B"'
5858

5959
test_done

update-index.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,10 +534,17 @@ int main(int argc, const char **argv)
534534
struct strbuf buf;
535535
strbuf_init(&buf);
536536
while (1) {
537+
char *path_name;
537538
read_line(&buf, stdin, line_termination);
538539
if (buf.eof)
539540
break;
540-
update_one(buf.buf, prefix, prefix_length);
541+
if (line_termination && buf.buf[0] == '"')
542+
path_name = unquote_c_style(buf.buf, NULL);
543+
else
544+
path_name = buf.buf;
545+
update_one(path_name, prefix, prefix_length);
546+
if (path_name != buf.buf)
547+
free(path_name);
541548
}
542549
}
543550
if (active_cache_changed) {

0 commit comments

Comments
 (0)