* Re: [PATCH] rebase --fix: interactive fixup mode
From: Nguyen Thai Ngoc Duy @ 2012-01-09 1:44 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: Clemens Buchacher, git, Junio C Hamano
In-Reply-To: <20120108220127.GA4050@burratino>
2012/1/9 Jonathan Nieder <jrnieder@gmail.com>:
> Funny. :) I wonder if this is possible to generalize, to something like
>
> git rebase -i foo^{last-merge}
>
> or even something like
>
> git rebase -i foo^{first:--merges}
>
> (where "<commit>^{first:<rev-list args>}" would mean something like
> "the first commit listed by "git rev-list <rev-list args> <commit>").
> What do you think?
Is something like this over-generalized?
http://kerneltrap.org/mailarchive/git/2010/12/24/47502
A good thing I see from having a specific option for "-i HEAD~n" is
that it's potentially shorter to type. For someone who does rebase a
lot and has CapsLock turned to Ctrl, it helps. Maybe "rebase -I" ==
"rebase -i HEAD^{last-merge}" (or "rebase -i
<the-revision-used-last-time>") and "rebase -I <n>" == "rebase -i
HEAD~<n>"?
--
Duy
^ permalink raw reply
* Re: [PATCH] Work around sed portability issue in t8006-blame-textconv
From: Ben Walton @ 2012-01-09 3:40 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vehvcigsy.fsf@alter.siamese.dyndns.org>
Excerpts from Junio C Hamano's message of Fri Jan 06 17:53:33 -0500 2012:
> Ping?
Sorry, I was out of email contact since last Sunday. I'll look at
this tomorrow. I think I tested the exit status from
/usr/xpg4/bin/sed on this file by hand and found that it was exiting
cleanly, but I'll verify and let you know. If you're correct, I'll
adjust the commit message accordingly.
Thanks
-Ben
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302
^ permalink raw reply
* [PATCH v2 0/3] nd/index-pack-no-recurse
From: Nguyễn Thái Ngọc Duy @ 2012-01-09 3:59 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Shawn O. Pearce,
Nguyễn Thái Ngọc Duy
In-Reply-To: <1324901080-23215-1-git-send-email-pclouds@gmail.com>
Resend to incorporate the fixup commit from pu, no other changes.
Nguyễn Thái Ngọc Duy (3):
Eliminate recursion in setting/clearing marks in commit list
index-pack: eliminate recursion in find_unresolved_deltas
index-pack: eliminate unlimited recursion in get_delta_base()
builtin/index-pack.c | 141 ++++++++++++++++++++++++++++++++------------------
commit.c | 13 ++++-
revision.c | 45 ++++++++++------
3 files changed, 131 insertions(+), 68 deletions(-)
--
1.7.3.1.256.g2539c.dirty
^ permalink raw reply
* [PATCH v2 2/3] index-pack: eliminate recursion in find_unresolved_deltas
From: Nguyễn Thái Ngọc Duy @ 2012-01-09 3:59 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Shawn O. Pearce,
Nguyễn Thái Ngọc Duy
In-Reply-To: <1324901080-23215-1-git-send-email-pclouds@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
builtin/index-pack.c | 111 +++++++++++++++++++++++++++++++------------------
1 files changed, 70 insertions(+), 41 deletions(-)
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index af7dc37..38ff03a 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -34,6 +34,8 @@ struct base_data {
struct object_entry *obj;
void *data;
unsigned long size;
+ int ref_first, ref_last;
+ int ofs_first, ofs_last;
};
/*
@@ -221,6 +223,15 @@ static NORETURN void bad_object(unsigned long offset, const char *format, ...)
die("pack has bad object at offset %lu: %s", offset, buf);
}
+static struct base_data *alloc_base_data(void)
+{
+ struct base_data *base = xmalloc(sizeof(struct base_data));
+ memset(base, 0, sizeof(*base));
+ base->ref_last = -1;
+ base->ofs_last = -1;
+ return base;
+}
+
static void free_base_data(struct base_data *c)
{
if (c->data) {
@@ -553,58 +564,76 @@ static void resolve_delta(struct object_entry *delta_obj,
nr_resolved_deltas++;
}
-static void find_unresolved_deltas(struct base_data *base,
- struct base_data *prev_base)
+static struct base_data *find_unresolved_deltas_1(struct base_data *base,
+ struct base_data *prev_base)
{
- int i, ref_first, ref_last, ofs_first, ofs_last;
-
- /*
- * This is a recursive function. Those brackets should help reducing
- * stack usage by limiting the scope of the delta_base union.
- */
- {
+ if (base->ref_last == -1 && base->ofs_last == -1) {
union delta_base base_spec;
hashcpy(base_spec.sha1, base->obj->idx.sha1);
find_delta_children(&base_spec,
- &ref_first, &ref_last, OBJ_REF_DELTA);
+ &base->ref_first, &base->ref_last, OBJ_REF_DELTA);
memset(&base_spec, 0, sizeof(base_spec));
base_spec.offset = base->obj->idx.offset;
find_delta_children(&base_spec,
- &ofs_first, &ofs_last, OBJ_OFS_DELTA);
- }
+ &base->ofs_first, &base->ofs_last, OBJ_OFS_DELTA);
- if (ref_last == -1 && ofs_last == -1) {
- free(base->data);
- return;
- }
+ if (base->ref_last == -1 && base->ofs_last == -1) {
+ free(base->data);
+ return NULL;
+ }
- link_base_data(prev_base, base);
+ link_base_data(prev_base, base);
+ }
- for (i = ref_first; i <= ref_last; i++) {
- struct object_entry *child = objects + deltas[i].obj_no;
- struct base_data result;
+ if (base->ref_first <= base->ref_last) {
+ struct object_entry *child = objects + deltas[base->ref_first].obj_no;
+ struct base_data *result = alloc_base_data();
assert(child->real_type == OBJ_REF_DELTA);
- resolve_delta(child, base, &result);
- if (i == ref_last && ofs_last == -1)
+ resolve_delta(child, base, result);
+ if (base->ref_first == base->ref_last && base->ofs_last == -1)
free_base_data(base);
- find_unresolved_deltas(&result, base);
+
+ base->ref_first++;
+ return result;
}
- for (i = ofs_first; i <= ofs_last; i++) {
- struct object_entry *child = objects + deltas[i].obj_no;
- struct base_data result;
+ if (base->ofs_first <= base->ofs_last) {
+ struct object_entry *child = objects + deltas[base->ofs_first].obj_no;
+ struct base_data *result = alloc_base_data();
assert(child->real_type == OBJ_OFS_DELTA);
- resolve_delta(child, base, &result);
- if (i == ofs_last)
+ resolve_delta(child, base, result);
+ if (base->ofs_first == base->ofs_last)
free_base_data(base);
- find_unresolved_deltas(&result, base);
+
+ base->ofs_first++;
+ return result;
}
unlink_base_data(base);
+ return NULL;
+}
+
+static void find_unresolved_deltas(struct base_data *base)
+{
+ struct base_data *new_base, *prev_base = NULL;
+ for (;;) {
+ new_base = find_unresolved_deltas_1(base, prev_base);
+
+ if (new_base) {
+ prev_base = base;
+ base = new_base;
+ } else {
+ free(base);
+ base = prev_base;
+ if (!base)
+ return;
+ prev_base = base->base;
+ }
+ }
}
static int compare_delta_entry(const void *a, const void *b)
@@ -684,13 +713,13 @@ static void parse_pack_objects(unsigned char *sha1)
progress = start_progress("Resolving deltas", nr_deltas);
for (i = 0; i < nr_objects; i++) {
struct object_entry *obj = &objects[i];
- struct base_data base_obj;
+ struct base_data *base_obj = alloc_base_data();
if (is_delta_type(obj->type))
continue;
- base_obj.obj = obj;
- base_obj.data = NULL;
- find_unresolved_deltas(&base_obj, NULL);
+ base_obj->obj = obj;
+ base_obj->data = NULL;
+ find_unresolved_deltas(base_obj);
display_progress(progress, nr_resolved_deltas);
}
}
@@ -783,20 +812,20 @@ static void fix_unresolved_deltas(struct sha1file *f, int nr_unresolved)
for (i = 0; i < n; i++) {
struct delta_entry *d = sorted_by_pos[i];
enum object_type type;
- struct base_data base_obj;
+ struct base_data *base_obj = alloc_base_data();
if (objects[d->obj_no].real_type != OBJ_REF_DELTA)
continue;
- base_obj.data = read_sha1_file(d->base.sha1, &type, &base_obj.size);
- if (!base_obj.data)
+ base_obj->data = read_sha1_file(d->base.sha1, &type, &base_obj->size);
+ if (!base_obj->data)
continue;
- if (check_sha1_signature(d->base.sha1, base_obj.data,
- base_obj.size, typename(type)))
+ if (check_sha1_signature(d->base.sha1, base_obj->data,
+ base_obj->size, typename(type)))
die("local object %s is corrupt", sha1_to_hex(d->base.sha1));
- base_obj.obj = append_obj_to_pack(f, d->base.sha1,
- base_obj.data, base_obj.size, type);
- find_unresolved_deltas(&base_obj, NULL);
+ base_obj->obj = append_obj_to_pack(f, d->base.sha1,
+ base_obj->data, base_obj->size, type);
+ find_unresolved_deltas(base_obj);
display_progress(progress, nr_resolved_deltas);
}
free(sorted_by_pos);
--
1.7.3.1.256.g2539c.dirty
^ permalink raw reply related
* [PATCH v2 1/3] Eliminate recursion in setting/clearing marks in commit list
From: Nguyễn Thái Ngọc Duy @ 2012-01-09 3:59 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Shawn O. Pearce,
Nguyễn Thái Ngọc Duy
In-Reply-To: <1324901080-23215-1-git-send-email-pclouds@gmail.com>
Recursion in a DAG is generally a bad idea because it could be very
deep. Be defensive and avoid recursion in mark_parents_uninteresting()
and clear_commit_marks().
mark_parents_uninteresting() learns a trick from clear_commit_marks()
to avoid malloc() in (dorminant) single-parent case.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
commit.c | 13 +++++++++++--
revision.c | 45 +++++++++++++++++++++++++++++----------------
2 files changed, 40 insertions(+), 18 deletions(-)
diff --git a/commit.c b/commit.c
index 44bc96d..c7aefbf 100644
--- a/commit.c
+++ b/commit.c
@@ -421,7 +421,8 @@ struct commit *pop_most_recent_commit(struct commit_list **list,
return ret;
}
-void clear_commit_marks(struct commit *commit, unsigned int mark)
+static void clear_commit_marks_1(struct commit_list **plist,
+ struct commit *commit, unsigned int mark)
{
while (commit) {
struct commit_list *parents;
@@ -436,12 +437,20 @@ void clear_commit_marks(struct commit *commit, unsigned int mark)
return;
while ((parents = parents->next))
- clear_commit_marks(parents->item, mark);
+ commit_list_insert(parents->item, plist);
commit = commit->parents->item;
}
}
+void clear_commit_marks(struct commit *commit, unsigned int mark)
+{
+ struct commit_list *list = NULL;
+ commit_list_insert(commit, &list);
+ while (list)
+ clear_commit_marks_1(&list, pop_commit(&list), mark);
+}
+
void clear_commit_marks_for_object_array(struct object_array *a, unsigned mark)
{
struct object *object;
diff --git a/revision.c b/revision.c
index 8764dde..7cc72fc 100644
--- a/revision.c
+++ b/revision.c
@@ -139,11 +139,32 @@ void mark_tree_uninteresting(struct tree *tree)
void mark_parents_uninteresting(struct commit *commit)
{
- struct commit_list *parents = commit->parents;
+ struct commit_list *parents = NULL, *l;
+
+ for (l = commit->parents; l; l = l->next)
+ commit_list_insert(l->item, &parents);
while (parents) {
struct commit *commit = parents->item;
- if (!(commit->object.flags & UNINTERESTING)) {
+ l = parents;
+ parents = parents->next;
+ free(l);
+
+ while (commit) {
+ /*
+ * A missing commit is ok iff its parent is marked
+ * uninteresting.
+ *
+ * We just mark such a thing parsed, so that when
+ * it is popped next time around, we won't be trying
+ * to parse it and get an error.
+ */
+ if (!has_sha1_file(commit->object.sha1))
+ commit->object.parsed = 1;
+
+ if (commit->object.flags & UNINTERESTING)
+ break;
+
commit->object.flags |= UNINTERESTING;
/*
@@ -154,21 +175,13 @@ void mark_parents_uninteresting(struct commit *commit)
* wasn't uninteresting), in which case we need
* to mark its parents recursively too..
*/
- if (commit->parents)
- mark_parents_uninteresting(commit);
- }
+ if (!commit->parents)
+ break;
- /*
- * A missing commit is ok iff its parent is marked
- * uninteresting.
- *
- * We just mark such a thing parsed, so that when
- * it is popped next time around, we won't be trying
- * to parse it and get an error.
- */
- if (!has_sha1_file(commit->object.sha1))
- commit->object.parsed = 1;
- parents = parents->next;
+ for (l = commit->parents->next; l; l = l->next)
+ commit_list_insert(l->item, &parents);
+ commit = commit->parents->item;
+ }
}
}
--
1.7.3.1.256.g2539c.dirty
^ permalink raw reply related
* [PATCH v2 3/3] index-pack: eliminate unlimited recursion in get_delta_base()
From: Nguyễn Thái Ngọc Duy @ 2012-01-09 3:59 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Shawn O. Pearce,
Nguyễn Thái Ngọc Duy
In-Reply-To: <1324901080-23215-1-git-send-email-pclouds@gmail.com>
Revert the order of delta applying so that by the time a delta is
applied, its base is either non-delta or already inflated.
get_delta_base() is still recursive, but because base's data is always
ready, the inner get_delta_base() call never has any chance to call
itself again.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
builtin/index-pack.c | 30 +++++++++++++++++++++---------
1 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 38ff03a..8c1f5d9 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -519,10 +519,25 @@ static void *get_base_data(struct base_data *c)
{
if (!c->data) {
struct object_entry *obj = c->obj;
+ struct base_data **delta = NULL;
+ int delta_nr = 0, delta_alloc = 0;
- if (is_delta_type(obj->type)) {
- void *base = get_base_data(c->base);
- void *raw = get_data_from_pack(obj);
+ for (; is_delta_type(c->obj->type); c = c->base) {
+ ALLOC_GROW(delta, delta_nr + 1, delta_alloc);
+ delta[delta_nr++] = c;
+ }
+ if (!delta_nr) {
+ c->data = get_data_from_pack(obj);
+ c->size = obj->size;
+ base_cache_used += c->size;
+ prune_base_data(c);
+ }
+ for (; delta_nr > 0; delta_nr--) {
+ void *base, *raw;
+ c = delta[delta_nr - 1];
+ obj = c->obj;
+ base = get_base_data(c->base);
+ raw = get_data_from_pack(obj);
c->data = patch_delta(
base, c->base->size,
raw, obj->size,
@@ -530,13 +545,10 @@ static void *get_base_data(struct base_data *c)
free(raw);
if (!c->data)
bad_object(obj->idx.offset, "failed to apply delta");
- } else {
- c->data = get_data_from_pack(obj);
- c->size = obj->size;
+ base_cache_used += c->size;
+ prune_base_data(c);
}
-
- base_cache_used += c->size;
- prune_base_data(c);
+ free(delta);
}
return c->data;
}
--
1.7.3.1.256.g2539c.dirty
^ permalink raw reply related
* Re: SVN -> Git *but* with special changes
From: Michael Haggerty @ 2012-01-09 8:26 UTC (permalink / raw)
To: Abscissa; +Cc: git
In-Reply-To: <1326061722334-7165979.post@n2.nabble.com>
On 01/08/2012 11:28 PM, Abscissa wrote:
> In answer to someone's question, yea, it's Ubuntu (Kubuntu 10.04, and yea, I
> know that's old, but it's not my primary system and I haven't had a chance
> yet to upgrade it and get everything set back up again). I also tried it on
> a Debian 6 Live/Persistent system and got the same results...apparently for
> the same reason.
For Ubuntu users: there is a git PPA [1] which usually has quite
up-to-date git packages for recent Ubuntu releases. If you configure
your system to use this PPA (instructions are on the page) then you can
stay up-to-date with minimal effort. Currently they have version
1.7.8.2 available for hardy, lucid, maverick, natty, and oneiric and
older versions for some other Ubuntu releases.
Caveat: I am not affiliated with the PPA and cannot vouch for its integrity.
Michael
[1] https://launchpad.net/~git-core/+archive/ppa
--
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
^ permalink raw reply
* Mark and protect local commits?
From: norbert.nemec @ 2012-01-09 8:29 UTC (permalink / raw)
To: git
Hi there,
I have often wished that there were ways to
a) protect certain commits from leaving the local repository
b) mark commits that have already left the local repository
To be more specific:
a) Sometimes, I try out certain experimental features and want to make
sure they don't accidentally end up out in the wild. If there were a
flag to explicitly mark them "private", any non-local operation (push,
pull, etc) on these commits could create an error message.
b) For history-rewriting operations, it is important to know which
commits are out in the wild and which are not. In a "push"-setup working
copy, git should be able to keep track of this. Any newly created commit
would be marked as "unpublished" and the mark would be removed when the
commit is pushed. Any history-rewriting would be prevented on published
commits.
Has anyone else thought along these lines?
Greetings,
Norbert
^ permalink raw reply
* Re: [PATCH] rebase --fix: interactive fixup mode
From: Jonathan Nieder @ 2012-01-09 8:43 UTC (permalink / raw)
To: Nguyen Thai Ngoc Duy; +Cc: Clemens Buchacher, git, Junio C Hamano
In-Reply-To: <CACsJy8CKK0EAy79Fahi64bUw2kfr=eunegbeA7oX_XaXEBFr2g@mail.gmail.com>
Nguyen Thai Ngoc Duy wrote:
> Is something like this over-generalized?
>
> http://kerneltrap.org/mailarchive/git/2010/12/24/47502
Yes, I suspect that at the moment (i.e., in the absence of a large
collection of examples to show their utility), both your ^{~custom}
and my ^{first:rev-list args} are overengineered, and that they do
something that is more clearly expressed using the shell's command
substitution feature:
git rebase -i $(git rev-list --merges HEAD | head -1)
So why did I suggest it?
I guess I was reacting to the implementation of the
rebase-recent-commits command. I understand that it was a sketch, but
it felt a little ad hoc. If it could be expressed as a clean
two-liner, I would be more comfortable since the burden of maintaining
it would be less.
Thanks for clarifying.
Sincerely,
Jonathan
^ permalink raw reply
* Re: [PATCH] rebase --fix: interactive fixup mode
From: Michael Haggerty @ 2012-01-09 8:40 UTC (permalink / raw)
To: Clemens Buchacher; +Cc: git, Junio C Hamano
In-Reply-To: <20120108213134.GA18671@ecki.lan>
On 01/08/2012 10:31 PM, Clemens Buchacher wrote:
> Interactive rebase is frequently used not to rebase history, but to
> manipulate recent commits. This is typically done using the following
> command:
>
> git rebase -i HEAD~N
>
> Where N has to be large enough such that the the range HEAD~N..HEAD
> contains the desired commits. At the same time, it should be small
> enough such that the range HEAD~N..HEAD does not include published
> commits or a merge commit. Otherwise, the user may accidentally change
> published history. Rebasing a merge commit can also have the generally
> undesirable effect of linearizing the merge history.
>
> In order to determine a suitable range automatically, it is a reasonable
> heuristic to rebase onto the most recent merge commit. It does not
> guarantee that published commits are not included -- indeed there is no
> way to do that. But, the range is usually large enough to contain the
> desired commits. Also, this mechanism works regardless of whether or not
> branch tracking has been configured.
>
> So instead of the above command, one can instead use the following:
>
> git rebase --fix
Two comments:
* The name "--fix" might be confusing because of its similarity to the
"fixup" command that can be specified in the interactive instructions file.
* I agree with you that "interactive rebase is frequently used not to
rebase history, but to manipulate recent commits". In fact, I use
interactive rebase *only* for manipulating recent commits and
non-interactive rebase *only* for changing commits' ancestry. I think
it is a good idea to make these two uses more distinct. For example, it
makes me nervous that I might mis-type the <upstream> parameter when I
am trying to touch up commits and end up inadvertently rebasing the
commits onto a new parent.
Michael
--
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
^ permalink raw reply
* Re: [PATCH] rebase --fix: interactive fixup mode
From: Thomas Rast @ 2012-01-09 9:13 UTC (permalink / raw)
To: Clemens Buchacher; +Cc: git, Junio C Hamano
In-Reply-To: <20120108213134.GA18671@ecki.lan>
Clemens Buchacher <drizzd@aon.at> writes:
> Interactive rebase is frequently used not to rebase history, but to
> manipulate recent commits. This is typically done using the following
> command:
>
> git rebase -i HEAD~N
>
> Where N has to be large enough such that the the range HEAD~N..HEAD
> contains the desired commits. At the same time, it should be small
> enough such that the range HEAD~N..HEAD does not include published
> commits or a merge commit.
[...]
> git rebase --fix
>
> By default, the range is limited to a maximum of 20 commits.
Given the name I would expect --fix to rebase far enough to make recent
fixup!/squash! commits take effect. Perhaps name it --recent?
(And I also think that the 20 is rather arbitrary...)
--
Thomas Rast
trast@{inf,student}.ethz.ch
^ permalink raw reply
* Re: [PATCH] git-gui: fix selection regression introduced in a8ca786991
From: Bert Wesarg @ 2012-01-09 9:28 UTC (permalink / raw)
To: Pat Thoyts; +Cc: git, Bert Wesarg, Shawn O. Pearce
In-Reply-To: <14628854a651ab0202e3f82be9b245331cf9029a.1325965254.git.bert.wesarg@googlemail.com>
Hi,
On Sat, Jan 7, 2012 at 20:43, Bert Wesarg <bert.wesarg@googlemail.com> wrote:
> While fixing the problem from a8ca786991, it introduces a regression
> regarding what happen after the multi selected file operation (ie.
> one of Ctrl-{T,U,J}) because the next selected file could not be handled
> by such a subsequent file operation.
>
> The right way is to move the fix from this commit down into the show_diff
> function. So that all code path add the current diff path to the list of
> selections.
>
> This also simplifies helper functions for these operatione which needed
> to handle the case whether there is only the current diff path or also
> a selction.
I think we need to think this more through, especially with input from
Shawn, please.
I have now find out, that git-gui has two selections in the file
lists. The first is that for the current path for what we show the
diff (the tag for this is called 'in_diff') and the the second is that
for the current list of paths which are selected ('in_sel'). The file
list operations 'staging', 'reverting', 'unstaging', work either on
'in_sel'; if that is not empty, or on 'in_diff'. The problem I've now
realized is, that these two selections share the same visual hints,
ie. a lightgray background.
The problem I tried to solve in a8ca786991 was, that adding paths to
the selection with Ctrl-Button-1 or Shift-cutton-1, didn't included
the current diff path in the subsequent file list operation. But I
would have expected it, because it was visual in the 'selection'.
My current 'workaround' is to make the two selections visually
distinguishable (and reverting a8ca786991), by using a different
background color for the 'in_sel' tag and also the italic font, so
that it is still possible to see whether the current diff path is in
the selection or not:
@@ -717,11 +717,11 @@ proc tk_optionMenu {w varName args} {
proc rmsel_tag {text} {
$text tag conf sel \
-background [$text cget -background] \
-foreground [$text cget -foreground] \
-borderwidth 0
- $text tag conf in_sel -background lightgray
+ $text tag conf in_sel -background SlateGray1 -font font_diffitalic
bind $text <Motion> break
return $text
}
wm withdraw .
@@ -3557,11 +3557,11 @@ if {$use_ttk} {
.vpane.files add .vpane.files.index -sticky news
}
foreach i [list $ui_index $ui_workdir] {
rmsel_tag $i
- $i tag conf in_diff -background [$i tag cget in_sel -background]
+ $i tag conf in_diff -background lightgray
}
unset i
set files_ctxm .vpane.files.ctxm
menu $files_ctxm -tearoff 0
I'm not very pleased with this, but at least it is now possible to
visual recognize what files will be handled by a subsequent file list
operation.
Any input is more than welcome.
Regards,
Bert
^ permalink raw reply
* Re: Mark and protect local commits?
From: Michael Haggerty @ 2012-01-09 9:55 UTC (permalink / raw)
To: norbert.nemec; +Cc: git
In-Reply-To: <jee8ii$6ft$1@dough.gmane.org>
On 01/09/2012 09:29 AM, norbert.nemec wrote:
> I have often wished that there were ways to
>
> a) protect certain commits from leaving the local repository
>
> b) mark commits that have already left the local repository
>
>
> To be more specific:
>
> a) Sometimes, I try out certain experimental features and want to make
> sure they don't accidentally end up out in the wild. If there were a
> flag to explicitly mark them "private", any non-local operation (push,
> pull, etc) on these commits could create an error message.
In Subversion we solved this problem by having a local convention that
the central server forbids the commit of any files containing the magic
string "@@@". This was enforced by a (server-side) pre-commit hook.
This allows developers to mark local hacks (e.g., debugging printfs)
with a comment containing the magic string, and Subversion would help
prevent them from committing that code accidentally. This feature is
popular with developers.
One subtlety is that you don't want to enforce the file-contents check
on *every* file because the magic string could appear by chance in some
kind of binary file. We used svn properties to tell the system on which
files to enforce the constraints.
When we started using git-svn, we added a second (server-side) check:
that the magic string is not allowed in the commit message. That way,
debugging commits can be made to the local git-svn-managed git
repository but prevented from being "pushed" to Subversion.
We have implemented something similar for git on the client side, using
.gitattributes for its configuration. But this is not quite the same.
When using pure git, there are cases when you want local commits that
contain the forbidden string, but to prevent those commits from being
pushed. For this, a server-side pre-update hook would be needed. This,
in turn, has the technical problem that until recently .gitattributes
were effectively unusable on the server. So we haven't yet implemented
the analogous server-side hooks.
An alternative would be to have some kind of "pre-push" hook which could
carry out similar checks on the client. This would allow individuals to
implement their own policy without requiring the central project to have
a pre-commit hook. I don't believe that there is currently any such hook.
> b) For history-rewriting operations, it is important to know which
> commits are out in the wild and which are not. In a "push"-setup working
> copy, git should be able to keep track of this. Any newly created commit
> would be marked as "unpublished" and the mark would be removed when the
> commit is pushed. Any history-rewriting would be prevented on published
> commits.
This would be convenient, too.
Michael
--
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
^ permalink raw reply
* [patch] gitignore: warn about pointless syntax
From: Jan Engelhardt @ 2012-01-09 11:34 UTC (permalink / raw)
To: git
parent eac2d83247ea0a265d923518c26873bb12c33778 (v1.7.9-rc0)
commit b629bde461aeb178b257ab7e0f6c180f69f98cb0
Author: Jan Engelhardt <jengelh@medozas.de>
Date: Mon Jan 9 12:30:07 2012 +0100
gitignore: warn about pointless syntax
Add a warning to the gitignore parser if it sees "**". Git, using
fnmatch, does not consider the double-asterisk anything special like
rsync/zsh. Remind users of that, since too many seem to be Doing It
Wrong™.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
dir.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/dir.c b/dir.c
index 0a78d00..60f65cb 100644
--- a/dir.c
+++ b/dir.c
@@ -376,6 +376,15 @@ void free_excludes(struct exclude_list *el)
el->excludes = NULL;
}
+static inline void check_bogus_wildcard(const char *file, const char *p)
+{
+ if (strstr(p, "**") == NULL)
+ return;
+ warning(_("Pattern \"%s\" from file \"%s\": Double asterisk does not "
+ "have a special meaning and is interpreted just like a single "
+ "asterisk.\n"), file, p);
+}
+
int add_excludes_from_file_to_list(const char *fname,
const char *base,
int baselen,
@@ -427,6 +436,7 @@ int add_excludes_from_file_to_list(const char *fname,
if (buf[i] == '\n') {
if (entry != buf + i && entry[0] != '#') {
buf[i - (i && buf[i-1] == '\r')] = 0;
+ check_bogus_wildcard(fname, entry);
add_exclude(entry, base, baselen, which);
}
entry = buf + i + 1;
--
# Created with git-export-patch
^ permalink raw reply related
* [linux.conf.au] VCS Interoperability
From: David Michael Barr @ 2012-01-09 12:30 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Jonathan Nieder, Dmitry Ivankov,
Ramkumar Ramachandra
Hi there good folk of the git community,
Next week, I'll be presenting a summary of the past 2 years work
on improving svn interoperability for git.
I'm requesting feedback from anyone who cares with regard to
what they'd like to hear about.
http://linux.conf.au/schedule/158/view_talk?day=friday
Jonathan put together an overview for Dmitry in preparation for
Google Summer of Code 2011:
svn-fe is very young, so a sufficiently bored person (meaning: I am
not advocating that you do this; this is just an excuse to provide
references to avoid getting stuck when you have questions) could
probably read its history in full without getting lost. Here are some
references on the initial design (i.e., how responsibility is divided
between the svndump driver and repo_tree and fast_export modules).
The division of responsibilities between modules mostly survives,
while the details of mechanism are quite different now.
announcement and following thread:
http://thread.gmane.org/gmane.comp.version-control.git/143180/focus=143388
http://thread.gmane.org/gmane.comp.version-control.git/143187
first public review (not much big picture stuff yet):
http://thread.gmane.org/gmane.comp.version-control.git/147587
second review (focuses on infrastructure, most of which is
obsolete now :))
http://thread.gmane.org/gmane.comp.version-control.git/148409
third review (some serious thoughts about design begin here)
http://thread.gmane.org/gmane.comp.version-control.git/148866/focus=149097
fourth review (with a program to test with based on David's original
program; review mentions some unresolved wishes: appropriate
incremental import bookkeeping, properties, empty directories)
http://thread.gmane.org/gmane.comp.version-control.git/149571/focus=149934
fifth review, which is the one that stuck.
http://thread.gmane.org/gmane.comp.version-control.git/151086/focus=151144
Also of note is the contributions made by Ram in 2010 that eventually
became a headlining feature for Subversion 1.7:
http://subversion.apache.org/docs/release-notes/1.7.html#svnrdump
Dmitry ended up submitting a number of short and pointy series.
My favourite by far was:
fast-import: improve deltas for blobs
http://thread.gmane.org/gmane.comp.version-control.git/179774
This optimisation was glaring in hindsight.
Respect to Dmitry for spotting it.
I believe a number of people have been contributing to the
remote helper infrastructure lately. They also deserve credit.
Maybe a better historian than myself can provide additional links.
The overhanging issue after all this work is that there are about
95 outstanding patches waiting to be detangled and resubmitted.
I regret not having time to complete this exercise myself.
I hope the process has been insightful and maybe to renew some
interest. Thanks for reading.
--
David Barr
^ permalink raw reply
* [PATCH 2/2] git-gui: fix applying line/ranges when the selection ends at the begin of a line
From: Bert Wesarg @ 2012-01-09 13:43 UTC (permalink / raw)
To: Pat Thoyts; +Cc: git, Bert Wesarg
In-Reply-To: <cccd6193cf3bfe170e14270204d735a842bb8563.1326116492.git.bert.wesarg@googlemail.com>
Selecting also the trailing newline of a line for staging/unstaging would
have resulted in also staging/unstaging of the next line.
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
lib/diff.tcl | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/lib/diff.tcl b/lib/diff.tcl
index 63f8742..a750ea7 100644
--- a/lib/diff.tcl
+++ b/lib/diff.tcl
@@ -632,7 +632,13 @@ proc apply_range_or_line {x y} {
}
set first_l [$ui_diff index "$first linestart"]
- set last_l [$ui_diff index "$last lineend"]
+ # don't include the next line if $last points to the start of a line
+ # ie. <lno>.0
+ if {[lindex [split $last .] 1] == 0} {
+ set last_l [$ui_diff index "$last -1 line lineend"]
+ } else {
+ set last_l [$ui_diff index "$last lineend"]
+ }
if {$current_diff_path eq {} || $current_diff_header eq {}} return
if {![lock_index apply_hunk]} return
--
1.7.8.1.873.gfea665
^ permalink raw reply related
* [PATCH 1/1] git-gui: fix hunk parsing for corner case changes
From: Bert Wesarg @ 2012-01-09 13:43 UTC (permalink / raw)
To: Pat Thoyts; +Cc: git, Bert Wesarg
The simple hunk parsing code did not recognize hunks when there is no
second number after the comma. Like in these cases:
@@ -1 +0,0 @@
-1
Which resulted in this hunk header:
@@ -1 +0,1 +1 +0,0 @@
Or:
@@ -1 +1 @@
-1
+2
Resulted in:
@@ -1 +1 @@
,1 +1 +1 @@
,0 @@
While trying to stage only the '-1' line.
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
lib/diff.tcl | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/lib/diff.tcl b/lib/diff.tcl
index ec44055..63f8742 100644
--- a/lib/diff.tcl
+++ b/lib/diff.tcl
@@ -672,9 +672,11 @@ proc apply_range_or_line {x y} {
# $i_l is now at the beginning of a line
# pick start line number from hunk header
- set hh [$ui_diff get $i_l "$i_l + 1 lines"]
- set hh [lindex [split $hh ,] 0]
- set hln [lindex [split $hh -] 1]
+ if {![regexp {^@@ -(\d+)(?:,\d+)? \+(?:\d+)(?:,\d+)? @@(?:\s|$)} \
+ [$ui_diff get $i_l "$i_l + 1 lines"] hh hln]} {
+ unlock_index
+ return
+ }
# There is a special situation to take care of. Consider this
# hunk:
--
1.7.8.1.873.gfea665
^ permalink raw reply related
* [RFC/PATCH 3/3] git-gui: support for reverting hunks and lines
From: Bert Wesarg @ 2012-01-09 13:43 UTC (permalink / raw)
To: Pat Thoyts; +Cc: git, Bert Wesarg
In-Reply-To: <cccd6193cf3bfe170e14270204d735a842bb8563.1326116492.git.bert.wesarg@googlemail.com>
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
git-gui.sh | 106 +++++++++++++++++++++++++++++++++++++++------------------
lib/diff.tcl | 23 ++++++++++---
2 files changed, 90 insertions(+), 39 deletions(-)
diff --git a/git-gui.sh b/git-gui.sh
index ba4e5c1..955cbf8 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -3289,36 +3289,35 @@ pack .vpane.lower.commarea.buffer -side left -fill y
# -- Commit Message Buffer Context Menu
#
-set ctxm .vpane.lower.commarea.buffer.ctxm
-menu $ctxm -tearoff 0
-$ctxm add command \
+set ui_comm_ctxm .vpane.lower.commarea.buffer.ctxm
+menu $ui_comm_ctxm -tearoff 0
+$ui_comm_ctxm add command \
-label [mc Cut] \
-command {tk_textCut $ui_comm}
-$ctxm add command \
+$ui_comm_ctxm add command \
-label [mc Copy] \
-command {tk_textCopy $ui_comm}
-$ctxm add command \
+$ui_comm_ctxm add command \
-label [mc Paste] \
-command {tk_textPaste $ui_comm}
-$ctxm add command \
+$ui_comm_ctxm add command \
-label [mc Delete] \
-command {catch {$ui_comm delete sel.first sel.last}}
-$ctxm add separator
-$ctxm add command \
+$ui_comm_ctxm add separator
+$ui_comm_ctxm add command \
-label [mc "Select All"] \
-command {focus $ui_comm;$ui_comm tag add sel 0.0 end}
-$ctxm add command \
+$ui_comm_ctxm add command \
-label [mc "Copy All"] \
-command {
$ui_comm tag add sel 0.0 end
tk_textCopy $ui_comm
$ui_comm tag remove sel 0.0 end
}
-$ctxm add separator
-$ctxm add command \
+$ui_comm_ctxm add separator
+$ui_comm_ctxm add command \
-label [mc "Sign Off"] \
-command do_signoff
-set ui_comm_ctxm $ctxm
# -- Diff Header
#
@@ -3366,9 +3365,9 @@ tlabel .vpane.lower.diff.header.path \
pack .vpane.lower.diff.header.status -side left
pack .vpane.lower.diff.header.file -side left
pack .vpane.lower.diff.header.path -fill x
-set ctxm .vpane.lower.diff.header.ctxm
-menu $ctxm -tearoff 0
-$ctxm add command \
+set hctxm .vpane.lower.diff.header.ctxm
+menu $hctxm -tearoff 0
+$hctxm add command \
-label [mc Copy] \
-command {
clipboard clear
@@ -3377,8 +3376,8 @@ $ctxm add command \
-type STRING \
-- $current_diff_path
}
-lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
-bind_button3 .vpane.lower.diff.header.path "tk_popup $ctxm %X %Y"
+lappend diff_actions [list $hctxm entryconf [$hctxm index last] -state]
+bind_button3 .vpane.lower.diff.header.path "tk_popup $hctxm %X %Y"
# -- Diff Body
#
@@ -3491,29 +3490,61 @@ proc create_common_diff_popup {ctxm} {
-command do_options
}
-set ctxm .vpane.lower.diff.body.ctxm
-menu $ctxm -tearoff 0
-$ctxm add command \
+set ctxmw .vpane.lower.diff.body.ctxmw
+menu $ctxmw -tearoff 0
+$ctxmw add command \
-label [mc "Apply/Reverse Hunk"] \
-command {apply_hunk $cursorX $cursorY}
-set ui_diff_applyhunk [$ctxm index last]
-lappend diff_actions [list $ctxm entryconf $ui_diff_applyhunk -state]
-$ctxm add command \
+set ui_diff_applyhunk [$ctxmw index last]
+lappend diff_actions [list $ctxmw entryconf $ui_diff_applyhunk -state]
+$ctxmw add command \
-label [mc "Apply/Reverse Line"] \
-command {apply_range_or_line $cursorX $cursorY; do_rescan}
-set ui_diff_applyline [$ctxm index last]
-lappend diff_actions [list $ctxm entryconf $ui_diff_applyline -state]
-$ctxm add separator
-$ctxm add command \
+set ui_diff_applyline [$ctxmw index last]
+lappend diff_actions [list $ctxmw entryconf $ui_diff_applyline -state]
+$ctxmw add separator
+$ctxmw add command \
+ -label [mc "Revert Hunk"] \
+ -command {apply_hunk $cursorX $cursorY 1}
+lappend diff_actions [list $ctxmw entryconf $ui_diff_applyhunk -state]
+$ctxmw add command \
+ -label [mc "Revert Line"] \
+ -command {apply_range_or_line $cursorX $cursorY 1; do_rescan}
+set ui_diff_revertline [$ctxmw index last]
+lappend diff_actions [list $ctxmw entryconf $ui_diff_applyline -state]
+$ctxmw add separator
+$ctxmw add command \
-label [mc "Show Less Context"] \
-command show_less_context
-lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
-$ctxm add command \
+lappend diff_actions [list $ctxmw entryconf [$ctxmw index last] -state]
+$ctxmw add command \
-label [mc "Show More Context"] \
-command show_more_context
-lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
-$ctxm add separator
-create_common_diff_popup $ctxm
+lappend diff_actions [list $ctxmw entryconf [$ctxmw index last] -state]
+$ctxmw add separator
+create_common_diff_popup $ctxmw
+
+set ctxmi .vpane.lower.diff.body.ctxmi
+menu $ctxmi -tearoff 0
+$ctxmi add command \
+ -label [mc "Apply/Reverse Hunk"] \
+ -command {apply_hunk $cursorX $cursorY}
+lappend diff_actions [list $ctxmi entryconf $ui_diff_applyhunk -state]
+$ctxmi add command \
+ -label [mc "Apply/Reverse Line"] \
+ -command {apply_range_or_line $cursorX $cursorY; do_rescan}
+lappend diff_actions [list $ctxmi entryconf $ui_diff_applyline -state]
+$ctxmi add separator
+$ctxmi add command \
+ -label [mc "Show Less Context"] \
+ -command show_less_context
+lappend diff_actions [list $ctxmi entryconf [$ctxmi index last] -state]
+$ctxmi add command \
+ -label [mc "Show More Context"] \
+ -command show_more_context
+lappend diff_actions [list $ctxmi entryconf [$ctxmi index last] -state]
+$ctxmi add separator
+create_common_diff_popup $ctxmi
set ctxmmg .vpane.lower.diff.body.ctxmmg
menu $ctxmmg -tearoff 0
@@ -3581,7 +3612,7 @@ proc has_textconv {path} {
}
}
-proc popup_diff_menu {ctxm ctxmmg ctxmsm x y X Y} {
+proc popup_diff_menu {ctxmw ctxmi ctxmmg ctxmsm x y X Y} {
global current_diff_path file_states
set ::cursorX $x
set ::cursorY $y
@@ -3597,6 +3628,7 @@ proc popup_diff_menu {ctxm ctxmmg ctxmsm x y X Y} {
} else {
set has_range [expr {[$::ui_diff tag nextrange sel 0.0] != {}}]
if {$::ui_index eq $::current_diff_side} {
+ set ctxm $ctxmi
set l [mc "Unstage Hunk From Commit"]
if {$has_range} {
set t [mc "Unstage Lines From Commit"]
@@ -3604,11 +3636,14 @@ proc popup_diff_menu {ctxm ctxmmg ctxmsm x y X Y} {
set t [mc "Unstage Line From Commit"]
}
} else {
+ set ctxm $ctxmw
set l [mc "Stage Hunk For Commit"]
if {$has_range} {
set t [mc "Stage Lines For Commit"]
+ set r [mc "Revert Lines"]
} else {
set t [mc "Stage Line For Commit"]
+ set r [mc "Revert Line"]
}
}
if {$::is_3way_diff
@@ -3624,10 +3659,13 @@ proc popup_diff_menu {ctxm ctxmmg ctxmsm x y X Y} {
}
$ctxm entryconf $::ui_diff_applyhunk -state $s -label $l
$ctxm entryconf $::ui_diff_applyline -state $s -label $t
+ if {$::ui_workdir eq $::current_diff_side} {
+ $ctxm entryconf $::ui_diff_revertline -state $s -label $r
+ }
tk_popup $ctxm $X $Y
}
}
-bind_button3 $ui_diff [list popup_diff_menu $ctxm $ctxmmg $ctxmsm %x %y %X %Y]
+bind_button3 $ui_diff [list popup_diff_menu $ctxmw $ctxmi $ctxmmg $ctxmsm %x %y %X %Y]
# -- Status Bar
#
diff --git a/lib/diff.tcl b/lib/diff.tcl
index a750ea7..83e6f6a 100644
--- a/lib/diff.tcl
+++ b/lib/diff.tcl
@@ -544,7 +544,7 @@ proc read_diff {fd conflict_size cont_info} {
}
}
-proc apply_hunk {x y} {
+proc apply_hunk {x y {revert 0}} {
global current_diff_path current_diff_header current_diff_side
global ui_diff ui_index file_states
@@ -561,7 +561,12 @@ proc apply_hunk {x y} {
return
}
} else {
- set failed_msg [mc "Failed to stage selected hunk."]
+ if {$revert} {
+ set failed_msg [mc "Failed to revert selected hunk."]
+ set apply_cmd {apply --reverse --whitespace=nowarn}
+ } else {
+ set failed_msg [mc "Failed to stage selected hunk."]
+ }
if {[string index $mi 1] ne {M}} {
unlock_index
return
@@ -604,6 +609,8 @@ proc apply_hunk {x y} {
if {$current_diff_side eq $ui_index} {
set mi ${o}M
+ } elseif {$revert} {
+ set mi "[string index $mi 0]$o"
} elseif {[string index $mi 0] eq {_}} {
set mi M$o
} else {
@@ -617,7 +624,7 @@ proc apply_hunk {x y} {
}
}
-proc apply_range_or_line {x y} {
+proc apply_range_or_line {x y {revert 0}} {
global current_diff_path current_diff_header current_diff_side
global ui_diff ui_index file_states
@@ -654,8 +661,14 @@ proc apply_range_or_line {x y} {
return
}
} else {
- set failed_msg [mc "Failed to stage selected line."]
- set to_context {-}
+ if {$revert} {
+ set failed_msg [mc "Failed to revert selected line."]
+ set apply_cmd {apply --reverse --whitespace=nowarn}
+ set to_context {+}
+ } else {
+ set failed_msg [mc "Failed to stage selected line."]
+ set to_context {-}
+ }
if {[string index $mi 1] ne {M}} {
unlock_index
return
--
1.7.8.1.873.gfea665
^ permalink raw reply related
* Re: [patch] gitignore: warn about pointless syntax
From: Thomas Rast @ 2012-01-09 13:44 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: git
In-Reply-To: <alpine.LNX.2.01.1201091233050.28805@frira.zrqbmnf.qr>
Jan Engelhardt <jengelh@medozas.de> writes:
> parent eac2d83247ea0a265d923518c26873bb12c33778 (v1.7.9-rc0)
> commit b629bde461aeb178b257ab7e0f6c180f69f98cb0
> Author: Jan Engelhardt <jengelh@medozas.de>
> Date: Mon Jan 9 12:30:07 2012 +0100
>
> gitignore: warn about pointless syntax
[...]
> --
> # Created with git-export-patch
Are you the author of this tool? The format is bogus in so far as it
causes git-am to insert the above lines into the git commit message, as
in:
$ git am -3 < gitignore-patch.mbox
Applying: gitignore: warn about pointless syntax
$ git show
commit 59bea4d9a1de3b3b9c0139de4298ffd9d9431457
Author: Jan Engelhardt <jengelh@medozas.de>
Date: Mon Jan 9 12:34:12 2012 +0100
gitignore: warn about pointless syntax
parent eac2d83247ea0a265d923518c26873bb12c33778 (v1.7.9-rc0)
commit b629bde461aeb178b257ab7e0f6c180f69f98cb0
Author: Jan Engelhardt <jengelh@medozas.de>
Date: Mon Jan 9 12:30:07 2012 +0100
gitignore: warn about pointless syntax
[...]
So using this tool over format-patch is just a pointless cause of manual
fixup work.
--
Thomas Rast
trast@{inf,student}.ethz.ch
^ permalink raw reply
* Re: submodule add -f errs on un-ignored path
From: Thomas Rast @ 2012-01-09 15:40 UTC (permalink / raw)
To: Neal Kreitzinger; +Cc: git
In-Reply-To: <jeaip7$meo$1@dough.gmane.org>
"Neal Kreitzinger" <neal@rsss.com> writes:
> $ git submodule add -f file:///home/me/super/Images.git WebPortal/Images
> Usage: git submodule [--quiet] add [-b branch] [--reference <repository>] [--] repository [<path>]
AFAICT this works since 1.7.2 (d27b876 to be precise). Before that the
-f option didn't exist, and wasn't in the docs either.
--
Thomas Rast
trast@{inf,student}.ethz.ch
^ permalink raw reply
* [PATCH] gitignore: warn about pointless syntax
From: Jan Engelhardt @ 2012-01-09 15:40 UTC (permalink / raw)
To: git; +Cc: trast
In-Reply-To: <1326123647-18352-1-git-send-email-jengelh@medozas.de>
Add a warning to the gitignore parser if it sees "**". Git, using
fnmatch, does not consider the double-asterisk anything special like
rsync/zsh. Remind users of that, since too many seem to be Doing It
Wrong™.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
dir.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/dir.c b/dir.c
index 0a78d00..60f65cb 100644
--- a/dir.c
+++ b/dir.c
@@ -376,6 +376,15 @@ void free_excludes(struct exclude_list *el)
el->excludes = NULL;
}
+static inline void check_bogus_wildcard(const char *file, const char *p)
+{
+ if (strstr(p, "**") == NULL)
+ return;
+ warning(_("Pattern \"%s\" from file \"%s\": Double asterisk does not "
+ "have a special meaning and is interpreted just like a single "
+ "asterisk.\n"), file, p);
+}
+
int add_excludes_from_file_to_list(const char *fname,
const char *base,
int baselen,
@@ -427,6 +436,7 @@ int add_excludes_from_file_to_list(const char *fname,
if (buf[i] == '\n') {
if (entry != buf + i && entry[0] != '#') {
buf[i - (i && buf[i-1] == '\r')] = 0;
+ check_bogus_wildcard(fname, entry);
add_exclude(entry, base, baselen, which);
}
entry = buf + i + 1;
--
1.7.7
^ permalink raw reply related
* gitignore warn about ** submission
From: Jan Engelhardt @ 2012-01-09 15:40 UTC (permalink / raw)
To: git; +Cc: trast
The following changes since commit eac2d83247ea0a265d923518c26873bb12c33778:
Git 1.7.9-rc0 (2012-01-06 12:51:09 -0800)
are available in the git repository at:
git://dev.medozas.de/git master
Jan Engelhardt (1):
gitignore: warn about pointless syntax
dir.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
^ permalink raw reply
* Re: [PATCH] gitignore: warn about pointless syntax
From: Jeff King @ 2012-01-09 16:28 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: git, trast
In-Reply-To: <1326123647-18352-2-git-send-email-jengelh@medozas.de>
On Mon, Jan 09, 2012 at 04:40:47PM +0100, Jan Engelhardt wrote:
> +static inline void check_bogus_wildcard(const char *file, const char *p)
> +{
> + if (strstr(p, "**") == NULL)
> + return;
> + warning(_("Pattern \"%s\" from file \"%s\": Double asterisk does not "
> + "have a special meaning and is interpreted just like a single "
> + "asterisk.\n"), file, p);
Wouldn't this also match the meaningful "foo\**"?
-Peff
^ permalink raw reply
* [RFC][PATCH v2] git on Mac OS and precomposed unicode
From: Torsten Bögershausen @ 2012-01-09 16:45 UTC (permalink / raw)
To: git; +Cc: tboegi
Changes since last version:
- Improved testcase t/t3910-mac-os-precompose.sh:
test "git commit -- pathspec" (Thanks Junio)
- Improved the converting of argv[] for "git commit"
===============
Purpose:
This patch is a suggestion to work around the unpleasenties
when Mac OS is decomposing unicode filenames.
The suggested change:
a) is only used under Mac OS
b) can be switched off by a configuration variable
c) is optimized to handle ASCII only filename
d) will improve the interwork between Mac OS, Linux and Windows*
via git push/pull, using USB sticks (technically speaking VFAT)
or mounted network shares using samba.
* (Not all Windows versions support UTF-8 yet:
Msysgit needs the unicode branch, cygwin supports UTF-8 since 1.7)
Runtime configuration:
A new confguration variable is added: "core.precomposedunicode"
This variable is only used on Mac OS.
If set to false, git behaves exactly as older versions of git.
When a new git version is installed and there is a repository
where the configuration "core.precomposedunicode" is not present,
the new git is backward compatible.
When core.precomposedunicode=true, all filenames are stored in precomposed
unicode in the index (technically speaking precomposed UTF-8).
Even when readdir() under Mac OS returns filenames as decomposed.
Implementation:
Two files are added to the "compat" directory, darwin.h and darwin.c.
They implement basically 3 new functions:
darwin_opendir(), darwin_readdir() and darwin_closedir().
Compile time configuration:
A new compiler option PRECOMPOSED_UNICODE is introduced in the Makefile,
so that the patch can be switched off completely at compile time.
No decomposed file names in a git repository:
In order to prevent that ever a file name in decomposed unicode is entering
the index, a "brute force" attempt is taken:
all arguments into git (technically argv[1]..argv[n]) are converted into
precomposed unicode.
This is done in git.c by calling argv_precompose() for all commands:
For "git commit" all args after "--" are converted,
for all other commands all argv[] is converted.
This function is actually a #define, and it is only defined under Mac OS.
Nothing is converted on any other OS.
Implementation details:
The main work is done in darwin_readdir() and argv_precompose().
The conversion into precomposed unicode is done by using iconv,
where decomposed is denoted by "UTF-8-MAC" and precomposed is "UTF-8".
When already precomposed unicode is precomposed, the string is returned
unchanged.
Thread save:
Since there is no need for argv_precompose()to be thread-save, one iconv
instance is created at the beginning and kept for all conversions.
Even readdir() is not thread-save, so that darwin_opendir() will call
iconv_open() once and keep the instance for all calls of darwin_readdir()
until darwin_close() is called.
Auto sensing:
When creating a new git repository with "git init" or "git clone", the
"core.precomposedunicode" will be set automatically to "true" or "false".
Typically core.precomposedunicode is "true" on HFS and VFAT.
It is even true for file systems mounted via SAMBA onto a Linux box,
and "false" for drives mounted via NFS onto a Linux box.
New test case:
The new t3910-mac-os-precompose.sh is added to check if a filename
can be reached either in precomposed or decomposed unicode (NFC or NFD).
Torsten Bögershausen (1):
git on Mac OS and precomposed unicode
Documentation/config.txt | 9 ++
Makefile | 3 +
builtin/init-db.c | 22 +++++
compat/darwin.c | 208 ++++++++++++++++++++++++++++++++++++++++++
compat/darwin.h | 31 ++++++
git-compat-util.h | 8 ++
git.c | 1 +
t/t0050-filesystem.sh | 1 +
t/t3910-mac-os-precompose.sh | 117 +++++++++++++++++++++++
9 files changed, 400 insertions(+), 0 deletions(-)
create mode 100644 compat/darwin.c
create mode 100644 compat/darwin.h
create mode 100755 t/t3910-mac-os-precompose.sh
--
1.7.8.rc0.43.gb49a8
^ permalink raw reply
* [RFC][PATCH v2] git on Mac OS and precomposed unicode
From: Torsten Bögershausen @ 2012-01-09 16:45 UTC (permalink / raw)
To: git; +Cc: tboegi
Allow git on Mac OS to store file names in the index in precomposed unicode,
while the file system used decomposed unicode.
When a file called "LATIN CAPITAL LETTER A WITH DIAERESIS"
(in utf-8 encoded as 0xc3 0x84) is created,
the filesystem converts "precomposed unicode" into "decomposed unicode",
which means that readdir() will return 0x41 0xcc 0x88.
When true, git reverts the unicode decomposition of filenames.
This is useful when pulling/pushing from repositories containing utf-8
encoded filenames using precomposed utf-8 (like Linux).
This feature is automatically switched on when "git init" is run,
and the file system is doing UTF-8 decompostion.
(Which has been observed on HFS+, SMBFS and VFAT, but not on NFS)
It can be switched off by setting core.macosforcenfc=false
It is implemented by re-defining the readdir() functions.
File names are converted into precomposed UTF-8.
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
---
Documentation/config.txt | 9 ++
Makefile | 3 +
builtin/init-db.c | 22 +++++
compat/darwin.c | 208 ++++++++++++++++++++++++++++++++++++++++++
compat/darwin.h | 31 ++++++
git-compat-util.h | 8 ++
git.c | 1 +
t/t0050-filesystem.sh | 1 +
t/t3910-mac-os-precompose.sh | 117 +++++++++++++++++++++++
9 files changed, 400 insertions(+), 0 deletions(-)
create mode 100644 compat/darwin.c
create mode 100644 compat/darwin.h
create mode 100755 t/t3910-mac-os-precompose.sh
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 2959390..01b9465 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -175,6 +175,15 @@ The default is false, except linkgit:git-clone[1] or linkgit:git-init[1]
will probe and set core.ignorecase true if appropriate when the repository
is created.
+core.precomposedunicode::
+ This option is only used by Mac OS implementation of git.
+ When core.precomposedunicode=true,
+ git reverts the unicode decomposition of filenames done by Mac OS.
+ This is useful when pulling/pushing from repositories containing utf-8
+ encoded filenames using precomposed unicode (like Linux).
+ When false, file names are handled fully transparent by git.
+ If in doubt, set core.precomposedunicode=false.
+
core.trustctime::
If false, the ctime differences between the index and the
working tree are ignored; useful when the inode change time
diff --git a/Makefile b/Makefile
index b21d2f1..596900e 100644
--- a/Makefile
+++ b/Makefile
@@ -519,6 +519,7 @@ LIB_H += compat/bswap.h
LIB_H += compat/cygwin.h
LIB_H += compat/mingw.h
LIB_H += compat/obstack.h
+LIB_H += compat/darwin.h
LIB_H += compat/win32/pthread.h
LIB_H += compat/win32/syslog.h
LIB_H += compat/win32/poll.h
@@ -884,6 +885,8 @@ ifeq ($(uname_S),Darwin)
endif
NO_MEMMEM = YesPlease
USE_ST_TIMESPEC = YesPlease
+ COMPAT_OBJS += compat/darwin.o
+ BASIC_CFLAGS += -DPRECOMPOSED_UNICODE
endif
ifeq ($(uname_S),SunOS)
NEEDS_SOCKET = YesPlease
diff --git a/builtin/init-db.c b/builtin/init-db.c
index 0dacb8b..88c9de1 100644
--- a/builtin/init-db.c
+++ b/builtin/init-db.c
@@ -290,6 +290,28 @@ static int create_default_files(const char *template_path)
strcpy(path + len, "CoNfIg");
if (!access(path, F_OK))
git_config_set("core.ignorecase", "true");
+#if defined (PRECOMPOSED_UNICODE)
+ {
+ const static char *auml_nfc = "\xc3\xa4";
+ const static char *auml_nfd = "\x61\xcc\x88";
+ int output_fd;
+ path[len] = 0;
+ strcpy(path + len, auml_nfc);
+ output_fd = open(path, O_CREAT|O_EXCL|O_RDWR, 0600);
+ if (output_fd >=0) {
+ close(output_fd);
+ path[len] = 0;
+ strcpy(path + len, auml_nfd);
+ if (0 == access(path, R_OK))
+ git_config_set("core.precomposedunicode", "true");
+ else
+ git_config_set("core.precomposedunicode", "false");
+ path[len] = 0;
+ strcpy(path + len, auml_nfc);
+ unlink(path);
+ }
+ }
+#endif
}
return reinit;
diff --git a/compat/darwin.c b/compat/darwin.c
new file mode 100644
index 0000000..6cf73ca
--- /dev/null
+++ b/compat/darwin.c
@@ -0,0 +1,208 @@
+#define __DARWIN_C__
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdint.h>
+
+#include "../cache.h"
+#include "../utf8.h"
+
+#include "darwin.h"
+
+static int mac_os_precomposed_unicode;
+const static char *repo_encoding = "UTF-8";
+const static char *path_encoding = "UTF-8-MAC";
+
+
+/* Code borrowed from utf8.c */
+#if defined(OLD_ICONV) || (defined(__sun__) && !defined(_XPG6))
+ typedef const char * iconv_ibp;
+#else
+ typedef char * iconv_ibp;
+#endif
+static char *reencode_string_iconv(const char *in, size_t insz, iconv_t conv)
+{
+ size_t outsz, outalloc;
+ char *out, *outpos;
+ iconv_ibp cp;
+
+ outsz = insz;
+ outalloc = outsz + 1; /* for terminating NUL */
+ out = xmalloc(outalloc);
+ outpos = out;
+ cp = (iconv_ibp)in;
+
+ while (1) {
+ size_t cnt = iconv(conv, &cp, &insz, &outpos, &outsz);
+
+ if (cnt == -1) {
+ size_t sofar;
+ if (errno != E2BIG) {
+ free(out);
+ iconv_close(conv);
+ return NULL;
+ }
+ /* insz has remaining number of bytes.
+ * since we started outsz the same as insz,
+ * it is likely that insz is not enough for
+ * converting the rest.
+ */
+ sofar = outpos - out;
+ outalloc = sofar + insz * 2 + 32;
+ out = xrealloc(out, outalloc);
+ outpos = out + sofar;
+ outsz = outalloc - sofar - 1;
+ }
+ else {
+ *outpos = '\0';
+ break;
+ }
+ }
+ return out;
+}
+
+static size_t
+has_utf8(const char *s, size_t maxlen, size_t *strlen_c)
+{
+ const uint8_t *utf8p = (const uint8_t*) s;
+ size_t strlen_chars = 0;
+ size_t ret = 0;
+
+ if ((!utf8p) || (!*utf8p))
+ return 0;
+
+ while((*utf8p) && maxlen) {
+ if (*utf8p & 0x80)
+ ret++;
+ strlen_chars++;
+ utf8p++;
+ maxlen--;
+ }
+ if (strlen_c)
+ *strlen_c = strlen_chars;
+
+ return ret;
+}
+
+static int
+precomposed_unicode_config(const char *var, const char *value, void *cb)
+{
+ if (!strcasecmp(var, "core.precomposedunicode")) {
+ mac_os_precomposed_unicode = git_config_bool(var, value);
+ return 0;
+ }
+ return 1;
+}
+
+void
+argv_precompose(int argc, const char **argv)
+{
+ int i = 0;
+ int first_arg = 0; /* convert everything */
+ const char *oldarg;
+ char *newarg;
+ iconv_t ic_precompose;
+
+ git_config(precomposed_unicode_config, NULL);
+ if (!mac_os_precomposed_unicode)
+ return;
+
+ ic_precompose = iconv_open(repo_encoding, path_encoding);
+ if (ic_precompose == (iconv_t) -1)
+ return;
+
+ if (!strcmp("commit", argv[0])) {
+ first_arg = argc; /* default: convert nothing */
+
+ for (i = 0; i < argc; i++) {
+ if (!strcmp(argv[i], "--")) {
+ first_arg = i + 1; /* convert args after "--" */
+ i = argc;
+ break;
+ }
+ }
+ i = first_arg;
+ }
+ while (i < argc) {
+ size_t namelen;
+ oldarg = argv[i];
+ if (has_utf8(oldarg, (size_t)-1, &namelen)) {
+ newarg = reencode_string_iconv(oldarg, namelen, ic_precompose);
+ if (newarg)
+ argv[i] = newarg;
+ }
+ i++;
+ }
+ iconv_close(ic_precompose);
+}
+
+
+DARWIN_DIR *
+darwin_opendir(const char *dirname)
+{
+ DARWIN_DIR *darwin_dir;
+ darwin_dir = malloc(sizeof(DARWIN_DIR));
+ if (!darwin_dir)
+ return NULL;
+
+ darwin_dir->dirp = opendir(dirname);
+ if (!darwin_dir->dirp) {
+ free(darwin_dir);
+ return NULL;
+ }
+ darwin_dir->ic_precompose = iconv_open(repo_encoding, path_encoding);
+ if (darwin_dir->ic_precompose == (iconv_t) -1) {
+ closedir(darwin_dir->dirp);
+ free(darwin_dir);
+ return NULL;
+ }
+
+ return darwin_dir;
+}
+
+struct dirent *
+darwin_readdir(DARWIN_DIR *darwin_dirp)
+{
+ struct dirent *res;
+ size_t namelen = 0;
+
+ res = readdir(darwin_dirp->dirp);
+ if (!res || !mac_os_precomposed_unicode || !has_utf8(res->d_name, (size_t)-1, &namelen))
+ return res;
+ else {
+ int olderrno = errno;
+ size_t outsz = sizeof(darwin_dirp->dirent_nfc.d_name) - 1; /* one for \0 */
+ char *outpos = darwin_dirp->dirent_nfc.d_name;
+ iconv_ibp cp;
+ size_t cnt;
+ size_t insz = namelen;
+ cp = (iconv_ibp)res->d_name;
+
+ /* Copy all data except the name */
+ memcpy(&darwin_dirp->dirent_nfc, res,
+ sizeof(darwin_dirp->dirent_nfc)-sizeof(darwin_dirp->dirent_nfc.d_name));
+ errno = 0;
+
+ cnt = iconv(darwin_dirp->ic_precompose, &cp, &insz, &outpos, &outsz);
+ if (cnt < sizeof(darwin_dirp->dirent_nfc.d_name) -1) {
+ *outpos = 0;
+ errno = olderrno;
+ return &darwin_dirp->dirent_nfc;
+ }
+ errno = olderrno;
+ return res;
+ }
+}
+
+
+int
+darwin_closedir(DARWIN_DIR *darwin_dirp)
+{
+ int ret_value;
+ ret_value = closedir(darwin_dirp->dirp);
+ if (darwin_dirp->ic_precompose != (iconv_t)-1)
+ iconv_close(darwin_dirp->ic_precompose);
+ free(darwin_dirp);
+ return ret_value;
+}
diff --git a/compat/darwin.h b/compat/darwin.h
new file mode 100644
index 0000000..094f930
--- /dev/null
+++ b/compat/darwin.h
@@ -0,0 +1,31 @@
+#ifndef __DARWIN_H__
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <dirent.h>
+#include <iconv.h>
+
+
+typedef struct {
+ iconv_t ic_precompose;
+ DIR *dirp;
+ struct dirent dirent_nfc;
+} DARWIN_DIR;
+
+char *str_precompose(const char *in, iconv_t ic_precompose);
+
+void argv_precompose(int argc, const char **argv);
+
+DARWIN_DIR *darwin_opendir(const char *dirname);
+struct dirent *darwin_readdir(DARWIN_DIR *dirp);
+int darwin_closedir(DARWIN_DIR *dirp);
+
+#ifndef __DARWIN_C__
+#define opendir(n) darwin_opendir(n)
+#define readdir(d) darwin_readdir(d)
+#define closedir(d) darwin_closedir(d)
+#define DIR DARWIN_DIR
+
+#endif /* __DARWIN_C__ */
+
+#define __DARWIN_H__
+#endif /* __DARWIN_H__ */
diff --git a/git-compat-util.h b/git-compat-util.h
index 230e198..859dfcf 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -90,6 +90,14 @@
#include <windows.h>
#endif
+#if defined (PRECOMPOSED_UNICODE)
+#include "compat/darwin.h"
+#else
+#define str_precompose(in,i_nfd2nfc) (NULL)
+#define argv_precompose(c,v)
+
+#endif
+
#include <unistd.h>
#include <stdio.h>
#include <sys/stat.h>
diff --git a/git.c b/git.c
index 8e34903..6b2ffb7 100644
--- a/git.c
+++ b/git.c
@@ -298,6 +298,7 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
startup_info->have_repository) /* get_git_dir() may set up repo, avoid that */
trace_repo_setup(prefix);
}
+ argv_precompose(argc, argv);
commit_pager_choice();
if (!help && p->option & NEED_WORK_TREE)
diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh
index 1542cf6..befe39e 100755
--- a/t/t0050-filesystem.sh
+++ b/t/t0050-filesystem.sh
@@ -126,6 +126,7 @@ test_expect_success "setup unicode normalization tests" '
test_create_repo unicode &&
cd unicode &&
+ git config core.precomposedunicode false &&
touch "$aumlcdiar" &&
git add "$aumlcdiar" &&
git commit -m initial &&
diff --git a/t/t3910-mac-os-precompose.sh b/t/t3910-mac-os-precompose.sh
new file mode 100755
index 0000000..439e266
--- /dev/null
+++ b/t/t3910-mac-os-precompose.sh
@@ -0,0 +1,117 @@
+#!/bin/sh
+#
+# Copyright (c) 2012 Torsten Bögershausen
+#
+
+test_description='utf-8 decomposed (nfd) converted to precomposed (nfc)'
+
+. ./test-lib.sh
+
+Adiarnfc=`printf '\303\204'`
+Odiarnfc=`printf '\303\226'`
+Adiarnfd=`printf 'A\314\210'`
+Odiarnfd=`printf 'O\314\210'`
+
+mkdir junk &&
+>junk/"$Adiarnfc" &&
+case "$(cd junk && echo *)" in
+ "$Adiarnfd")
+ test_nfd=1
+ ;;
+ *) ;;
+esac
+rm -rf junk
+
+if test "$test_nfd"
+then
+ test_expect_success "detect if nfd needed" '
+ precomposedunicode=`git config --bool core.precomposedunicode` &&
+ test "$precomposedunicode" = true
+ '
+ test_expect_success "setup" '
+ >x &&
+ git add x &&
+ git commit -m "1st commit" &&
+ git rm x &&
+ git commit -m "rm x"
+ '
+ test_expect_success "setup case mac" '
+ git checkout -b mac_os
+ '
+ # This will test nfd2nfc in readdir()
+ test_expect_success "add file Adiarnfc" '
+ echo f.Adiarnfc >f.$Adiarnfc &&
+ git add f.$Adiarnfc &&
+ git commit -m "add f.$Adiarnfc"
+ '
+ # This will test nfd2nfc in git stage()
+ test_expect_success "stage file d.Adiarnfd/f.Adiarnfd" '
+ mkdir d.$Adiarnfd &&
+ echo d.$Adiarnfd/f.$Adiarnfd >d.$Adiarnfd/f.$Adiarnfd &&
+ git stage d.$Adiarnfd/f.$Adiarnfd &&
+ git commit -m "add d.$Adiarnfd/f.$Adiarnfd"
+ '
+ test_expect_success "add link Adiarnfc" '
+ ln -s d.$Adiarnfd/f.$Adiarnfd l.$Adiarnfc &&
+ git add l.$Adiarnfc &&
+ git commit -m "add l.Adiarnfc"
+ '
+ # This will test git log
+ test_expect_success "git log f.Adiar" '
+ git log f.$Adiarnfc > f.Adiarnfc.log &&
+ git log f.$Adiarnfd > f.Adiarnfd.log &&
+ test -s f.Adiarnfc.log &&
+ test -s f.Adiarnfd.log &&
+ test_cmp f.Adiarnfc.log f.Adiarnfd.log &&
+ rm f.Adiarnfc.log f.Adiarnfd.log
+ '
+ # This will test git ls-files
+ test_expect_success "git lsfiles f.Adiar" '
+ git ls-files f.$Adiarnfc > f.Adiarnfc.log &&
+ git ls-files f.$Adiarnfd > f.Adiarnfd.log &&
+ test -s f.Adiarnfc.log &&
+ test -s f.Adiarnfd.log &&
+ test_cmp f.Adiarnfc.log f.Adiarnfd.log &&
+ rm f.Adiarnfc.log f.Adiarnfd.log
+ '
+ # This will test git mv
+ test_expect_success "git mv" '
+ git mv f.$Adiarnfd f.$Odiarnfc &&
+ git mv d.$Adiarnfd d.$Odiarnfc &&
+ git mv l.$Adiarnfd l.$Odiarnfc &&
+ git commit -m "mv Adiarnfd Odiarnfc"
+ '
+ # Files can be checked out as nfc
+ # And the link has been corrected from nfd to nfc
+ test_expect_success "git checkout nfc" '
+ rm f.$Odiarnfc &&
+ git checkout f.$Odiarnfc
+ '
+ # Make it possible to checkout files with their NFD names
+ test_expect_success "git checkout file nfd" '
+ rm -f f.* &&
+ git checkout f.$Odiarnfd
+ '
+ # Make it possible to checkout links with their NFD names
+ test_expect_success "git checkout link nfd" '
+ rm l.* &&
+ git checkout l.$Odiarnfd
+ '
+ test_expect_success "setup case mac2" '
+ git checkout master &&
+ git reset --hard &&
+ git checkout -b mac_os_2
+ '
+ # This will test nfd2nfc in git commit
+ test_expect_success "commit file d2.Adiarnfd/f.Adiarnfd" '
+ mkdir d2.$Adiarnfd &&
+ echo d2.$Adiarnfd/f.$Adiarnfd >d2.$Adiarnfd/f.$Adiarnfd &&
+ git add d2.$Adiarnfd/f.$Adiarnfd &&
+ git commit -m "add d2.$Adiarnfd/f.$Adiarnfd" -- d2.$Adiarnfd/f.$Adiarnfd
+ '
+else
+ say "Skipping nfc/nfd tests"
+fi
+ #git commit -m "add d2.$Adiarnfd/f.$Adiarnfd" -- d2.$Adiarnfd/f.$Adiarnfd
+
+test_done
--
1.7.8.rc0.43.gb49a8
^ permalink raw reply related
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