View Ticket
Not logged in
Ticket UUID: 5a13dbd275acf6b5f73c86c735eb7f415cbc8cbd
Title: add and ci/commit are inconsistent wrt "*" handling
Status: Open Type: Code_Defect
Severity: Important Priority:
Subsystem: Resolution: Open
Last Modified: 2009-11-30 14:44:18
Version Found In: bc857ecd92
Description & Comments:
fossil add * will happily add all files in current dir, and subdirs if present.Subsequent fossil commit * will fail on the subdirectories, though, saying they're not part of the repo.

There is no file_isdir() handling in the ci/commit code, and even more confusingly, the object-types and style seem different between the two (add and ci/commit) blocks.

Could these share a common function that recurses into dirs and returns strings/objects that are the files? Could fossil ci * be made to behave same as fossil add *?


drh added on 2009-02-16 12:55:35:
Simply omit the "*" and "fossil commit" automatically commits everything. Why do you want to include "*" syntax?


bharder added on 2009-02-16 14:45:03:
If I have a logical group of commits in a single dir, and don't want to commit every single outstanding commit, then "*" is useful.


kkinnell added on 2009-02-20 22:54:17:
On a Unix or GNU box you can do this if

  • You're not trying to recurse
  • There aren't any 'extra' files in the directory
  • You get the full path from the root of the checkout.

That last is as easy as starting at the checkout root, and
    fossil commit path/to/the/checkins/*

You may not even need the "full" path—but it never hurts to over-specify a path.

A short Perl (or some lesser language ;) script can clean and commit a particular directory in one swell foop.


anonymous added on 2009-03-14 23:45:46:
You can fix all kinds of problems by wrapping them in Perl, ultimately down to the point of writing an entire SCM in it. I don't think asking for consistency in behavior is that unrealistic a request.


stephan added on 2009-11-30 14:44:18:
Keep in mind that the '*' is parsed by the SHELL, and NOT by fossil. What fossil gets as input is whatever the shell expanded '*' to be.